diff mbox series

[5/6] ASoC: Intel: sof_sdw_rt700: add codec prefix

Message ID 20200923080514.3242858-6-kai.vehmanen@linux.intel.com
State New
Headers show
Series ASoC: Intel: sdw machine driver updates for 5.10 | expand

Commit Message

Kai Vehmanen Sept. 23, 2020, 8:05 a.m. UTC
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

Somehow for this codec we never used any prefix for the controls,
likely because the test platform has a single SoundWire device.

Follow the convention and use the codec prefix across the board to
avoid possible conflicts.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/intel/boards/sof_sdw_rt700.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jaroslav Kysela Sept. 23, 2020, 8:34 a.m. UTC | #1
Dne 23. 09. 20 v 10:05 Kai Vehmanen napsal(a):
> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> 
> Somehow for this codec we never used any prefix for the controls,
> likely because the test platform has a single SoundWire device.
> 
> Follow the convention and use the codec prefix across the board to
> avoid possible conflicts.
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
> ---
>  sound/soc/intel/boards/sof_sdw_rt700.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/intel/boards/sof_sdw_rt700.c b/sound/soc/intel/boards/sof_sdw_rt700.c
> index bff69cfe27f4..21e7e4a81779 100644
> --- a/sound/soc/intel/boards/sof_sdw_rt700.c
> +++ b/sound/soc/intel/boards/sof_sdw_rt700.c
> @@ -23,9 +23,9 @@ static const struct snd_soc_dapm_widget rt700_widgets[] = {
>  
>  static const struct snd_soc_dapm_route rt700_map[] = {
>  	/* Headphones */
> -	{ "Headphones", NULL, "HP" },
> -	{ "Speaker", NULL, "SPK" },
> -	{ "MIC2", NULL, "AMIC" },
> +	{ "Headphones", NULL, "rt700 HP" },
> +	{ "Speaker", NULL, "rt700 SPK" },

> +	{ "rt700 MIC2", NULL, "AMIC" },

This line looks suspicious. Perhaps, the prefix should be added before AMIC ?

						Jaroslav
Kai Vehmanen Sept. 23, 2020, 9:25 a.m. UTC | #2
Hi,

On Wed, 23 Sep 2020, Jaroslav Kysela wrote:

> Dne 23. 09. 20 v 10:05 Kai Vehmanen napsal(a):
>> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> > --- a/sound/soc/intel/boards/sof_sdw_rt700.c
> > +++ b/sound/soc/intel/boards/sof_sdw_rt700.c
> > @@ -23,9 +23,9 @@ static const struct snd_soc_dapm_widget rt700_widgets[] = {
> >  
> >  static const struct snd_soc_dapm_route rt700_map[] = {
> >  	/* Headphones */
> > -	{ "Headphones", NULL, "HP" },
> > -	{ "Speaker", NULL, "SPK" },
> > -	{ "MIC2", NULL, "AMIC" },
> > +	{ "Headphones", NULL, "rt700 HP" },
> > +	{ "Speaker", NULL, "rt700 SPK" },
> 
> > +	{ "rt700 MIC2", NULL, "AMIC" },
> 
> This line looks suspicious. Perhaps, the prefix should be added before AMIC ?

I believe this is still correct. We prefix the codec-side entry of the 
dapm routes with codec string and here MIC2 is the codec. This is aligned 
with existing code for 711 in sof_sdw_rt711.c:

static const struct snd_soc_dapm_route rt711_map[] = {
»       /* Headphones */
»       { "Headphone", NULL, "rt711 HP" },
»       { "rt711 MIC2", NULL, "Headset Mic" },
};

Br, Kai
Liao, Bard Sept. 23, 2020, 9:57 a.m. UTC | #3
On 9/23/2020 4:34 PM, Jaroslav Kysela wrote:
> Dne 23. 09. 20 v 10:05 Kai Vehmanen napsal(a):
>> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>>
>> Somehow for this codec we never used any prefix for the controls,
>> likely because the test platform has a single SoundWire device.
>>
>> Follow the convention and use the codec prefix across the board to
>> avoid possible conflicts.
>>
>> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
>> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
>> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
>> ---
>>   sound/soc/intel/boards/sof_sdw_rt700.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/sound/soc/intel/boards/sof_sdw_rt700.c b/sound/soc/intel/boards/sof_sdw_rt700.c
>> index bff69cfe27f4..21e7e4a81779 100644
>> --- a/sound/soc/intel/boards/sof_sdw_rt700.c
>> +++ b/sound/soc/intel/boards/sof_sdw_rt700.c
>> @@ -23,9 +23,9 @@ static const struct snd_soc_dapm_widget rt700_widgets[] = {
>>   
>>   static const struct snd_soc_dapm_route rt700_map[] = {
>>   	/* Headphones */
>> -	{ "Headphones", NULL, "HP" },
>> -	{ "Speaker", NULL, "SPK" },
>> -	{ "MIC2", NULL, "AMIC" },
>> +	{ "Headphones", NULL, "rt700 HP" },
>> +	{ "Speaker", NULL, "rt700 SPK" },
>> +	{ "rt700 MIC2", NULL, "AMIC" },
> This line looks suspicious. Perhaps, the prefix should be added before AMIC ?

The "rt700" is a prefix for rt700 codec and the "MIC2" is one of rt700's

widget and "AMIC" is machine driver's widget. So "rt700 MIC2" looks correct

to me.



>
> 						Jaroslav
>
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/sof_sdw_rt700.c b/sound/soc/intel/boards/sof_sdw_rt700.c
index bff69cfe27f4..21e7e4a81779 100644
--- a/sound/soc/intel/boards/sof_sdw_rt700.c
+++ b/sound/soc/intel/boards/sof_sdw_rt700.c
@@ -23,9 +23,9 @@  static const struct snd_soc_dapm_widget rt700_widgets[] = {
 
 static const struct snd_soc_dapm_route rt700_map[] = {
 	/* Headphones */
-	{ "Headphones", NULL, "HP" },
-	{ "Speaker", NULL, "SPK" },
-	{ "MIC2", NULL, "AMIC" },
+	{ "Headphones", NULL, "rt700 HP" },
+	{ "Speaker", NULL, "rt700 SPK" },
+	{ "rt700 MIC2", NULL, "AMIC" },
 };
 
 static const struct snd_kcontrol_new rt700_controls[] = {