This issue's reason is the /dev/snd/* device nodes permission.
Android access the audio device by the audio group.
So change the /dev/snd/* nodes as audio group.
Can add some lines to init.rc to fixed it:
# workaround to resolve current permission issue
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
or add some lines to "devperms" at the system/core/init/devices.c.
-----------------------------------
Ying RongJun China
On Apr 6, 9:00 pm, Harishkumar V <[email protected]> wrote:
> Hi,
>
> Even i am also facing the same error with the new android source after
> making repo sync.
> The alsa-lib and alsa_sound are also new ones checked out from git.
>
> the "dev/snd" are created. /proc/asound exists.
>
> i also copied the sample asound.conf to /system/etc/.
> Even given the permissions.
>
> D/AndroidRuntime( 706):
> D/AndroidRuntime( 706): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
> D/AndroidRuntime( 706): CheckJNI is ON
> I/ ( 707): ServiceManager: 0xac38
> E/AudioHardwareALSA( 707): Unable to attach mixer to device
> AndroidPlayback: Permission denied
> E/AudioHardwareALSA( 707): Unable to attach mixer to device default: No
> such file or directory
> E/AudioHardwareALSA( 707): Unable to attach mixer to device AndroidRecord:
> Permission denied
> E/AudioHardwareALSA( 707): Unable to attach mixer to device default: No
> such file or directory
> I/DEBUG ( 704): *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> *** ***
> I/DEBUG ( 704): Build fingerprint:
> 'generic/generic/generic/:1.5/CUPCAKE/eng.root.20090406.193434:eng/test-keys'
> I/DEBUG ( 704): pid: 707, tid: 707 >>> /system/bin/mediaserver <<<
> I/DEBUG ( 704): signal 11 (SIGSEGV), fault addr 00000010
> I/DEBUG ( 704): r0 00000000 r1 ab78c8e4 r2 00000000 r3 00000000
> I/DEBUG ( 704): r4 ab79d120 r5 0000ad68 r6 be9d0a10 r7 ab01acd8
> I/DEBUG ( 704): r8 0000b228 r9 00000000 10 ab79cd80 fp be9d0ab4
> I/DEBUG ( 704): ip 0000ad90 sp be9d0a08 lr ab71d324 pc ab746ce8 cpsr
> 00000010
>
> Thanks and Regards,
> HarishKumar.V
>
> On Mon, Apr 6, 2009 at 5:12 PM, Androidphan <[email protected]> wrote:
>
> > I use the Alsa Lib from the git repository. It's still from before the
> > big merge.
> > I still can't get it to work. Does it really need an asound.conf ?
>
> > When are the alsa-utils commited to the repository? I can't build it
> > decently for x86. Anyone has a decent Android makefile for this?
>
> > On 1 apr, 16:23, Michael Trimarchi <[email protected]> wrote:
> > > Hi,
>
> > > Androidphan wrote:
> > > > Something is wrong with my asound.conf I guess.
>
> > > > If I just put this in my asound.conf:
> > > > ctl.AndroidPlayback {
> > > > type hw
> > > > card 0
> > > > }
>
> > > > ctl.AndroidRecord {
> > > > type hw
> > > > card 0
> > > > }
>
> > > > I'm now getting:
>
> > > > E/AudioHardwareALSA( 2162): Unable to attach mixer to device
> > > > AndroidPlayback: Permission denied
> > > > E/AudioHardwareALSA( 2162): Unable to attach mixer to device default:
> > > > No such file or directory
> > > > E/AudioHardwareALSA( 2162): Unable to attach mixer to device
> > > > AndroidRecord: Permission denied
> > > > E/AudioHardwareALSA( 2162): Unable to attach mixer to device default:
> > > > No such file or directory
>
> > > > Then when setting the correct file permissions it goes further. Still
> > > > not booting through though.
>
> > > > On 1 apr, 16:07, Michael Trimarchi <[email protected]> wrote:
>
> > > I had a crash in mediaserver because compilation flags of thealsa-lib
> > > don't match
> > > the compilation flag of AudioHardwareAlsa so it recevice a segmentation
> > > fault
> > > accessing a struct with an invalid offset. So when I ask the frame
> > > stack, it's
> > > just to know if I can exclude this situation.
>
> > > What version do you use of the two packages?
>
> > > Michael
>
>
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---