[Sound-open-firmware] [PATCH 2/3] topology: m4: Add option for loopback mode in DAI config

Pan, Xiuli xiuli.pan at linux.intel.com
Wed Jun 13 22:51:30 CEST 2018



On 6/14/2018 01:59, Ranjani Sridharan wrote:
> On Wed, 2018-06-13 at 17:23 +0800, Xiuli Pan wrote:
>> From: Pan Xiuli <xiuli.pan at linux.intel.com>
>>
>> Add a option for loopback mode in DAI config
>>
>> Signed-off-by: Pan Xiuli <xiuli.pan at linux.intel.com>
>> ---
>> Work with patch set:
>> SOF-Kernel:
>>    ASoC: SOF: Add debug_mode flag in sof dev
>>    ASoC: SOF: debug: add debugmode debugfs for sof_dev debug_mode
>>    ASoC: SOF: uapi: topology: Add SOF_TKN_DAI_LBM for ssp loopback
>> mode
>>    ASoC: SOF: uapi: ipc: Add lbm in sof_ipc_dai_config
>>    ASoC: SOF: topology: Add topology handler for dai config loopback
>> mode
>>    ASoC: SOF: add headers for lbm control callback functions
>>    ASoC: SOF: add lbm kcontrol callback functions
>>    ASoC: SOF: topology: add SSP lbm kcontrol switch create function
>> SOF:
>>    dai: add lbm status for dai
>>    ipc: dai: add loopback mode handler for dai
>> SOF-Tools:
>>    topology: Add SOF_TKN_DAI_LBM for ssp loopback mode
>>    topology: m4: Add option for loopback mode in DAI config
>>    topology: test: Add loopback topology
>>
>> test & santity test with:
>> Mininow max rt5651 and UP2 Hifiberry PRO and CNL nocodec
>> SOF master: 792bd414ee5629f72b1e24619510d6936eac28ce
>> SOF-Tool master: bd7dc88231f31d385340310cef467f211a739eeb
>> https://github.com/plbossart/sound/tree/topic/sof-v4.14:
>> 1e0f50565669815dd7daa19021b3b04a90487431
>>
>> ---
>>   topology/m4/dai.m4 | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/topology/m4/dai.m4 b/topology/m4/dai.m4
>> index bd67413..46072be 100644
>> --- a/topology/m4/dai.m4
>> +++ b/topology/m4/dai.m4
>> @@ -216,7 +216,7 @@ $11
>>   dnl DAI Config)
>>   define(`N_DAI_CONFIG', `DAICONFIG.'$1)
>>   
>> -dnl DAI_CONFIG(type, idx, link_id, name, ssp_config/dmic_config)
>> +dnl DAI_CONFIG(type, idx, link_id, name, ssp_config/dmic_config,
>> loopbackmode)
> Xiuli, can we explicitly call out that the last argument should be
> omitted if LBM should be disabled?
> OTW, I have a feeling someone might look at the example in the test
> topology file and use "FALSE", which would be misleading.
That is a problem.
> Or to be on the safer side, maybe we can have a separate
> SSP_CONFIG_LBM() macro maybe.
I think a new macro should be better.
Will send a V2 version.

Thanks
Xiuli
>
>>   define(`DAI_CONFIG',
>>   `SectionHWConfig."'$1$2`" {'
>>   `'
>> @@ -228,6 +228,7 @@ define(`DAI_CONFIG',
>>   `	tokens "sof_dai_tokens"'
>>   `	tuples."string" {'
>>   `		SOF_TKN_DAI_TYPE'		STR($1)
>> +`ifelse($6,`',`' , `		SOF_TKN_DAI_LBM			
>> "TRUE"')'
>>   `	}'
>>   `}'
>>   `SectionData."'N_DAI_CONFIG($1$2)`_data_str" {'
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware



More information about the Sound-open-firmware mailing list