[Sound-open-firmware] [PATCH] [RFC] topology: scripts: update for 4-channel feature.

zhigangw zhigang.wu at linux.intel.com
Wed May 23 05:01:01 CEST 2018



On 2018年05月22日 20:27, Pierre-Louis Bossart wrote:
> On 5/22/18 4:48 AM, Wu Zhigang wrote:
>> the script should be updated for 4-channel feature.
>> if not, the volume of rear 2-channel cannot be adjusted.
>>
>> Signed-off-by: Wu Zhigang <zhigang.wu at linux.intel.com>
>>
>> ---
>> Test with:
>> APL-MRB with tdf8532 codec
>> Linux topic/sof-v4.14: 33807ca8baa20bab2f98e9cc8a23c51a0822ad9f
>> SOF master: e5dab2ada6ef98dbc6224863110cc86b5839ea01
>> Tool master: b4f3670870ba5a933c3ec58a51b59ff9ef8b3588
>>
>> The Sanity test is for nocodec case.
>> this change only affect the codec case.
>> so I did not do the sanity test.
>> ---
>>   topology/sof/pipe-volume-capture.m4  | 4 ++--
>>   topology/sof/pipe-volume-playback.m4 | 4 ++--
>>   2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/topology/sof/pipe-volume-capture.m4 
>> b/topology/sof/pipe-volume-capture.m4
>> index b3d3206..3c03e68 100644
>> --- a/topology/sof/pipe-volume-capture.m4
>> +++ b/topology/sof/pipe-volume-capture.m4
>> @@ -22,8 +22,8 @@ C_CONTROLMIXER(Master Capture Volume, PIPELINE_ID,
>>       CONTROLMIXER_MAX(, 32),
>>       false,
>>       CONTROLMIXER_TLV(TLV 32 steps from -90dB to +6dB for 3dB, 
>> vtlv_m90s3),
>> -    Channel register and shift for Front Left/Right,
>> -    LIST(`    ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 
>> 1)))
>> +    Channel register and shift for Front Left/Right and Rear 
>> Left/Right,
>> +    LIST(`    ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 
>> 1), KCONTROL_CHANNEL(RL, 2, 0), KCONTROL_CHANNEL(RR, 2, 1)))
>
> This doesn't scale. This should be a parameter defining which channels 
> should be controlled. Hard-coding to two outputs or four outputs is 
> not going to work for the next board if it has 6 channels...
>
Maybe we could create different "pipe-volume-capture.m4" and 
"pipe-volume-playback.m4" files for different channel number.
Normally there are not many kinds of channel combination in the real case.

If this suggestion is not OK. then my question is:

What is the maximum channel number we want to support?
What is the channel name for each we want to use?
do we have plan for this?

for 5.1 channel normally like this.
chan1 -- FL
chan2 -- FR
chan3 -- RL
chan4 -- RR
chan5 -- FC
chan6 -- LFE

for 7.1 channel normally like this.
chan1 -- FL
chan2 -- FR
chan3 -- Left
chan4 -- Right
chan5 -- RL
chan6 -- RR
chan7 -- FC
chan8 -- LFE

If I am wrong, please point it out.
Actually each channel should be remapped according to the speaker's 
location and type in the real case.
But we may not need to take it into account right now.

thanks
br
~zhigang

>>     #
>>   # Components and Buffers
>> diff --git a/topology/sof/pipe-volume-playback.m4 
>> b/topology/sof/pipe-volume-playback.m4
>> index 4b12d2a..65d7894 100644
>> --- a/topology/sof/pipe-volume-playback.m4
>> +++ b/topology/sof/pipe-volume-playback.m4
>> @@ -22,8 +22,8 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
>>       CONTROLMIXER_MAX(, 32),
>>       false,
>>       CONTROLMIXER_TLV(TLV 32 steps from -90dB to +6dB for 3dB, 
>> vtlv_m90s3),
>> -    Channel register and shift for Front Left/Right,
>> -    LIST(`    ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 
>> 1)))
>> +    Channel register and shift for Front Left/Right and Rear 
>> Left/Right,
>> +    LIST(`    ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 
>> 1), KCONTROL_CHANNEL(RL, 2, 0), KCONTROL_CHANNEL(RR, 2, 1)))
>>     #
>>   # Components and Buffers
>>
>



More information about the Sound-open-firmware mailing list