ALSA on x86 - No sound

1,397 views
Skip to first unread message

Luca Belluccini

unread,
Jun 2, 2009, 11:01:06 AM6/2/09
to android-porting
Hi... I'm writing to you my porting status about audio.

Kernel
ALSA and Intel HD enabled as built-in (no module).
It correctly creates device nodes at bootup. Also sysfs seems right
(different cat display right outputs).

BoardConfig.mk
[...]
HAVE_HTC_AUDIO_DRIVER := false
BOARD_USES_ALSA_AUDIO := true
BUILD_WITH_ALSA_UTILS := true
[...]

asound.conf and asound.state
I placed them into /etc/ folder.

===asound.conf===
ctl.AndroidPlayback {
type hw
card 0
}

ctl.AndroidRecord {
type hw
card 0
}

pcm.AndroidPlayback {
type hooks
slave.pcm {
type hw
card 0
device 16
}
hooks.0 {
type ctl_elems
hook_args [
{ name 'Speaker Playback Switch' value [ true true ] }
{ name 'Line-Out Playback Volume' value [ 64 64 ] }
{ name 'Line-Out Playback Switch' value [ true true ] }
{ name 'e-Mic Boost' value [ 0 0 ] }
{ name 'e-Mic Playback Volume' value [ 10 10 ] }
{ name 'e-Mic Playback Switch' value [ false false ] }
{ name 'i-Mic Boost' value [ 0 0 ] }
{ name 'i-Mic Playback Volume' value [ 10 10 ] }
{ name 'i-Mic Playback Switch' value [ false false ] }
{ name 'Capture Volume' value [ 0 0 ] }
{ name 'Capture Switch' value [ false false ] }
{ name 'Input Source' value i-Mic }
{ name 'Master Playback Volume' value 64 }
{ name 'Master Playback Switch' value true }
]
}
}
[... And so on ...]

===asound.state===
state.Intel {
control.1 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'Speaker Playback Switch'
value.0 true
value.1 true
}
control.2 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 64'
comment.dbmin -6400
comment.dbmax 0
iface MIXER
name 'Line-Out Playback Volume'
value.0 64
value.1 64
}
control.3 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'Line-Out Playback Switch'
value.0 true
value.1 true
}
control.4 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 3'
comment.dbmin 0
comment.dbmax 3000
iface MIXER
name 'e-Mic Boost'
value.0 0
value.1 0
}
control.5 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 31'
comment.dbmin -3450
comment.dbmax 1200
iface MIXER
name 'e-Mic Playback Volume'
value.0 0
value.1 0
}
control.6 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'e-Mic Playback Switch'
value.0 false
value.1 false
}
control.7 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 3'
comment.dbmin 0
comment.dbmax 3000
iface MIXER
name 'i-Mic Boost'
value.0 0
value.1 0
}
control.8 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 31'
comment.dbmin -3450
comment.dbmax 1200
iface MIXER
name 'i-Mic Playback Volume'
value.0 0
value.1 0
}
control.9 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'i-Mic Playback Switch'
value.0 false
value.1 false
}
control.10 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 31'
comment.dbmin -1350
comment.dbmax 3300
iface MIXER
name 'Capture Volume'
value.0 0
value.1 0
}
control.11 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'Capture Switch'
value.0 false
value.1 false
}
control.12 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
comment.item.0 i-Mic
comment.item.1 e-Mic
iface MIXER
name 'Input Source'
value i-Mic
}
control.13 {
comment.access 'read write'
comment.type INTEGER
comment.count 1
comment.range '0 - 64'
comment.dbmin -6400
comment.dbmax 0
iface MIXER
name 'Master Playback Volume'
value 64
}
control.14 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
iface MIXER
name 'Master Playback Switch'
value true
}
}

alsa-lib alsa_sound and alsa-utilis
Added to the tree. I did not modified them ( I have some doubt about
LOCAL_ARM_MODE := arm definition ... )

All is built correctly.

I can launch alsa_ctr store / restore and it is ok.
I can launch alsa_aplay -l and audio card is listed.
Launching alsa_aplay file.wav it tells me "unable to install hw
params".
Launching alsa_amixer -c 0 it goes on segfault when parsing the first
control 'Master', after it prints Limits: Playback 0 - 64.

Luca Belluccini

