Re: Problem with MX27 ASoC audio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 12, 2010 at 8:56 PM, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote:
> On Thu, Aug 12, 2010 at 06:15:47PM +0800, Randolph Chung wrote:
>> I have a target that uses iMX27(L) + tlv320aic3x. The kernel tree is
>> HEAD of linux-arm from about a week ago.
>>
>> Simple playback and recording (using aplay and arecord) work fine.
>> However, I've run into a strange problem when both playback and
>> capture streams are opened at the same time.
>>
>> Consider the attached test program. The capture device is setup with a
>> period time of 10ms, and the program reads samples in a loop. The
>> expected result is that I get a sample every 10ms. This works fine if
>> the playback device is *not* opened (more specifically, if the
>> hw_params are not set). However if the playback device is opened (#if
>> 1 code) then I get samples every 20ms, which seems very wrong.
>>
>> I have tried using both DMA and FIQ ssi-pcm interfaces and both give
>> the same strange result. With the FIQ driver, if I instrument the
>> timer callback, the timer triggers every 10ms but there is only enough
>> data every 20ms.
>>
>> The codec is being driven with a 13MHz MCLK (output from MX27) and the
>> BCLK and WCLK come from the codec. They seem to have the correct
>> rates.
>>
>> Any ideas? Can anybody else with MX27 hardware verify if my test
>> program also fails on their target?
>
> You should check the return values of the snd_pcm_hw_params_* functions.
> At least snd_pcm_hw_params_set_channels fails because we currently only
> support two channels. I'm not sure whether we can support one channel
> mode without changes to the driver.

I will double check tomorrow, but I have another version of the code
that checks all the return values and I am quite sure the set_channels
didn't fail....

In any case why would it work if there is only a capture device open?

Also I would imagine even if there are 2 channels the code should still work....

I would appreciate some test results on another  mx27 board to verify
if it is a problem specific to my setup or generic to other mx27
targets.

thanks,
randolph
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux