[android-porting] Re: why in emulator, "/dev/eac" is connected with the audio?
On Sat, Apr 18, 2009 at 9:02 AM, max wrote: > > Hi David, > > Thanks for your reply. > > When I study the code in frameworks\base\libs\audioflinger > \AudioHardwareGeneric.cpp, I saw it does open the device node "dev/ > eac" to get a File descriptor. Therefore , the question is how "/dev/ > eac" is connected with the host linux's sound system. I have read the > code in external/qemu/hw/goldfish_audio.c, but I still can not figure > out how the device node "/dev/eac" in emulator's linux system is > connected with host linux's sound system. > the /dev/eac device node is supported by the emulator-specific kernel code located here: http://android.git.kernel.org/?p=kernel/common.git;a=blob;f=arch/arm/mach-goldfish/audio.c;h=c7973e70a114a08dcc57af954223acdfaec3b49e;hb=android-goldfish-2.6.29 it is used to send/receive sound samples by reading/writing various i/o memory registers. this is emulated/supported by the emulator source file "goldfish_audio.c", see: http://android.git.kernel.org/?p=platform/external/qemu.git;a=blob;f=hw/goldfish_audio.c;h=d0a44b564c29364a884ffd091088a25933ea2da4;hb=2b8ea29e2bd12f876a4d06647e6077bf72de567e which itselfs uses the QEMU audio sound-system (located in external/qemu/audio) which is actually rather complex, but described by the light documentation I wrote for it here: http://android.git.kernel.org/?p=platform/external/qemu.git;a=blob;f=docs/AUDIO.TXT;h=71ec288ef950aee341e3469f3a5520fd83b4a8a2;hb=2b8ea29e2bd12f876a4d06647e6077bf72de567e external/qemu/audio contains several "audio backends" that communicate with the host sound system, for example: coreaudio.c for OS X windaudio.c for Win32 esdaudio.c for EsounD on Linux alsaaudio.c for ALSA on Linux etc... so what happens when generating sound output is: AudioFlinger -> /dev/eac -> kernel (mach-goldfish/audio.c) -> emulator (external/qemu/goldfish_audio.c -> QEMU audio sub-system -> system-specific audio backend) -> system sound API Hope this helps > > Thanks > > On Apr 17, 5:48 pm, David Turner wrote: > > On Fri, Apr 17, 2009 at 10:51 AM, max wrote: > > > > > Hi Buddies, > > > > > I wanna get understood that why in emulator "dev/eac" is the device of > > > audio, > > > > historical reason, but mostly because that's what the emulator-specific > > kernel supports > > > > > > > > > as I know, in external/qemu/audio, there is all kinds audio drivers, > > > such as oss, alsa, > > > > these are only used to send audio output to the host sound system, this > has > > nothing > > to do with what is supported in the emulated system. These are not > 'drivers' > > by the way, > > just usual call to sound libraries / system interfaces > > > > you can have a look at external/qemu/hw/goldfish_audio.c to see the code > > used to > > support sound hardware emulation in Android > > > > > > > > > > > > > but I am very curious why in the android linux system, the "dev/eac" > > > is connected with those drivers. > > > > > Anybody can give me some light on that? > > > > > Max- Hide quoted text - > > > > - Show quoted text - > > > --~--~-~--~~~---~--~~ unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~--~~~~--~~--~--~---
[android-porting] Re: why in emulator, "/dev/eac" is connected with the audio?
hi Max have you find the answer? how "/dev/eac" is connected with host linux's sound system? I am trying to add my own device driver to android On Apr 18, 4:02 pm, max wrote: > Hi David, > > Thanks for your reply. > > When I study the code in frameworks\base\libs\audioflinger > \AudioHardwareGeneric.cpp, I saw it does open the device node "dev/ > eac" to get a File descriptor. Therefore , the question is how "/dev/ > eac" is connected with the host linux's sound system. I have read the > code in external/qemu/hw/goldfish_audio.c, but I still can not figure > out how the device node "/dev/eac" in emulator's linux system is > connected with host linux's sound system. > > Thanks > > On Apr 17, 5:48 pm, David Turner wrote: > > > > > On Fri, Apr 17, 2009 at 10:51 AM, max wrote: > > > > Hi Buddies, > > > > I wanna get understood that why in emulator "dev/eac" is the device of > > > audio, > > > historical reason, but mostly because that's what the emulator-specific > > kernel supports > > > > as I know, in external/qemu/audio, there is all kinds audio drivers, > > > such as oss, alsa, > > > these are only used to send audio output to the host sound system, this has > > nothing > > to do with what is supported in the emulated system. These are not 'drivers' > > by the way, > > just usual call to sound libraries / system interfaces > > > you can have a look at external/qemu/hw/goldfish_audio.c to see the code > > used to > > support sound hardware emulation in Android > > > > but I am very curious why in the android linux system, the "dev/eac" > > > is connected with those drivers. > > > > Anybody can give me some light on that? > > > > Max- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~--~~~~--~~--~--~---
[android-porting] Re: why in emulator, "/dev/eac" is connected with the audio?
Hi David, Thanks for your reply. When I study the code in frameworks\base\libs\audioflinger \AudioHardwareGeneric.cpp, I saw it does open the device node "dev/ eac" to get a File descriptor. Therefore , the question is how "/dev/ eac" is connected with the host linux's sound system. I have read the code in external/qemu/hw/goldfish_audio.c, but I still can not figure out how the device node "/dev/eac" in emulator's linux system is connected with host linux's sound system. Thanks On Apr 17, 5:48 pm, David Turner wrote: > On Fri, Apr 17, 2009 at 10:51 AM, max wrote: > > > Hi Buddies, > > > I wanna get understood that why in emulator "dev/eac" is the device of > > audio, > > historical reason, but mostly because that's what the emulator-specific > kernel supports > > > > > as I know, in external/qemu/audio, there is all kinds audio drivers, > > such as oss, alsa, > > these are only used to send audio output to the host sound system, this has > nothing > to do with what is supported in the emulated system. These are not 'drivers' > by the way, > just usual call to sound libraries / system interfaces > > you can have a look at external/qemu/hw/goldfish_audio.c to see the code > used to > support sound hardware emulation in Android > > > > > > > but I am very curious why in the android linux system, the "dev/eac" > > is connected with those drivers. > > > Anybody can give me some light on that? > > > Max- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~--~~~~--~~--~--~---
[android-porting] Re: why in emulator, "/dev/eac" is connected with the audio?
On Fri, Apr 17, 2009 at 10:51 AM, max wrote: > > Hi Buddies, > > I wanna get understood that why in emulator "dev/eac" is the device of > audio, > historical reason, but mostly because that's what the emulator-specific kernel supports > > as I know, in external/qemu/audio, there is all kinds audio drivers, > such as oss, alsa, > these are only used to send audio output to the host sound system, this has nothing to do with what is supported in the emulated system. These are not 'drivers' by the way, just usual call to sound libraries / system interfaces you can have a look at external/qemu/hw/goldfish_audio.c to see the code used to support sound hardware emulation in Android > > but I am very curious why in the android linux system, the "dev/eac" > is connected with those drivers. > > Anybody can give me some light on that? > > Max > > > --~--~-~--~~~---~--~~ unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~--~~~~--~~--~--~---