unread,
Jun 2, 2009, 7:32:39 PM6/2/09
to android-porting
Addendum:

At init, there's a logcat message saying:

Using stubbed audio hardware. No sound will be produced.

But before it there's no additional error code or something similar.

crazygenie

unread,
Jun 3, 2009, 5:43:28 AM6/3/09
to android-porting
Well, you need to have the following lines in BoardConfig.mk for ALSA
to be built:

BOARD_USES_GENERIC_AUDIO=false
BOARD_USES_ALSA_AUDIO=true
BUILD_WITH_ALSA_UTILS=true

Since, your BoardConfig.mk didn't have the BOARD_USES_GENERIC_AUDIO
set to false, it still is using stub audio which is like a fake
interface!

The ideal way to keep config files is in /system/etc instead of /etc.
Rather, it is good practice to create a symbolic link from /system/etc
to /etc for backward compatibility. Android now seems to use /system/
etc as the configuration folder by default (instead of /etc).

Hope this helps.

Luca Belluccini

unread,
Jun 3, 2009, 6:33:37 AM6/3/09
to android-porting
I did it. Here a mail I sent to some people involved in ALSA.

I successfully bring up Android on ASUS EeePc. Wifi, LAN, Keyboard are
working.
The last step is ALSA.

I enabled ALSA kernel support for it and specifically adding Intel HDA
support.
All sysfs and devfs nodes are created correctly. Procfs returns
"right" outputs.

ALC662 is the Audio Chipset.
I added to the Android source tree (1.5 version, 05 april 2009):

* hardware/alsa_sound
* external/alsa-lib
* external/alsa-utils

I checked Android.mk files: I have some doubt about LOCAL_ARM_MODE :=
arm definition.
Under my vendor folder I specified into BoardConfig.mk
[...]
HAVE_HTC_AUDIO_DRIVER := false
BOARD_USES_ALSA_AUDIO := true
BUILD_WITH_ALSA_UTILS := true
[...]
In init.eee_701.rc (but I am not sure of Master and Capture names)
setprop alsa.mixer.playback.master Master
setprop alsa.mixer.capture.master Capture
setprop alsa.mixer.playback.earpiece Master
setprop alsa.mixer.capture.earpiece Capture
setprop alsa.mixer.playback.headset Master
setprop alsa.mixer.playback.speaker Master
In devices.c I specified system audio as owner of the inodes under /
dev/snd.

I know that a file called asound.conf under system/etc/ folder is
necessary to bind correctly the mixer to Android. There's also
asound.state, produced launching alsa_ctl store 0.
In Logcat, at bootup, I get "Using stubbed audio hardware. No sound
will be produced."
I can launch alsa_ctr store / restore and asound.state is created
correctly (I think it is right).
I can launch alsa_aplay -l and audio card is listed.
Launching alsa_aplay file.wav it tells me "unable to install hw
params".
Launching alsa_amixer -c 0 it goes on SIGSEGV when parsing the first
control 'Master', after it prints Limits: Playback 0 - 64.
Launching alsa_amixer controls or alsa_amixer scontrols it seems
compliant to conf and state files.

Luca Belluccini

unread,
Jun 3, 2009, 6:44:51 AM6/3/09
to android-porting
After a make clean && make I obtain that at system startup.

