How to set alsa_amixer during boot and how to get the camera to work?

3,207 views
Skip to first unread message

B.Jay

unread,
Jan 7, 2012, 6:38:48 PM1/7/12
to Android-x86
Hi!

So I installed Android-x86 2.3rc1 on a EeePC 701, by using the "eeepc"
ISO, and having two problems:

1. Sound output is very low though the mixer (in Android -> Settings -
> Sound -> Volume) is already maxed out.

However, I discovered that I can resolve the problem by switching to
the console (ALT+F1) and issuing "alsa_amixer sset master 100". That
improves things greatly and is exactly the result I wanted.

The question is: How do I execute the command during boot so I won't
have to type it anew after each boot?

2. The camera does not work. The camera app as well as any other app I
tried fails to get a picture from the camera.

Is there any solution to this problem?

I'm using 2.3rc1 because even the "stock" apps in Honeycomb 3.2rc2
keep on force closing like wild, and ICS is stuck on the console (I
already read up on the workaround).

The two issues are the only show-stoppers for me ... otherwise 2.3rc1
is working very nicely, and I even managed to sideload the gapps
(Market et al).

Thank you for any helpful responses,
B.Jay

Chih-Wei Huang

unread,
Jan 8, 2012, 4:34:09 AM1/8/12
to andro...@googlegroups.com
2012/1/8 B.Jay <jochen...@gmail.com>:

> So I installed Android-x86 2.3rc1 on a EeePC 701, by using the "eeepc"
> ISO, and having two problems:
>
> 1. Sound output is very low though the mixer (in Android -> Settings -
>> Sound -> Volume) is already maxed out.
>
> However, I discovered that I can resolve the problem by switching to
> the console (ALT+F1) and issuing "alsa_amixer sset master 100". That
> improves things greatly and is exactly the result I wanted.
>
> The question is: How do I execute the command during boot so I won't
> have to type it anew after each boot?

The cmd will be default in ics-x86.
No plan to back port to older branch. sorry.

> 2. The camera does not work. The camera app as well as any other app I
> tried fails to get a picture from the camera.
>
> Is there any solution to this problem?

No, unless you're interested in hacking
the broken libcamera hal.

> I'm using 2.3rc1 because even the "stock" apps in Honeycomb 3.2rc2
> keep on force closing like wild, and ICS is stuck on the console (I
> already read up on the workaround).
>
> The two issues are the only show-stoppers for me ... otherwise 2.3rc1
> is working very nicely, and I even managed to sideload the gapps
> (Market et al).

--
Chih-Wei
Android-x86 project
http://www.android-x86.org

B.Jay

unread,
Jan 8, 2012, 5:35:32 PM1/8/12
to Android-x86
Hi, Chih-Wei!

> The cmd will be default in ics-x86.
> No plan to back port to older branch. sorry.

Ok, seems I either have to get used to the fact that I have to type
the command anew after each boot or hope that the rumor about ICS not
running on non-Atom Netbooks anymore doesn't hold any substance (at
least I can't imagine why - I managed to boot the latest Testing ISO
you guys put up for download with HWACCEL=0 successfully on the
Celeron M of the EeePC 701 4G)

> No, unless you're interested in hacking
> the broken libcamera hal.

Well, if we're talking about C/C++ code I may be able to take a look.
If we're talking about the Java parts of Android I'm afraid I won't be
of any help as I (please excuse me) hate Java from the depths of my
heart (to me that's not a programming language but the world's largest
security hole). Anyhow, I guess I take a look into the source repo to
see about what kind of code we're talking about.

Thank you for your kind reply though,
- B.Jay

P.S.: Looking forward to ICS (took a look at it in VirtualBox and am
impressed)!

Ikem Krueger

unread,
Jan 8, 2012, 7:28:28 PM1/8/12
to andro...@googlegroups.com
> 2012/1/8 B.Jay <jochen...@gmail.com>:

> Java [is] not a programming language but the world's largest security hole

How do you come to that conclusion?

Ikem Krueger

unread,
Jan 8, 2012, 7:30:02 PM1/8/12
to andro...@googlegroups.com
> 2012/1/8 B.Jay <jochen...@gmail.com>:

> Java [is] the worlds largest security hole.

B.Jay

unread,
Jan 9, 2012, 10:48:17 AM1/9/12
to Android-x86
I found a way to solve the ALSA Mixer problem in a somewhat convenient
manner by using "GScript Lite".
Maybe it's of some value for someone else ...

On the console (ALT+F1) ...

