[PATCH v2 2/3] ASoC: rt715: remove kcontrols which no longer be used

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Fri Apr 16 17:58:13 CEST 2021


> The only my concern is that RT715 as an universal codec can handle the
> multiple stereo streams (current controls mapping) or the multichannel stream
> (new proposed controls mapping). The ASoC codec code should be universal, so
> it's a question, how to model the controls and how to detect and set the
> model. I think that we're missing a communication way between the DMA /
> machine driver and the codec driver. Yes, we can add DMI checks to RT715, but
> usually, the specific machines are already detected in the higher layer
> (soundwire bus, pci bus). It would be really nice, if the SOF driver can do a
> query: "If present, I need RT715 codec in the multichannel mode.".

The RT715 was an early SoundWire device, and it'll likely be superseded 
by the newer SDCA version. The direction for SDCA 'SmartMic' devices is 
not to manage independent stereo streams corresponding to different 
pairs of microphones, and it's not a solution we want to promote in the 
rest of the stack.

There will be multiple streams provided by the codec, but each stream 
will be tied to a given functionality (regular capture, buffered capture 
with triggers, voice, etc).

In addition, what can be configured by the user for volume/mute in 
'Feature Units' is after platform-specific channel 
remapping/mixing/processing. It could very well be that there are 4 mics 
in a platform but only 2 channels are provided to the host.

In other words, the streams generated by the codec and transmitted on 
the SoundWire bus will always be exposed with N channels, in a 
multichannel mode. We will need to report this N to UCM, currently 
that's missing, and the SOF topologies also have a limitation to 2ch 
that we will need to remove.

> So my opinion is that both mappings may exist and the correct one should be
> selected at runtime. So I won't delete the old mapping, it may be usable. Mark?

What I was suggesting is not to delete the old controls in UCM but make 
them conditional. If present you use them, otherwise you use the newer 
solution.

> BTW: I already implemented the control remap plugin to alsa-lib, so you can
> split / merge controls with similar parameters as you like now. I need to do
> more test with the UCM integration, but it's here.
> 
> https://github.com/alsa-project/alsa-lib/blob/master/src/control/control_remap.c#L1197

thanks for the pointer, I'll have to look into this.


More information about the Alsa-devel mailing list