Ok, after tweaking mixer control names in the asound.conf file, I have
sound. Kind of, because changing the volume makes the mediaserver
crash one out of three times. After it's crashed, sound still comes
out, but changing the volume is not possible until reboot.

Anyway, that's still a good start, I'll continue working on it next
week and stabilize all this.

Thanks for the help, and for the release of Windriver's code.

- Maxime

On Nov 27, 7:02 pm, Sean McNeil <[EMAIL PROTECTED]> wrote:
> Maxime Petazzoni wrote:
> > 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/).
>
> Where did you get the asound.conf? It must relate to your hardware and
> kernel. It is very specific to a platform. The example version provided
> relates to the OMAP zoom board with I think kernel 2.6.22 (not sure
> about this, though). You'll have to use something like alsactl to save
> off the states and see if they correspond to what is in asound.conf.
>
> > 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.
>
> I don't have my zoom board available, so I can't check this for you.
>
> > 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
>
> ...
>
> read more >>
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [EMAIL PROTECTED]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to