D/AudioHardwareALSA( 1985): Mixer: element name: 'Master'
D/AudioHardwareALSA( 1985): Mixer: master 'Master' found.
D/AudioHardwareALSA( 1985): Mixer: route 'Master' found.
D/AudioHardwareALSA( 1985): Mixer: route 'Master' found.
D/AudioHardwareALSA( 1985): Mixer: route 'Bluetooth' not found.
D/AudioHardwareALSA( 1985): Mixer: route 'Master' found.
D/AudioHardwareALSA( 1985): Mixer: route 'Bluetooth A2DP' not found.
D/AudioHardwareALSA( 1985): Mixer: element name: 'Capture'
D/AudioHardwareALSA( 1985): Mixer: master 'Capture' found.
D/AudioHardwareALSA( 1985): Mixer: route 'Capture' found.
D/AudioHardwareALSA( 1985): Mixer: route '' not found.
D/AudioHardwareALSA( 1985): Mixer: route 'Bluetooth Capture' not
found.
D/AudioHardwareALSA( 1985): Mixer: route 'Capture' found.
D/AudioHardwareALSA( 1985): Mixer: route 'Bluetooth A2DP Capture' not
found.
D/AudioHardwareALSA( 1985): mixer initialized.
E/ALSALib ( 1985): external/alsa-lib/src/pcm/pcm_hw.c:1445:
(_snd_pcm_hw_open) Invalid type for subdevice
E/ALSALib ( 1985): external/alsa-lib/src/pcm/pcm.c:2201:
(snd_pcm_open_noupdate) Unknown PCM NULL_Device
I/AudioHardwareALSA( 1985): Initialized ALSA PLAYBACK device
NULL_Device
W/AudioHardwareALSA( 1985): AudioMixer expects two channels, but only
-1 found!
W/AudioHardwareALSA( 1985): AudioMixer expects two channels, but only
-1 found!
I/AudioFlinger( 1985): AudioFlinger's thread ready to run for output 0
E/ALSALib ( 1985): external/alsa-lib/src/pcm/pcm_hw.c:1445:
(_snd_pcm_hw_open) Invalid type for subdevice
E/ALSALib ( 1985): external/alsa-lib/src/pcm/pcm.c:2201:
(snd_pcm_open_noupdate) Unknown PCM NULL_Device
I/AudioHardwareALSA( 1985): Initialized ALSA PLAYBACK device
NULL_Device

Luca Belluccini

unread,
Jun 3, 2009, 7:36:41 AM6/3/09
to android-porting
Solved.

Use these info as guide for ALSA on x86.
Remember to make clean!

Luca Belluccini

unread,
Jun 3, 2009, 7:40:56 AM6/3/09
to android-porting
asound.conf must be fixed:
+device 0
-device 16

crazygenie

unread,
Jun 4, 2009, 1:44:02 AM6/4/09
to android-porting
Those error messages in system startup will vanish as soon as you put
a proper asound.conf file covering all the audio controls into /system/
etc directory. One way to write a asound.conf is to look at the output
of "alsa_mixer contents" command and writing the asound.conf
accordingly.

Nimit Manglick

unread,
Jun 4, 2009, 1:50:59 AM6/4/09
to android...@googlegroups.com
I followed the steps... I checked out alsa-lib , alsa-utils and alsa_sound from android git repository.

But The system is getting crashed on start up.

the logs are :-

E/ALSALib (  691): external/alsa-lib/src/control/control.c:909:(snd_ctl_open_noupdate) Invalid CTL AndroidPlayback
E/AudioHardwareALSA(  691): Unable to attach mixer to device AndroidPlayback: No such file or directory
E/ALSALib (  691): external/alsa-lib/src/conf.c:3964:(snd_config_expand) Load defaults error: File exists
E/ALSALib (  691): external/alsa-lib/src/control/control.c:909:(snd_ctl_open_noupdate) Invalid CTL hw:00
E/AudioHardwareALSA(  691): Unable to attach mixer to device default: File exists
E/ALSALib (  691): external/alsa-lib/src/control/control.c:909:(snd_ctl_open_noupdate) Invalid CTL AndroidRecord
E/AudioHardwareALSA(  691): Unable to attach mixer to device AndroidRecord: No such file or directory
E/ALSALib (  691): external/alsa-lib/src/conf.c:3964:(snd_config_expand) Load defaults error: File exists
E/ALSALib (  691): external/alsa-lib/src/control/control.c:909:(snd_ctl_open_noupdate) Invalid CTL hw:00
E/AudioHardwareALSA(  691): Unable to attach mixer to device default: File exists


Please help me what i am misisng. ?

Thanks
Nimit

Luca Belluccini

unread,
Jun 4, 2009, 9:05:40 AM6/4/09
to android-porting
control.c @ line 909 what is trying to do?

Nimit Manglick

unread,
Jun 4, 2009, 9:23:13 AM6/4/09
to android...@googlegroups.com
Its trying to look for soem configuration settings it seems teh code snippet is as below :-

err = snd_config_search_definition(root, "ctl", name, &ctl_conf);
    if (err < 0) {
        SNDERR("Invalid CTL %s", name);
        return err;
    }

plus the error its throwing from some config.c fiel also.

Is it a problem of soem configuration file ??

Regards
Nimit

Luca Belluccini

