X86 ALSA Sound Issue

by Skuld » Fri, 17 Apr 2009 15:43:26 GMT


Sponsored Links
 i All:

I port to alsa-sound alsa-lib on X86 system and I use alas_ctl produce
asound.conf to /system/etc/.

When I tried to play Music Player on Android system, time line of
music player isn't correct and it can't play audio.
How to fix it? Thank you..

I modified init.rc file and add following .

# change permissions for alsa nodes
symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
symlink /dev/snd/controlC0 /dev/controlC0
symlink /dev/snd/timer /dev/timer
chmod 0777 /dev/pcmC0D0c
chmod 0777 /dev/pcmC0D0p
chmod 0777 /dev/controlC0
chmod 0777 /dev/timer
chmod 0666 /dev/binder
chmod 0666 /dev/ashmem
#following are new lines
chown root audio /dev/snd/controlC0
chown root audio /dev/snd/pcmC0D0c
chown root audio /dev/snd/pcmC0D0p
chown root audio /dev/snd/timer



Following Error log:

========================================================
E/AudioService( 2111): Media server died.
I/ServiceManager( 2111): Waiting for sevice media.audio_flinger...
I/ServiceManager( 2241): Waiting for sevice media.player...
I/ServiceManager( 2111): Waiting for sevice media.audio_flinger...
I/ServiceManager( 2241): Waiting for sevice media.player...
E/MountListener( 2111): Failed to connect to vold
E/MountListener( 2111): java.lang.IllegalStateException
E/MountListener( 2111): at
com.android.server.MountListener.listenToSocket(MountListener.java:
253)
E/MountListener( 2111): at com.android.server.MountListener.run
(MountListener.java:273)
E/MountListener( 2111): at java.lang.Thread.run(Thread.java:1058)
I/ServiceManager( 2111): Waiting for sevice media.audio_flinger...
I/ServiceManager( 2241): Waiting for sevice media.player...
I/ ( 2323): ServiceManager: 0x804ac38
E/ALSALib ( 2323): external/alsa-lib/src/control/control.c:909:
(snd_ctl_open_noupdate) Invalid CTL AndroidPlayback
E/AudioHardwareALSA( 2323): Unable to attach mixer to device
AndroidPlayback: No such file or directory
E/ALSALib ( 2323): external/alsa-lib/src/control/control.c:909:
(snd_ctl_open_noupdate) Invalid CTL AndroidRecord
E/AudioHardwareALSA( 2323): Unable to attach mixer to device
AndroidRecord: No such file or directory
D/AudioHardwareALSA( 2323): Mixer: element name: 'Master'
D/AudioHardwareALSA( 2323): Mixer: element name: 'Front'
D/AudioHardwareALSA( 2323): Mixer: element name: 'Front Mic'
D/AudioHardwareALSA( 2323): Mixer: element name: 'Front Mic Boost'
D/AudioHardwareALSA( 2323): Mixer: master 'PCM' not found.
D/AudioHardwareALSA( 2323): Mixer: route 'Earpiece' not found.
D/AudioHardwareALSA( 2323): Mixer: route 'Speaker' not found.
D/AudioHardwareALSA( 2323): Mixer: route 'Bluetooth' not found.
D/AudioHardwareALSA( 2323): Mixer: route 'Headphone' not found.
D/AudioHardwareALSA( 2323): Mixer: route 'Bluetooth A2DP' not found.
D/AudioHardwareALSA( 2323): Mixer: element name: 'Front Mic Boost'
D/AudioHardwareALSA( 2323): Mixer: element name: 'Capture'
D/AudioHardwareALSA( 2323): Mixer: master 'Capture' found.
D/AudioHardwareALSA( 2323): Mixer: route 'Capture' found.
D/AudioHardwareALSA( 2323): Mixer: route '' not found.
D/AudioHardwareALSA( 2323): Mixer: route 'Bluetooth Capture' not
found.
D/AudioHardwareALSA( 2323): Mixer: route 'Capture' found.
D/AudioHardwareALSA( 2323): Mixer: route 'Bluetooth A2DP Capture' not
found.
D/AudioHardwareALSA( 2323): mixer initialized.
E/ALSALib (



X86 ALSA Sound Issue

by Luca Belluccini » Fri, 17 Apr 2009 16:11:42 GMT


 id you build with the last source code?

On Apr 17, 9:43am, Skuld <skul...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


X86 ALSA Sound Issue

by Skuld » Fri, 17 Apr 2009 16:42:34 GMT


 i Luca:

Yes , I build with lastest source code.

On 47 41 Luca Belluccini <lucabellucc...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



X86 ALSA Sound Issue

by RongJun Ying » Fri, 17 Apr 2009 18:02:54 GMT


 erify your asound.conf :

ctl.AndroidPlayback ...
---------------------------
Ying RongJun China

2009/4/17 Skuld <skul...@gmail.com>


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



X86 ALSA Sound Issue

by Luca Belluccini » Fri, 17 Apr 2009 19:57:46 GMT


 an you post your asound.conf ? I am using this one.
I don't know it it works... I am working on a eeepc 701.
Btw... You just modified the USES_ALSA_AUDIO... in mk file and added
the lines in init.rc (and moved asound.conf in the right place), isn't
it?
Tonight I'll try to copy a song in sd partition.

asound.conf ===================================================

# Android ALSA configuration file for OMAP2430SDP using the MXC audio.
##
## Mixer Devices
##
ctl.AndroidPlayback {
type hw
card 0
}
ctl.AndroidRecord {
type hw
card 0
}
##
## Playback Devices
##
pcm.AndroidPlayback_Speaker {
type hooks
slave.pcm {
type hw
card 0
device 0 # Must be of type "digital audio
playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{
name "Master codec configure Switch"
lock false
preserve true
optional false
value true
}
{
name "Master codec Sample Rate"
lock false
preserve true
optional true
value 48000
}
{
name "Playback Source"
lock false
preserve true
optional false
# Values are:
# 0 - 'Stereo Headset'
# 1 - 'Hands-free (Speakers)'
# 2 - 'Mono Handset'
# 3 'USB CarKit'
value 'Hands-free (Speakers)'
}
]
}
}
pcm.AndroidPlayback_Headset {
type hooks
slave.pcm {
type hw
card 0
device 0 # Must be of type "digital audio
playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio output from the DSP
{
name "Master codec configure Switch"
value true
}
{
name "Master codec Sample Rate"
value 48000
}
{
name "Playback Source"
value 'Stereo Headset'
}
]
}
}
pcm.AndroidPlayback_Earpiece {
type hooks
slave.pcm {
type hw
card 0
device 0 # Must be of type "digital audio
playback"
}
hooks.0 {
type ctl_elems
hook_args [
# Enable audio outp



X86 ALSA Sound Issue

by Androidphan » Fri, 17 Apr 2009 20:27:09 GMT


  finally got my sound working. I tested it outside Android with
aplay. Alsa-utils can be downloaden now from the Android repository. I
used alsactl store in Ubuntu to get an asound.state. With the values
from that file I created my own asound.conf. It looks a lot like the
one in my alsa thread.

On 17 apr, 13:57, Luca Belluccini <lucabellucc...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



X86 ALSA Sound Issue

by Luca Belluccini » Fri, 17 Apr 2009 20:57:15 GMT


 ongratulations!

Could you post your asound.conf, just to see it and understand
correctly its structure?
Mediaplayer is working?

On 17 Apr, 14:26, Androidphan <niels.kee...@tass.nl> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



X86 ALSA Sound Issue

by Androidphan » Fri, 17 Apr 2009 22:45:01 GMT


 y asound.conf can be found here:
http://pastebin.com/f41e6b204

I also added the following to init.rc :
setprop alsa.mixer.playback.master Front
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

I don't know how to play video files yet, haven't tried actually.
But I ran Mediascanner from Dev tools, then it found my mp3 inside
'Music' and that played well.

On 17 apr, 14:56, Luca Belluccini <lucabellucc...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



X86 ALSA Sound Issue

by Luca Belluccini » Fri, 17 Apr 2009 23:27:34 GMT


 hanks! I'm preparing a ubuntu live for getting all alsa controls.

On 17 Apr, 16:44, Androidphan <niels.kee...@tass.nl> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



X86 ALSA Sound Issue

by Androidphan » Sat, 18 Apr 2009 00:58:09 GMT


 t probably is possible to add alsa-utils to your local_manifest and
put BUILD_WITH_ALSA_UTILS := true inside your BoardConfig.mk and then
run alsa_ctl.

On Apr 17, 5:27 pm, Luca Belluccini <lucabellucc...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



X86 ALSA Sound Issue

by Luca Belluccini » Sat, 18 Apr 2009 02:24:10 GMT


 here's only asound...

On 17 Apr, 18:57, Androidphan <niels.kee...@tass.nl> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



X86 ALSA Sound Issue

by Luca Belluccini » Sat, 18 Apr 2009 02:28:21 GMT


 k i see them ... Sorry :D

On 17 Apr, 18:57, Androidphan <niels.kee...@tass.nl> wrote:
--~--~---------~--~----~------------~-------~--~----~



X86 ALSA Sound Issue

by dmoti » Tue, 21 Apr 2009 22:52:36 GMT


 i people,
I followed this discussion and I'm trying to do what you did and
I just need the configure line you used for both alsa-lib and alsa-
utils

thanks,
-md

On Apr 17, 9:28 pm, Luca Belluccini <lucabellucc...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



X86 ALSA Sound Issue

by Androidphan » Wed, 22 Apr 2009 15:28:58 GMT


  just downloaded the alsa-lib and alsa-utils with repo, you need to
download it with a local_manifest file.
Then turn on BOARD_USES_ALSA_AUDIO := true and
BUILD_WITH_ALSA_UTILS := true at asus/eee_701/BoardConfig.mk.

Then it builds Android with the alsa library and the alsa utils. Then
you need a proper asound.conf to get your sound working.

On Apr 21, 4:52pm, dmoti <moti.dan...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



X86 ALSA Sound Issue

by dmoti » Wed, 22 Apr 2009 19:59:10 GMT


 hanks!
I did it with this local_manifest.xml:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="platform/vendor/asus/eee_701" path="vendor/asus/
eee_701"/>
<project name="platform/external/alsa-lib" path="external/alsa-lib"/>
<project name="platform/external/alsa-utils" path="external/alsa-
utils"/>
</manifest>

it took me a while to figure it out so I'm puting it here for future
generations :-)

it synced OK but when I build it I got this:

make: *** No rule to make target `out/target/product/eee_701/obj/lib/
libaudio.so', needed by `out/target/product/eee_701/obj/EXECUTABLES/
alsa_amixer_intermediates/LINKED/alsa_amixer'. Stop.


any ideas?

On Apr 22, 10:28am, Androidphan <niels.kee...@tass.nl> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. "Discard" button in Compose screen of Google Mail

Am I the only user who has typed a long and important email in Google
Mail on my G1 and then touched "Discard" by accident, thus losing the
whole text with no chance of recovering it? How can I contact Google's
developers to ask them to remove the "Discard" button from the screen?
Grrr!

--~--~---------~--~----~------------~-------~--~----~

2. Camera app in Sprint htc phone

There is a camera app on the phone but PackageManager does not list
it.
Has anyone tried to use this app in their application?
~Tushar

--~--~---------~--~----~------------~-------~--~----~

3. 3D performance/capabilities of current Android handsets.

4. setContentView - new

5. Help me: My emulator reported an error that "com.android.settings has no certificates at entry AndroidManifest.xml"

6. Ice for Android.How to connect via IceSSL plugin?

7. Not able to connect device using adb -d shell command from vista