alsa_amixer sset Master 100
* This will set the output volume of the master mixer to 100%

alsa_ctl store
* This stores the current Alsa mixer settings in /etc/asound.conf -
requires that /system got installed as read/write

Now install GScript Lite from the Market or from Google Code
(http://code.google.com/p/gscript-android/downloads/list)

After installation run GScript and add a new script.

Name: Restore ALSA Mixer
Command to execute: /system/bin/alsa_ctl restore
Check: Needs root

Back on the Home Screen create a new GScript Shortcut to the script
(tap the home screen -> Shortcuts -> Gscript shortcut -> select the
"Restore ALSA Mixer" script -> either keep the name or rename it as
you see fit). After a reboot/boot simply click/tap the shortcut of the
script to resolve the "Sound too low" issue ... make sure you reduced
the "Sound" settings down to ~50-60% or a notification sound will
blare at you.


On Jan 9, 1:30 am, Ikem Krueger <ikem.krue...@googlemail.com> wrote:
> > 2012/1/8 B.Jay <jochen.bla...@gmail.com>:
> > Java [is] the worlds largest security hole.
>
> How do you come to that conclusion?

As a IT Professional who's caring about server systems and
workstations ... Looking at the dire security vulnerability track
record of the Java Runtime Environment (the full-blown Sunracle JRE
that is) should tell the whole story. Java and Flash - and to some
extend Adobe's PDF Reader - are the most troublesome pieces of
software one can install to put a system at risk of remote exploits.

I'm not saying that the DalvikVM of Android is a bad concept, I just
dislike Java as a programming language and its concept in general.
It's not type-safe, not sandboxed (read: the Runtime/Bytecode compile
does not perform sanity checks to minimize possible security exploits)
and, compared to C/C++ code, it's still a resource hog with a terrible
performance.

Leozeras

unread,
Mar 4, 2012, 8:55:44 AM3/4/12
to Android-x86
you can also install from market Alsamixer app and set all parameters
to 100 and u be happy fast.....

Alvin Wong

unread,
Mar 4, 2012, 10:45:24 PM3/4/12
to Android-x86
For ALSA amixer in my port to my device I've once used a service in
init.rc, but finally changed into using asound.conf. My port is
Gingerbread, but as I copied ALSA from Android-x86, it may work.
Search for ipaq214android on sourceforge and view Android Device Files
section you will find it.

mike r

unread,
May 12, 2014, 4:10:07 PM5/12/14
to andro...@googlegroups.com
HEY, Finally found a half answer here, Thank You, But i'm running 4.4.2, and when I tried the alsa_amixer ctl command I get that there is no asound.state in /var/lib/alsa, Would You happen to know how to do this in 4.4.2 as obviously things have changed and sound works great with mixer and speaker set to 127. I did find scripts in system/usr/share/alasa/init, Which you would think you could just throw the commands in and it would work but of course not, and the scripts are very confusing, I put everything that said 0% to 100% still no luck...

Any help would be great, and alsamixer and all them playstore apps don't work..........

Thanks

Mike

mike r

unread,
May 12, 2014, 5:53:44 PM5/12/14
to andro...@googlegroups.com
Correction alsamixer works but it's easier to use gscript, does anyone know how to auto exec the script on boot-up?

Mike

Chih-Wei Huang

unread,
May 12, 2014, 9:17:22 PM5/12/14
to Android-x86
2014-05-13 5:53 GMT+08:00 mike r <mike...@gmail.com>:
> Correction alsamixer works but it's easier to use gscript, does anyone know how to auto exec the script on boot-up?

Take a look at the /system/etc/init.sh script.
There is a function (init_hal_audio) that initializes the mixer settings.
Try to change it to fit your need.

mike r

unread,
May 12, 2014, 11:51:24 PM5/12/14
to andro...@googlegroups.com
That's what i've been looking for, Thank You!

Mike

mike r

unread,
May 13, 2014, 12:07:09 AM5/13/14
to andro...@googlegroups.com
That Fixed it, Been Searching for 3 days for that tidbit, Thank you very much! 4.4.2 RC1 now works 100%, Great Work!

Mike

Chih-Wei Huang

unread,
May 14, 2014, 2:21:55 AM5/14/14
to Android-x86
2014-05-13 12:07 GMT+08:00 mike r <mike...@gmail.com>:
> That Fixed it, Been Searching for 3 days for that tidbit, Thank you very much! 4.4.2 RC1 now works 100%, Great Work!
>

You can post what you changed.
I'll see if it could be integrated into next release.

