Hi Sean, On Nov 27, 11:01 am, Sean McNeil <[EMAIL PROTECTED]> wrote: > There are a few things you can check: > > 1) Make sure you have an ALSA audio device enabled in your kernel. > 2) Check from a shell if the directory /dev/snd is created and if there > is anything in it. > 3) Provide your /system/etc/asound.conf file that you are using to > describe the audio devices.
Yes, I have all that. The TWL4030 device is discovered at boot time by the kernel, and the corresponding devices are created in the /dev/snd directory (with correct permissions). The asound.conf file is included in the system, in its correct location (/system/etc/). As suggested by Sangsu, I will try aplay, but I don't have much hope. Could you give more information about the ALSA driver you're using? Do you have the mixer device called "T2 Master codec configure Switch" defined in the sound/arm/omap/omap-alsa-twl4030-mixer.c file? I don't, but I do have a "T2 Master codec Sample Rate" for example. Thanks, - Maxime > > Sean > > mvniekerk wrote: > > Wow, you got that far. I followed the instructions as posted above and > > the hardware throws out the following: > > > E/ALSALib ( 1610): external/alsa-lib/src/control/control.c:909: > > (snd_ctl_open_noupdate) Invalid CTL AndroidPlayback > > > E/AudioHardwareALSA( 1610): Unable to attach mixer to device > > AndroidPlayback: No such file or directory > > > E/ALSALib ( 1610): external/alsa-lib/src/control/control.c:909: > > (snd_ctl_open_noupdate) Invalid CTL hw:00 > > > E/AudioHardwareALSA( 1610): Unable to attach mixer to device default: > > No such file or directory > > > E/ALSALib ( 1610): external/alsa-lib/src/control/control.c:909: > > (snd_ctl_open_noupdate) Invalid CTL AndroidRecord > > > E/AudioHardwareALSA( 1610): Unable to attach mixer to device > > AndroidRecord: No such file or directory > > > E/ALSALib ( 1610): external/alsa-lib/src/control/control.c:909: > > (snd_ctl_open_noupdate) Invalid CTL hw:00 > > > E/AudioHardwareALSA( 1610): Unable to attach mixer to device default: > > No such file or directory > > > Is this missing files and/or wrong permissions? > > This is code running from git code updated yesterday (26 Nov). All the > > device files are listed at /dev/snd and /proc/asound is populated with > > the right files. /etc/asound.conf is there with the right device names > > (e.g. I've changed card TWL4030 to 0 and also tried MXC). > > > Please be so kind and attach your asound.conf file. > > > On Nov 27, 11:09 am, Maxime Petazzoni <[EMAIL PROTECTED]> > > wrote: > > >> Hi, > > >> I tried putting it all together. The end system has the device nodes > >> in the correct place with valid permissions, and I even get some > >> promising debug messages. But if I try to play any sound or change the > >> volume, the AudioFlinger service crashes (and is restarted endlessly). > >> And of course, no sound is produced. Apparently, it's looking for a > >> mixer device that does not exist : > > >> D/AudioHardwareALSA( 665): mixer initialized. > >> E/ALSALib ( 665): external/alsa-lib/src/pcm/pcm.c:2144: > >> (snd_pcm_open_noupdate) Unknown PCM AndroidPlayback > >> E/ALSALib ( 665): external/alsa-lib/src/pcm/pcm.c:2144: > >> (snd_pcm_open_noupdate) Unknown PCM AndroidPlayback > >> E/ALSALib ( 665): external/alsa-lib/src/pcm/pcm.c:2144: > >> (snd_pcm_open_noupdate) Unknown PCM AndroidPlayback > >> I/AudioHardwareALSA( 665): Initialized ALSA PLAYBACK device > >> AndroidPlayback > >> D/AudioHardwareALSA( 665): Set PLAYBACK PCM format to S16_LE (Signed > >> 16 bit Little Endian) > >> D/AudioHardwareALSA( 665): Using 2 channels for PLAYBACK. > >> D/AudioHardwareALSA( 665): Set PLAYBACK sample rate to 44100 HZ > >> E/ALSALib ( 665): external/alsa-lib/src/pcm/pcm.c:2144: > >> (snd_pcm_open_noupdate) Unknown PCM AndroidPlayback_Speaker_normal > >> E/ALSALib ( 665): external/alsa-lib/src/control/setup.c:555: > >> (add_elem) Cannot obtain info for CTL elem (MIXER,'T2 Master codec > >> configure Switch',0,0,0) > >> E/ALSALib ( 665): external/alsa-lib/src/pcm/pcm.c:2144: > >> (snd_pcm_open_noupdate) Unknown PCM AndroidPlayback > >> I/AudioHardwareALSA( 665): Initialized ALSA PLAYBACK device > >> AndroidPlayback > >> D/AudioHardwareALSA( 665): Set PLAYBACK PCM format to S16_LE (Signed > >> 16 bit Little Endian) > >> D/AudioHardwareALSA( 665): Using 2 channels for PLAYBACK. > >> D/AudioHardwareALSA( 665): Set PLAYBACK sample rate to 44100 HZ > >> W/AudioFlinger( 813): write blocked for 179 > >> msecs > >> W/AudioFlinger( 813): write blocked for 55 > >> msecs > >> D/VolumePanel( 684): onVolumeChanged(streamType: 3, flags: > >> 17) > >> D/VolumePanel( 684): onShowVolumeChanged(streamType: 3, flags: 17), > >> index: > >> 12 > >> I/DEBUG ( 662): *** *** *** *** *** *** *** *** *** *** *** *** *** > >> *** *** > >> *** > >> I/DEBUG ( 662): Build fingerprint: 'generic/omap/omap/:1.0/MVA-RC1/ > >> eng.mpetazzoni.20081126.111057:eng/test- > >> keys' > >> I/DEBUG ( 662): pid: 665, tid: 680 >>> /system/bin/mediaserver > >> <<< > >> I/DEBUG ( 662): signal 11 (SIGSEGV), fault addr > >> 00000000 > > >> Could that be related to a mismatched ALSA driver for the TWL4030? Any > >> idea would help :) > >> Thanks! > >> - Maxime > > >> On 26 nov, 11:41, Maxime Petazzoni <[EMAIL PROTECTED]> wrote: > > >>> Thanks for making all this work available to the community. I'm > >>> building all this right now, and hope I will get it working :) > > >>> - Maxime > > >>> On 26 nov, 10:09, "Yang, Xiaopeng" <[EMAIL PROTECTED]> > >>> wrote: > > >>>> Hi Maxime, > > >>>> The ALSA contribution from Wind River includes alsa-lib and > >>>> libaudio-alsa libraries, along with other patches for bionic and > >>>> system/core. > > >>>> Because alsa-lib and libaudio-alsa are new projects, they have been sent > >>>> to > >>>> Google for integration, and may be available in the repositories soon. > > >>>> The other modifications on bionic and system/core have been submitted to > >>>> Gerrit for review: > > >>>> -------------------------------------------- > >>>> [OK ] bionic/ > >>>> defaulthttp://review.source.android.com/r/fad1668b10d5 > >>>> (as [EMAIL PROTECTED]) > > >>>> [OK ] system/core/ > >>>> defaulthttp://review.source.android.com/r/e2ff04fb6804 > >>>> (as [EMAIL PROTECTED]) > > >>>> After above projects and patches have been integrated into andorid, you > >>>> can > >>>> build android images with ALSA support. To that end, there are still > >>>> two > >>>> things need to do: > > >>>> 1. A /etc/asound.conf is required for ALSA to work. Attached patch adds a > >>>> sample asound.conf for zoom board, copy this sample file to > >>>> system/core/rootdir/etc/asound.conf and make necessary changes to it > >>>> according to your hardware. > > >>>> 2. Add the following line into the BoardConfig.mk of your board: > > >>>> BOARD_USES_ALSA_AUDIO := true > > >>>> then rebuild android to see whether ALSA audio work. > > >>>> Regards, > >>>> Xiaopeng > > >>>> Maxime Petazzoni 写道: > > >>>>> Hi Sean, > > >>>>> Do you have more information to give us about when and how this code > >>>>> is going to be available? The implementation proposed down here by > >>>>> Misael looks nice too, but I'd like to have a peek about the code you > >>>>> used for the Freerunner, and more importantly how you used it. > > >>>>> Thanks in advance, > >>>>> - Maxime > > >>>>> On 12 nov, 05:42, Sean McNeil <[EMAIL PROTECTED]> wrote: > > >>>>>> Hi Maxime, > > >>>>>> Wind River is in the process of submitting an ALSA audio > >>>>>> implementation. > >>>>>> That is what I use on the Openmoko Freerunner and what has been > >>>>>> successfully used on the TI OMAP Zoom reference platform. > > >>>>>> Maxime Petazzoni wrote: > > >>>>>>> Hi, > >>>>>>> I believe most of the porting efforts on the various hardware platform > >>>>>>> will soon get to the point (if not already) of a running system ; the > >>>>>>> next step being making sure all the basic functionality is there. > >>>>>>> Audio being one of the most important one, since telephony also > >>>>>>> depends on it. > >>>>>>> Without anything done on that front, we're facing the "using stubbed > >>>>>>> audio hardware, no sound will be produced" warning message when Dalvik > >>>>>>> starts. > >>>>>>> From what I've read, Android relies on an hardware glue library > >>>>>>> libaudio, providing AudioFlinger with the appropriate AudioInterface > >>>>>>> implementation to output sound to whatever sound driver the hardware > >>>>>>> uses. For example, on the HTC G1/MSM72xx hardware platform, Google > >>>>>>> useshttp://android.git.kernel.org/?p=platform/hardware/msm7k.git;a=summary > >>>>>>> But I think most of the Androids ports are made on hardware that have > >>>>>>> ALSA device drivers (OMAP for example). And before 20 different people > >>>>>>> start implementing their own libaudio bridging to ALSA, maybe we > >>>>>>> should coordinate this community effort. Starting by knowing if > >>>>>>> anything has already been started by someone, somewhere :) > >>>>>>> If not, I will most likely start working on one, and I foresee that > >>>>>>> it's going to be tough, as the only real documentation is the msm7k > >>>>>>> libaudio source code itself. > >>>>>>> Ideas, comments, suggestions ... and help are most welcome! > >>>>>>> - Maxime > >>>>>>> PS: of course, if you got audio working without going through this > >>>>>>> libaudio stuff, please share your discoveries ! > > >>>> sample_asound_conf.patch > >>>> 3KAfficherTélécharger > > --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [EMAIL PROTECTED] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---