[alsa-devel] [PATCH 10/17] ASoC: mxs: Use generic dmaengine PCM

Lars-Peter Clausen lars at metafoo.de
Thu Apr 18 11:04:38 CEST 2013


On 04/17/2013 03:50 PM, Shawn Guo wrote:
> On Wed, Apr 17, 2013 at 11:28:11AM +0200, Lars-Peter Clausen wrote:
>> Can you see whether the patch below fixes it?
>>
> No, it does not fix the problem.
> 
> Shawn

Could you try the other patch plus this one:

--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2018,9 +2018,11 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
 		if (cpu_dai->driver->capture.channels_min)
 			capture = 1;
 	} else {
-		if (codec_dai->driver->playback.channels_min)
+		if (codec_dai->driver->playback.channels_min &&
+			cpu_dai->driver->playback.channels_min)
 			playback = 1;
-		if (codec_dai->driver->capture.channels_min)
+		if (codec_dai->driver->capture.channels_min &&
+			cpu_dai->driver->capture.channels_min)
 			capture = 1;
 	}

> 
>> diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
>> index b563141..675c348 100644
>> --- a/sound/soc/mxs/mxs-saif.c
>> +++ b/sound/soc/mxs/mxs-saif.c
>> @@ -611,21 +611,28 @@ static int mxs_saif_dai_probe(struct snd_soc_dai *dai)
>>  }
>>
>>  static struct snd_soc_dai_driver mxs_saif_dai = {
>> -	.name = "mxs-saif",
>> -	.probe = mxs_saif_dai_probe,
>> -	.playback = {
>> -		.channels_min = 2,
>> -		.channels_max = 2,
>> -		.rates = MXS_SAIF_RATES,
>> -		.formats = MXS_SAIF_FORMATS,
>> +	{
>> +		.name = "mxs-saif",
>> +		.probe = mxs_saif_dai_probe,
>> +		.playback = {
>> +			.channels_min = 2,
>> +			.channels_max = 2,
>> +			.rates = MXS_SAIF_RATES,
>> +			.formats = MXS_SAIF_FORMATS,
>> +		},
>> +		.ops = &mxs_saif_dai_ops,
>>  	},
>> -	.capture = {
>> -		.channels_min = 2,
>> -		.channels_max = 2,
>> -		.rates = MXS_SAIF_RATES,
>> -		.formats = MXS_SAIF_FORMATS,
>> +	{
>> +		.name = "mxs-saif",
>> +		.probe = mxs_saif_dai_probe,
>> +		.capture = {
>> +			.channels_min = 2,
>> +			.channels_max = 2,
>> +			.rates = MXS_SAIF_RATES,
>> +			.formats = MXS_SAIF_FORMATS,
>> +		},
>> +		.ops = &mxs_saif_dai_ops,
>>  	},
>> -	.ops = &mxs_saif_dai_ops,
>>  };
>>
>>  static const struct snd_soc_component_driver mxs_saif_component = {
>> @@ -769,7 +776,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
>>  	platform_set_drvdata(pdev, saif);
>>
>>  	ret = snd_soc_register_component(&pdev->dev, &mxs_saif_component,
>> -					 &mxs_saif_dai, 1);
>> +					 &mxs_saif_dai[saif->id], 1);
>>  	if (ret) {
>>  		dev_err(&pdev->dev, "register DAI failed\n");
>>  		return ret;
> 



More information about the Alsa-devel mailing list