mike r

unread,
May 15, 2014, 9:37:05 PM5/15/14
to andro...@googlegroups.com
Simple really once I was directed to where it was located...

File "INIT.SH"

function init_hal_audio()
{
case "$PRODUCT" in
VirtualBox*|Bochs*)
[ -d /proc/asound/card0 ] || modprobe snd-sb16 isapnp=0 irq=5
;;
*)
;;
esac
[ -d /proc/asound/card0 ] || modprobe snd-dummy

for c in $(grep '\[.*\]' /proc/asound/cards | awk '{print $1}'); do
alsa_ctl init $c
alsa_amixer -c $c set Master on
alsa_amixer -c $c set Master 127 # Changed from 100 to 127
alsa_amixer -c $c set Headphone on
alsa_amixer -c $c set Headphone 100
alsa_amixer -c $c set Speaker 127 # Changed from 100 to 127
alsa_amixer -c $c set Capture 127 # Changed from 100 to 127 (Not meaning to, But didn't hurt nothing so left it)
alsa_amixer -c $c set Capture cap
alsa_amixer -c $c set PCM 100 unmute
alsa_amixer -c $c set 'Internal Mic Boost' 2 # Changed From 'Mic Boost' To 'Internal Mic Boost'
done
}

steve c

unread,
Jun 17, 2014, 1:19:30 PM6/17/14
to andro...@googlegroups.com
>Leozeras

>you can also install from market Alsamixer app and set all parameters
>to 100 and u be happy fast.....

How did you get Alsa Mixer to work? It seems totally useless and doesn't have any parameters to set or do anything at all as far as I can tell.

mike r

unread,
Jun 18, 2014, 5:09:26 PM6/18/14
to andro...@googlegroups.com
ALSA Mixer doesn't work on all systems, Did you find the settings in INIT.SH in the root directory of your Android Install?

Mike

steve c

unread,
Jun 18, 2014, 11:33:42 PM6/18/14
to andro...@googlegroups.com
Nope.

On Wed, Jun 18, 2014 at 2:09 PM, mike r <mike...@gmail.com> wrote:
> ALSA Mixer doesn't work on all systems, Did you find the settings in INIT.SH in the root directory of your Android Install?
>
> Mike
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Android-x86" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-x86/e79dAuB2ra4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to android-x86...@googlegroups.com.
> To post to this group, send email to andro...@googlegroups.com.
> Visit this group at http://groups.google.com/group/android-x86.
> For more options, visit https://groups.google.com/d/optout.

steve c

unread,
Jun 19, 2014, 11:24:30 AM6/19/14
to andro...@googlegroups.com
I found the init.sh file in /etc but can't change the settings. When I
try to save it I get an error saying it's a Read Only File System.

mike r

unread,
Jun 19, 2014, 3:38:46 PM6/19/14
to andro...@googlegroups.com
Ok, Now I Use Total Commander So I don't know any other way (But there probably is) to do it, I get the Properties of the file in the root dir (INIT.SH), In there that'll tell you the permissions, Then I copy it to the SD card root (Easy To Find, you can put it where you want), Change it, Save it, Go Back to ETC and delete INIT.SH (Might have to change Permissions to 777), Copy It Back, and check the permissions to make sure they are right, then reboot.

Mike

Message has been deleted

Julichi Garcia

unread,
Jan 10, 2015, 9:15:13 AM1/10/15
to andro...@googlegroups.com

In terminal type

su
 

Mike Ross

unread,
Jan 10, 2015, 1:02:44 PM1/10/15
to andro...@googlegroups.com
On 1/10/2015 8:15 AM, Julichi Garcia wrote:

In terminal type

su
 


Edit INIT.SH
Message has been deleted

Junior

unread,
Dec 15, 2018, 3:51:46 PM12/15/18
to Android-x86
Guys I am using android x86 7.2  in my dell inspiron 5378 but the android max sound is too LOW in comparison to Windows 10 max sound volume. I tried changing the alsa parameters  in init.sh  set MASTER to 127 did not  boost the audio.  Is there any other sugestion to boost audio volume in Android to make it as loud as Windows 10 sound?

Daniel Cheung

unread,
Dec 15, 2018, 5:31:31 PM12/15/18
to andro...@googlegroups.com
I have a different issue with sound on my Teclast X98 Plus tablet where both the speakers and headphone jacks are on at the same time. As suggested by other people, I used Tasker (pay app) and use it to run commands on boot.
alsa set.png

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.

To post to this group, send email to andro...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages