[Sound-open-firmware] [PATCH] ASOC: topology: Fix hw_config setting for DAI

Pan, Xiuli xiuli.pan at intel.com
Tue Feb 13 08:13:33 CET 2018


>
>On 02/12/2018 12:12 AM, Xiuli Pan wrote:
>> From: Pan Xiuli <xiuli.pan at linux.intel.com>
>>
>> DAI is codec here in topology pipeline, thus we should not change
>> the settinga into oppsite value, as the tplg file is written from
>> the codec view.
>commit message to be redone.
>This should be "the ASoC conventions are wrt. the codec, fix the
>bclk/fsync ownership accordingly"

Thank you for the correction. I have pull the kernel and also test with it.

Thanks
Xiuli

>>
>> Signed-off-by: Pan Xiuli <xiuli.pan at linux.intel.com>
>>
>> ---
>> Test with:
>> Mininow max rt5651
>> SOF master: 019637ab250daa53c15da0a0a98c54f1c58d8ca3
>> SOF-Tool master: 33e4b0cc6f6a44e3e7ee849c04c515a5537242c7
>> https://github.com/plbossart/sound/tree/topic/sof-v4.14:
>> 6fa721a8b7c6567eea0a2181bf9a3d2a12c31b00
>>
>> Work with patch of SOF-Tool:
>> topology: m4: add default_hw_conf_id
>> ---
>>   sound/soc/soc-topology.c | 12 ++++++------
>>   1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
>> index e471352..df3bcf0 100644
>> --- a/sound/soc/soc-topology.c
>> +++ b/sound/soc/soc-topology.c
>> @@ -2018,11 +2018,11 @@ static void set_link_hw_format(struct
>snd_soc_dai_link *link,
>>   		/* clock signal polarity */
>>   		invert_bclk = hw_config->invert_bclk;
>>   		invert_fsync = hw_config->invert_fsync;
>> -		if (!invert_bclk && !invert_fsync)
>> +		if (invert_bclk && invert_fsync)
>>   			link->dai_fmt |= SND_SOC_DAIFMT_NB_NF;
>> -		else if (!invert_bclk && invert_fsync)
>> +		else if (invert_bclk && invert_fsync)
>
>Doesn't look right, it's the same test as above.
>besides, none of those initial tests seem problematic in the first place.
>>   			link->dai_fmt |= SND_SOC_DAIFMT_NB_IF;
>> -		else if (invert_bclk && !invert_fsync)
>> +		else if (!invert_bclk && invert_fsync)
>>   			link->dai_fmt |= SND_SOC_DAIFMT_IB_NF;
>>   		else
>>   			link->dai_fmt |= SND_SOC_DAIFMT_IB_IF;
>> @@ -2030,11 +2030,11 @@ static void set_link_hw_format(struct
>snd_soc_dai_link *link,
>>   		/* clock masters */
>>   		bclk_master = hw_config->bclk_master;
>>   		fsync_master = hw_config->fsync_master;
>> -		if (!bclk_master && !fsync_master)
>> +		if (bclk_master && fsync_master)
>>   			link->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
>> -		else if (bclk_master && !fsync_master)
>> -			link->dai_fmt |= SND_SOC_DAIFMT_CBS_CFM;
>>   		else if (!bclk_master && fsync_master)
>> +			link->dai_fmt |= SND_SOC_DAIFMT_CBS_CFM;
>> +		else if (bclk_master && !fsync_master)
>>   			link->dai_fmt |= SND_SOC_DAIFMT_CBM_CFS;
>>   		else
>>   			link->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;
>This part looks ok.
>



More information about the Sound-open-firmware mailing list