Re: [PATCH 3/5] ASoC: Blackfin: tweak howweinitialize the SPORT

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

 



 

>-----Original Message-----
>From: Mark Brown [mailto:broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx] 
>Sent: Thursday, June 04, 2009 6:51 PM
>To: Cai, Cliff
>Cc: Mike Frysinger; uclinux-dist-devel@xxxxxxxxxxxxxxxxxxxx; 
>alsa-devel@xxxxxxxxxxxxxxxx
>Subject: Re:  [PATCH 3/5] ASoC: Blackfin: tweak 
>howweinitialize the SPORT
>
>On Thu, Jun 04, 2009 at 10:36:48AM +0800, Cai, Cliff wrote:
>
>> This is not a problem of rate but format,I think combine the 
>two flags 
>> will solve all the problems.
>
>Ah, yes - I was remembering the ssm2602 driver which does do 
>rate constraints.
>
>> The reason I write this patch is that I found when some oss-based 
>> applications open soundcard ,the startup callbacks will be called 
>> several times.
>
>All OSS applications do this, OSS has a separate ioctl for 
>each configuration option so you get lots of configuration calls.
>
>> So using the counter to record opened pcm streams is not reliable.
>
>It's only hw_params() that get called repeatedly.
>
>I could be wrong but looking at the code I suspect you may 
>just need to make the reconfiguration conditional on if it's a 
>capture or playback stream and you'll be fine - at the minute 
>you're configuring both RX and TX on every hw_params() but 
>there are separate tcr2 and rcr2 registers that you write to.  
>If you only wrote to the appropriate one then you wouldn't 
>need to worry about interfering with another stream for that 
>configuration.  There is the wdsize parameter for the SPORT as 
>well but a brief glance at the code for that suggests that 
>there are actually separate RX and TX configurations there too.
>
>If not then adding constraint code would help a lot.

Yes,if RX and TX can be configured separately ,it would be much
easier...
But for full-duplex consideration,we now don't run RX and TX
independently,
I've tested the combining of "counter" and "configured" together to
sovle the problem
You mentioned by clearing "configured" when counter is 0.Once blackfin
tree has been
Updated to the head I will send you the patch.

Thanks a lot!

Cliff

  

_______________________________________________
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