unread,
Jun 4, 2009, 6:51:19 PM6/4/09
to android-porting
Yes. Can you post your conf? Did you placed asound.conf into /system/
etc/ ?

On 4 Giu, 15:23, Nimit Manglick <nimitandr...@gmail.com> wrote:
> Its trying to look for soem configuration settings it seems teh code snippet
> is as below :-
>
> err = snd_config_search_definition(root, "ctl", name, &ctl_conf);
>     if (err < 0) {
>         SNDERR("Invalid CTL %s", name);
>         return err;
>     }
>
> plus the error its throwing from some config.c fiel also.
>
> Is it a problem of soem configuration file ??
>
> Regards
> Nimit
>
> > > > > > Remember to make clean!- Nascondi testo citato
>
> - Mostra testo citato -

crazygenie

unread,
Jun 4, 2009, 11:26:37 PM6/4/09
to android-porting
ALSA will NOT work unless you have a valid asound.conf customized for
your audio controls.

1. Use, "alsa_amixer contents" to get the controls and their values
2. Create asound.conf based on the above result
3. Put it in /system/etc/ folder in your Android-target and check.


On Jun 4, 6:23 pm, Nimit Manglick <nimitandr...@gmail.com> wrote:
> Its trying to look for soem configuration settings it seems teh code snippet
> is as below :-
>
> err = snd_config_search_definition(root, "ctl", name, &ctl_conf);
>     if (err < 0) {
>         SNDERR("Invalid CTL %s", name);
>         return err;
>     }
>
> plus the error its throwing from some config.c fiel also.
>
> Is it a problem of soem configuration file ??
>
> Regards
> Nimit
>

Nimit Manglick

unread,
Jun 7, 2009, 4:16:48 AM6/7/09
to android...@googlegroups.com
Hi Luca,

I have checked out alsa-lib, alsa_sound from android git, and it doesn't generates any file with the name asound.conf , it generates alsa.conf in system/usr/share/alsa.conf (I cross checked Android.mk file ) which I copied in system/etc with the name asound.conf. But the system is crashing with the same logs.

Hi Ravi,


1. Use, "alsa_amixer contents" to get the controls and their values

alsa_mixer will not work as the system is not even getting UP bcoz of the crash.

2. Create asound.conf based on the above result
3. Put it in /system/etc/ folder in your Android-target and check.

I already tried with that but the system is still geting crashed.

Please find attached my alsa.conf file

Thanks & Regards
Nimit
alsa.conf

Ravishankar Haranath

unread,
Jun 7, 2009, 12:17:39 PM6/7/09
to android...@googlegroups.com
Alsa build doesn't include or create asound.conf file. You have to put one by yourself and alsa.conf is different from asound.conf. If you are sure about the alsa device files getting created with proper permissions (/dev/snd/*), you can try alsa_mixer with -c option giving card number explicitely.
--
Ravishankar Haranath
http://www.linmaya.net

We should be taught not to wait for inspiration to start a thing. Action always generates inspiration. Inspiration seldom generates action.
 - Frank Tibolt

Luca Belluccini

unread,
Jun 12, 2009, 5:03:58 AM6/12/09
to android-porting

Androidphan

unread,
Jun 12, 2009, 6:03:19 AM6/12/09
to android-porting
Typo in your manifest file, twice alsa-lib as project path.

On Jun 12, 11:03 am, Luca Belluccini <lucabellucc...@gmail.com> wrote:
> http://code.google.com/p/patch-hosting-for-android-x86-support/wiki/ALSA

Luca Belluccini

unread,
Jun 12, 2009, 8:51:20 AM6/12/09
to android-porting
ty

ehung

unread,
Jun 16, 2009, 3:22:29 AM6/16/09
to android-porting
Hi Luca.
I have follow your tips on wiki to implment alsa function.
I have built the libaudio.so, alsa_ctl, alsa_amixer and alsa_aplay on
android system.
I use a aplayer application to test the alsa function, but the audio
still not work.
Could you give me some suggestion?
Thank in advance.

Best Regards,
ehung

Androidphan

unread,
Jun 16, 2009, 3:56:53 AM6/16/09
to android-porting
If you give some more information on your soundcard, errors, logcat
etc.
We can't do anything with more information.

ehung

unread,
Jun 16, 2009, 4:52:33 AM6/16/09
to android-porting

Hi Androidphan.

