ASoC: nau8825: fix stream_name conflicting
PATCH 1/1 ASoC: nau8825: fix stream_name conflicting
From: M Naveen <[email protected]>
There is naming conflict with dai stream_name defined in dmic.c so assign different name
--- sound/soc/codecs/nau8825.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/nau8825.c +6 -6
@@ -298,8 +298,8 @@ static const struct snd_kcontrol_new nau8825_dacr_mux =static const struct snd_soc_dapm_widget nau8825_dapm_widgets[] = { -SND_SOC_DAPM_AIF_OUT ("AIFTX" ,"Capture" ,0 ,NAU8825_REG_I2S_PCM_CTRL2 , -15 ,1 ), +SND_SOC_DAPM_AIF_OUT ("AIFTX" ,"AIF1 Capture" ,0 , +NAU8825_REG_I2S_PCM_CTRL2 ,15 ,1 ),SND_SOC_DAPM_INPUT ("MIC" ),SND_SOC_DAPM_MICBIAS ("MICBIAS" ,NAU8825_REG_MIC_BIAS ,8 ,0 ),
@@ -365,8 +365,8 @@ static const struct snd_soc_dapm_route nau8825_dapm_routes[] = { {"ADC", NULL, "ADC Power"}, {"AIFTX", NULL, "ADC"}, - {"DDACL", NULL, "Playback"}, - {"DDACR", NULL, "Playback"}, + {"DDACL", NULL, "AIF1 Playback"}, + {"DDACR", NULL, "AIF1 Playback"}, {"DDACL", NULL, "DDAC Clock"}, {"DDACR", NULL, "DDAC Clock"}, {"DACL Mux", "DACL", "DDACL"},
@@ -495,14 +495,14 @@ static const struct snd_soc_dai_ops nau8825_dai_ops = {static struct snd_soc_dai_driver nau8825_dai = { .name ="nau8825-hifi" , .playback = { - .stream_name ="Playback" , + .stream_name ="AIF1 Playback" , .channels_min =1 , .channels_max =2 , .rates =NAU8825_RATES , .formats =NAU8825_FORMATS , }, .capture = { - .stream_name ="Capture" , + .stream_name ="AIF1 Capture" , .channels_min =1 , .channels_max =1 , .rates =NAU8825_RATES ,
Signature · 1 line
1.7.9.5
Mark Brown
maintainerQuoted 4 lines · On Tue, Nov 03, 2015 at 04:13:39PM -0800, [email protected] wrote:
From: M Naveen <[email protected]>
There is naming conflict with dai
stream_namedefined indmic.cso assign different name
What sort of conflict? All names are scoped within their device, conflicts are inevitable since we support havig more than one instance of a device in the system.
Quoted 12 lines
-----Original Message-----
From: Mark Brown [mailto:[email protected]]
Sent: Wednesday, November 04, 2015 3:26 AM
To: Fang, Yang A
Cc: [email protected]; [email protected]; Nujella, Sathyanarayana; Koul, Vinod; M, Naveen; Sripathi, Srinivas; Konno, Joe; Patel, Vedang
Subject: Re: [PATCH] ASoC: nau8825: fixstream_nameconflictingOn Tue, Nov 03, 2015 at 04:13:39PM -0800, [email protected] wrote:
Quoted 8 lines
Quoted 4 lines
From: M Naveen <[email protected]>
There is naming conflict with dai
stream_namedefined indmic.cso assign different nameWhat sort of conflict? All names are scoped within their device, conflicts are inevitable since we support havig more than one instance of a device in the system.
Hi Mark,
For skylake there are two cpu BE dai 1)ssp1 Rx 2) DMIC01 Rx
In our machine driver we want to connect ssp1 Rx to Nuvuton codec and Connect DMIC01 Rx To DMIC codec(sound/soc/codecs/dmic.c)
In our machine driver route table is like below
static const struct snd_soc_dapm_route skylake_map[] = {
{ "ssp1 Rx", NULL, " Capture" },
{ "DMIC01 Rx", NULL, "Capture" },
}
If we use same Capture name. When we open dmic capture we saw it is connected to SSP1-Codec Instead of dmic01
[ 53.594602] Skl Audio Capture Port: ASoC: found 3 audio capture paths [ 53.601910] Skl Audio Capture Port: connected new DPCM capture path Skl Audio Capture Port <- dmic01 [ 53.612234] Skl Audio Capture Port: connected new DPCM capture path Skl Audio Capture Port <- SSP1-Codec [ 53.622929] Skl Audio Capture Port: ASoC: found 2 new BE paths [ 53.629550] SSP1-Codec: ASoC: open capture BE SSP1-Codec
Is there a better way to differentiate the name in route map? Thanks
Mark Brown
maintainerQuoted 1 line · Yang A
Is there a better way to differentiate the name in route map?
You need to differentiate by scoping within the device, consider what happens if you get a second DMIC added for example. We can't do that right now but it should be simple enough to add fields to the routing information that allow a dev_name() to be specified. Is that something you can work on?