On Tue, 2009-06-30 at 19:56 +0300, Yusuf Caglar AKYUZ wrote:
> Steve Chen wrote:
> > On Tue, 2009-06-30 at 18:03 +0300, Yusuf Caglar AKYUZ wrote:
> >
> >> Aaah! There were some problem with my player, today I tested
> >> with aplay and everything is fine. It would be nice to have
> >> this patch included in mainline.
> >>
> >
> > Can you provide some details on which player and the sample rate you
> > used. A few months back, I noticed background noise with wavplay when
> > playing at sample rates that are not supported by hardware. The issue
> > was traced to ALSA OSS sample rate conversion code (commit id
> > 5370d96f85962769ea3df3a81cc885f257c51589). I wonder if there are
> > scenarios the code can still fail.
> >
> > Regards,
> >
> > Steve
> >
>
> In the beginning, I was using gstreamer(gst-launch). My pipelines were
> working on my PC so I thought they were ok. Today I converted some mpeg
> files to wav files and then tried aplay directly. For example:
>
> $gst-launch audiotestsrc !
> audio/x-raw-int,endianness=1234,rate=44100,channels=1 ! alsasink
> $gst-launch audiotestsrc !
> audio/x-raw-int,endianness=1234,rate=48000,channels=1 ! alsasink
>
> I can say that 1st one is not working whereas 2nd one is ok. Another example
> is playing and mp2 file:
>
> $gst-launch filesrc location=../davincieffect.mp2 ! mad !
> audio/x-raw-int,endianness=1234,signed=true,rate=44100,channels=2 ! alsasink
> $gst-launch filesrc location=../davincieffect48.mp2 ! mad !
> audio/x-raw-int,endianness=1234,signed=true,rate=48000,channels=2 ! alsasink
>
> Again 1st one is not working but 2nd is ok. In this example davincieffect.mp2
> is 44100 khz file whereas davincieffect48.mp2 is 48 khz. I tried these 2
> pipelines with TI mpeg codecs as well and results were the same. So I can
> say that there is nothing related to 'mad' mpeg codec.
I believe GStreamer uses the OSS emulation layer. It appears that the
problem is at sample rate of 44.1k.
>
> >From these two examples it was clear(at least for me) that there were some
> problem with driver, especially at 44100 khz either 1 channel or 2 channel.
> Later I converted davincieffect.mp2 to wav at two different sample rates and
> played with aplay as such:
>
> $aplay r441_c2.wav
Can you try
> aplay -D hw:0,1 r441_c2.wav
If you see something like
Warning: rate is not accurate (requested = 44100Hz, got = 48000Hz)
please, try the plug plugin
That means McBSP/AIC33 are not setup to handle sample rate of 44.1K
directly. The sample rates are covered by software. The problem is
likely in the area of rate conversion.
If you don't see the warning, McBSP/AIC33 is setup to handle 44.1K
directly. You man want to check with clock settings (make sure AIC33 is
setup as the master).
> $aplay r48_c2.wav
>
> Funny thing is that both played well. 441_c2 is 44100 2-ch and r48_c2 is
> 48000 2-ch. I can conduct further tests if you have any suggestions since
> I really want to see the bottom of this problem.
Parts of ALSA and ALSA OSS emulation layer goes through different code
path, so it is entirely possible that aplay works, but GStreamer can
fail under some scenarios.
Regards,
Steve
>
> Regards,
> Caglar
>
> P.S. Tests are performed on dm6446 EVM and on a dm6446 custom board. Both
> have the tlv320aic33 as the codec. Custom board has a different codec clock
> than the EVM, 27 mhz.
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source