I can launch alsa_aplay -l and audio card is listed.

Launching alsa_aplay file.mp3 and it tells me "unable to install hw
params".

Launching alsa_amixer -c 0, it has show some information below.
Simple mixer control 'Master' ,0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 13
[1] Segmentation fault alsa_mixer -c 0

When I set the Audible selection on settings of UI, the logcat message
will show
E/MediaPlayer: Unable to to create media player.

That's all for my test that I can do it what I know.
Could you give me some suggestion?

Thanks in advance again.
Best Regards,
ehung
> > >http://code.google.com/p/patch-hosting-for-android-x86-support/wiki/ALSA- Nascondi testo citato

Luca Belluccini

unread,
Jun 16, 2009, 6:14:38 AM6/16/09
to android-porting
E/MediaPlayer: Unable to to create media player.

It seems a MediaPlayer issue, not ALSAAudio.

Issues are at high floors =)
> > > >http://code.google.com/p/patch-hosting-for-android-x86-support/wiki/A...Nascondi testo citato

Luca Belluccini

unread,
Jun 16, 2009, 6:11:52 AM6/16/09
to android-porting
Alsa amixer will not work correcly.
Never worked.

Remember that if you built before without ALSA support, do a

$ make clean

There's something wrong in build phase: without clean libraries are
not linked correctly.

On 16 Giu, 10:52, ehung <ehung1...@gmail.com> wrote:
> > > >http://code.google.com/p/patch-hosting-for-android-x86-support/wiki/A...Nascondi testo citato

ehung

unread,
Jun 18, 2009, 11:03:41 PM6/18/09
to android-porting
Hi Luca .
Thanks your help.
I have made "make clean" and "make" again.
The libraries seems to link correctly.
Because I got the some log information about alsa before I have never
seen.
The log message is showing below.

