I will re-wirte this patch in this week. 

Cliff 

>-----Original Message-----
>From: Mike Frysinger [mailto:[email protected]] 
>Sent: Sunday, May 24, 2009 1:45 PM
>To: [email protected]
>Cc: [email protected]
>Subject: Re: [Linux-kernel-commits] [5997] trunk/sound/soc: 
>bug[#4710]set constraint only if the value is not 0 , change 
>the configuring way for sport
>
>On Mon, Jan 12, 2009 at 05:39,  <[email protected]> wrote:
>> Revision 5997 Author cliff Date 2009-01-12 03:39:44 -0600 
>(Mon, 12 Jan 
>> 2009)
>>
>> Log Message
>>
>> bug[#4710]set constraint only if the value is not 0,change the 
>> configuring way for sport
>>
>> Modified: trunk/sound/soc/codecs/ssm2602.c (5996 => 5997)
>>
>> --- trunk/sound/soc/codecs/ssm2602.c 2009-01-12 07:25:44 UTC 
>(rev 5996)
>> +++ trunk/sound/soc/codecs/ssm2602.c 2009-01-12 09:39:44 UTC 
>(rev 5997)
>> @@ -49,8 +49,8 @@
>>  /* codec private data */
>>  struct ssm2602_priv {
>>      unsigned int sysclk;
>> -    struct snd_pcm_substream *master_substream;
>> -    struct snd_pcm_substream *slave_substream;
>> +    unsigned int master_rate;
>> +    unsigned int master_sample_bits;
>>  };
>>
>>  /*
>> @@ -330,26 +330,25 @@
>>      struct snd_soc_device *socdev = rtd->socdev;
>>      struct snd_soc_codec *codec = socdev->codec;
>>      struct ssm2602_priv *ssm2602 = codec->private_data;
>> -    struct snd_pcm_runtime *master_runtime;
>>
>>      /* The DAI has shared clocks so if we already have a playback or
>>       * capture going then constrain this substream to match it.
>>       */
>> -    if (ssm2602->master_substream) {
>> -            master_runtime = ssm2602->master_substream->runtime;
>> +    if (ssm2602->master_rate) {
>>              snd_pcm_hw_constraint_minmax(substream->runtime,
>>                                           SNDRV_PCM_HW_PARAM_RATE,
>> -                                         master_runtime->rate,
>> -                                         master_runtime->rate);
>> +                                         ssm2602->master_rate,
>> +                                         ssm2602->master_rate);
>> +    } else
>> +            ssm2602->master_rate = substream->runtime->rate;
>>
>> +    if (ssm2602->master_sample_bits) {
>>              snd_pcm_hw_constraint_minmax(substream->runtime,
>>                                           
>SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
>> -                                         
>master_runtime->sample_bits,
>> -                                         
>master_runtime->sample_bits);
>> -
>> -            ssm2602->slave_substream = substream;
>> +                                         
>ssm2602->master_sample_bits,
>> +                                         
>ssm2602->master_sample_bits);
>>      } else
>> -            ssm2602->master_substream = substream;
>> +            ssm2602->master_sample_bits = 
>substream->runtime->sample_bits;
>>
>>      return 0;
>>  }
>
>could you give some more details as to what this change to 
>ssm2602 is for ?  the referenced bug appears to be only for 
>the bf5xx-i2s.c change, not this codec change.
>-mike
>

_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to