......
I/ServiceManager( 2106): service 'media.audio_flinger' died
I/ServiceManager( 2106): service 'media.player' died
I/ServiceManager( 2106): service 'media.camera' died
W/AudioSystem( 2119): AudioFlinger server died!
W/MediaPlayer( 2300): MediaPlayer server died!
E/MediaPlayer( 2300): error (100, 0)
E/MediaPlayer( 2300): Error (100,0)
D/VideoView( 2300): Error: 100,0
I/ ( 2459): ServiceManager: 0x804ac38
D/AudioHardwareALSA( 2459): Mixer: element name: 'Master'
D/AudioHardwareALSA( 2459): Mixer: master 'Master' found.
D/AudioHardwareALSA( 2459): Mixer: route 'Master' found.
D/AudioHardwareALSA( 2459): Mixer: route 'Master' found.
D/AudioHardwareALSA( 2459): Mixer: route 'Bluetooth' not found.
D/AudioHardwareALSA( 2459): Mixer: route 'Master' found.
D/AudioHardwareALSA( 2459): Mixer: route 'Bluetooth A2DP' not found.
D/AudioHardwareALSA( 2459): Mixer: element name: 'Front Mic Boost'
D/AudioHardwareALSA( 2459): Mixer: element name: 'Mic Boost'
D/AudioHardwareALSA( 2459): Mixer: element name: 'Capture'
D/AudioHardwareALSA( 2459): Mixer: master 'Capture' found.
D/AudioHardwareALSA( 2459): Mixer: route 'Capture' found.
D/AudioHardwareALSA( 2459): Mixer: route '' not found.
D/AudioHardwareALSA( 2459): Mixer: route 'Bluetooth Capture' not
found.
D/AudioHardwareALSA( 2459): Mixer: route 'Capture' found.
D/AudioHardwareALSA( 2459): Mixer: route 'Bluetooth A2DP Capture' not
found.
D/AudioHardwareALSA( 2459): mixer initialized.
E/ALSALib ( 2459): external/alsa-lib/src/control/setup.c:555:
(add_elem) Cannot obtain info for CTL elem (MIXER,'Line-Out Playback
Volume',0,0,0): No such file or directory
E/ALSALib ( 2459): external/alsa-lib/src/pcm/pcm_hw.c:1445:
(_snd_pcm_hw_open) Invalid type for subdevice
E/ALSALib ( 2459): external/alsa-lib/src/pcm/pcm.c:2201:
(snd_pcm_open_noupdate) Unknown PCM NULL_Device
I/AudioHardwareALSA( 2459): Initialized ALSA PLAYBACK device
NULL_Device
W/AudioHardwareALSA( 2459): AudioMixer expects two channels, but only
-1 found!
W/AudioHardwareALSA( 2459): AudioMixer expects two channels, but only
-1 found!
E/ALSALib ( 2459): external/alsa-lib/src/control/setup.c:555:
(add_elem) Cannot obtain info for CTL elem (MIXER,'Line-Out Playback
Volume',0,0,0): No such file or directory
E/ALSALib ( 2459): external/alsa-lib/src/control/setup.c:555:
(add_elem) Cannot obtain info for CTL elem (MIXER,'Line-Out Playback
Volume',0,0,0): No such file or directory
I/AudioFlinger( 2459): AudioFlinger's thread ready to run for output 0
E/ALSALib ( 2459): external/alsa-lib/src/control/setup.c:555:
(add_elem) Cannot obtain info for CTL elem (MIXER,'Line-Out Playback
Volume',0,0,0): No such file or directory
E/ALSALib ( 2459): external/alsa-lib/src/pcm/pcm_hw.c:1445:
(_snd_pcm_hw_open) Invalid type for subdevice
E/ALSALib ( 2459): external/alsa-lib/src/pcm/pcm.c:2201:
(snd_pcm_open_noupdate) Unknown PCM NULL_Device
I/AudioHardwareALSA( 2459): Initialized ALSA PLAYBACK device
NULL_Device
I/CameraService( 2459): CameraService started: pid=2459
E/AudioService( 2119): Media server died.
E/AudioService( 2119): Media server started.
.....

I got the some error.
Could you give me some suggestion about that?
Sorry to trouble you again.
Thanks in advance.

Best Regards,
ehung
> > > > >http://code.google.com/p/patch-hosting-for-android-x86-support/wiki/A...testo citato
>
> > > - Mostra testo citato -- Nascondi testo citato

Luca Belluccini

unread,
Jun 19, 2009, 5:03:55 AM6/19/09
to android-porting
Exactly what happened to me:
I have been struggling on it for 2 weeks!

A very strange error happened: it was printing an error but not
printing a test printf I placed in a code section which MUST be
executed.
> > > > > >http://code.google.com/p/patch-hosting-for-android-x86-support/wiki/A...citato

ehung

unread,
Jun 23, 2009, 4:20:37 AM6/23/09
to android-porting

Hi Luca .
Sorry to bother you again.
My sound still not work.
I has used alsa_aplay command to play a mp3 file or wav file but it
doesn't work.

# alas_aplay -f cd /data/123.mp3
# Playing raw data '/data/123.mp3': signed 16 bit Little Endian, Rate
44100 Hz, Stereo.

And launching alsa_amixer -c 0, it still has show Segmentation fault.
Simple mixer control 'Master' ,0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 13
[1] Segmentation fault alsa_mixer -c 0

Could you give me a hint for that?
Thank in advance.

Best regards,
ehung


On 6月19日, 下午5時03分, Luca Belluccini <lucabellucc...@gmail.com> wrote:
> Exactly what happened to me:
> I have been struggling on it for 2 weeks!
>
> A very strange error happened: it was printing an error but not
> printing a test printf I placed in a code section which MUST be
> executed.
>
> On 19 Giu, 05:03, ehung <ehung1...@gmail.com> wrote:
>
>
>
> > Hi Luca .
> > Thanks your help.
> > I have made "make clean" and "make" again.
> > The libraries seems to link correctly.
> > Because I got the some log information aboutalsabefore I have never
> > I/AudioHardwareALSA( 2459): InitializedALSAPLAYBACK device
> > NULL_Device
> > W/AudioHardwareALSA( 2459): AudioMixer expects two channels, but only
> > -1 found!
> > W/AudioHardwareALSA( 2459): AudioMixer expects two channels, but only
> > -1 found!
> > E/ALSALib ( 2459): external/alsa-lib/src/control/setup.c:555:
> > (add_elem) Cannot obtain info for CTL elem (MIXER,'Line-Out Playback
> > Volume',0,0,0): No such file or directory
> > E/ALSALib ( 2459): external/alsa-lib/src/control/setup.c:555:
> > (add_elem) Cannot obtain info for CTL elem (MIXER,'Line-Out Playback
> > Volume',0,0,0): No such file or directory
> > I/AudioFlinger( 2459): AudioFlinger's thread ready to run for output 0
> > E/ALSALib ( 2459): external/alsa-lib/src/control/setup.c:555:
> > (add_elem) Cannot obtain info for CTL elem (MIXER,'Line-Out Playback
> > Volume',0,0,0): No such file or directory
> > E/ALSALib ( 2459): external/alsa-lib/src/pcm/pcm_hw.c:1445:
> > (_snd_pcm_hw_open) Invalid type for subdevice
> > E/ALSALib ( 2459): external/alsa-lib/src/pcm/pcm.c:2201:
> > (snd_pcm_open_noupdate) Unknown PCM NULL_Device
> > I/AudioHardwareALSA( 2459): InitializedALSAPLAYBACK device
> > NULL_Device
> > I/CameraService( 2459): CameraService started: pid=2459
> > E/AudioService( 2119): Media server died.
> > E/AudioService( 2119): Media server started.
> > .....
>
> > I got the some error.
> > Could you give me some suggestion about that?
> > Sorry to trouble you again.
> > Thanks in advance.
>
> > Best Regards,
> > ehung
>
> > On 16 Giu, 18:11, Luca Belluccini <lucabellucc...@gmail.com> wrote:
>
> > >Alsaamixer will not work correcly.
> > > Never worked.
>
> > > Remember that if you built before withoutALSAsupport, do a
> > > > > > I use a aplayer application to test thealsafunction, but the audio
> > > > > > still not work.
> > > > > > Could you give me some suggestion?
> > > > > > Thank in advance.
>
> > > > > > Best Regards,
> > > > > > ehung
>
> > > > > > On 12 Giu, 17:03, Luca Belluccini <lucabellucc...@gmail.com> wrote:
>
> > > > > > >http://code.google.com/p/patch-hosting-for-android-x86-support/wiki/A...
>
> > > > > - Mostra testo citato -- Nascondi testo citato
>
> > > - Mostra testo citato -- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

xro

unread,
Jun 23, 2009, 5:07:13 AM6/23/09
to android-porting
my sound works but i havent a good buffer size...

that what i did...

cd ~/mydroid/external
git clone git://android.git.k# chmod 0666 /dev/binder
# chmod 0666 /dev/ashmemernel.org/platform/external/alsa-lib.git
git clone git://android.git.kernel.org/platform/external/alsa-utils.git
cd ~/mydroid/hardware
git clone git://android.git.kernel.org/platform/hardware/alsa_sound.git
gedit ~/mydroid/build/target/board/generic/BoardConfig.mk
# BOARD_USES_GENERIC_AUDIO := false
# HAVE_HTC_AUDIO_DRIVER := false
BOARD_USES_ALSA_AUDIO := true
BUILD_WITH_ALSA_UTILS=true

cd ~/mydroid
make

Ravishankar Haranath

unread,
Jun 23, 2009, 10:11:26 AM6/23/09
to android...@googlegroups.com
One wild guess is alsa_amixer might be segfaulting because of lack of ncurses support (Not sure though). Default argument to alsa_amixer is 'controls' which should show up an ncurses based interface.
But, it should not prevent ALSA from working properly. Double check your asound.conf, if you believe it is perfect, your Music player should respond :-)

2009/6/23 ehung <ehun...@gmail.com>

Luca Belluccini

unread,
Jun 24, 2009, 3:40:46 AM6/24/09
to android-porting
Both alsa_amixer and alsa_play will not work.
I did not investigated about it, but the business is to get the card
recognized correctly by the ALSA layer.
Once you are sure of that and placed a first "stub" of alsa.conf, at
bootup you should see something in logcat notifying what is working
and if there are issues.

On 23 Giu, 16:11, Ravishankar Haranath <rav...@gmail.com> wrote:
> One wild guess is alsa_amixer might be segfaulting because of lack of
> ncurses support (Not sure though). Default argument to alsa_amixer is
> 'controls' which should show up an ncurses based interface.
> But, it should not prevent ALSA from working properly. Double check your
> asound.conf, if you believe it is perfect, your Music player should respond
> :-)
>
> 2009/6/23 ehung <ehung1...@gmail.com>
Reply all
Reply to author
Forward
0 new messages