ASoC: Convert playpaq_wm8510 to bulk route registration API
PATCH 1/2 ASoC: Convert playpaq_wm8510 to bulk route registration API
--- sound/soc/at32/playpaq_wm8510.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-)
sound/soc/at32/playpaq_wm8510.c +3 -9
@@ -304,7 +304,7 @@ static const struct snd_soc_dapm_widget playpaq_dapm_widgets[] = { -static const char *intercon[][3 ] = { +static const struct snd_soc_dapm_route intercon[] = {/* speaker connected to SPKOUT */ {"Ext Spk" ,NULL ,"SPKOUTP" }, {"Ext Spk" ,NULL ,"SPKOUTN" },
@@ -312,9 +312,6 @@ static const char *intercon[][3] = { {"Mic Bias", NULL, "Int Mic"}, {"MICN", NULL, "Mic Bias"}, {"MICP", NULL, "Mic Bias"}, - -/* Terminator */ - {NULL, NULL, NULL}, };
@@ -334,11 +331,8 @@ static int playpaq_wm8510_init(struct snd_soc_codec *codec)/* * Setup audio path interconnects */ -for (i =0 ; intercon[i][0 ] !=NULL ; i++) { -snd_soc_dapm_connect_input (codec, - intercon[i][0 ], - intercon[i][1 ], intercon[i][2 ]); - } +snd_soc_dapm_add_routes (codec, intercon,ARRAY_SIZE (intercon)); +/* always connected pins */
Signature · 1 line
1.5.6.5
PATCH 2/2 ASoC: Remove snd_soc_dapm_connect_input()
This was marked as deprecated in 2.6.27 and all users except for playpaq_wm8510 fixed in that release.
--- include/sound/soc-dapm.h | 2 -- sound/soc/soc-dapm.c | 22 ---------------------- 2 files changed, 0 insertions(+), 24 deletions(-)
include/sound/soc-dapm.h +0 -2
@@ -221,8 +221,6 @@ int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, int num);/* dapm path setup */ -int __deprecated snd_soc_dapm_connect_input (struct snd_soc_codec *codec, -const char *sink_name,const char *control_name,const char *src_name);int snd_soc_dapm_new_widgets (struct snd_soc_codec *codec);void snd_soc_dapm_free (struct snd_soc_device *socdev); int snd_soc_dapm_add_routes(struct snd_soc_codec *codec,
sound/soc/soc-dapm.c +0 -22
@@ -1007,28 +1007,6 @@ err: }/** -* snd_soc_dapm_connect_input - connect dapm widgets -* @codec: audio codec -* @sink: name of target widget -* @control: mixer control name -* @source: name of source name -* -* Connects 2 dapm widgets together via a named audio path. The sink is -* the widget receiving the audio signal, whilst the source is the sender -* of the audio signal. -* -* This function has been deprecated in favour of snd_soc_dapm_add_routes(). -* -* Returns 0 for success else error. -*/ -int snd_soc_dapm_connect_input (struct snd_soc_codec *codec,const char *sink, -const char *control,const char *source) -{ -return snd_soc_dapm_add_route (codec, sink, control, source); -} -EXPORT_SYMBOL_GPL (snd_soc_dapm_connect_input); - -/** * snd_soc_dapm_add_routes - Add routes between DAPM widgets * @codec: codec * @route: audio routes
Signature · 1 line
1.5.6.5
Re: [PATCH 2/2] ASoC: Remove snd_soc_dapm_connect_input()
At Thu, 16 Oct 2008 11:00:07 +0100,
Quoted 5 lines · Mark Brown
This was marked as deprecated in 2.6.27 and all users except for
playpaq_wm8510fixed in that release.Signed-off-by Mark Brown <[email protected]>
My stand-point is that we should have removed it *before* the merge window if we must remove. If not, let's postpone.
Either removing or not, this can't be a big issue. But, I simply don't like the API change now.
Takashi
Quoted 54 lines
--- include/sound/soc-dapm.h | 2 -- sound/soc/soc-dapm.c | 22 ---------------------- 2 files changed, 0 insertions(+), 24 deletions(-)include/sound/soc-dapm.h +0
-2@@ -221,8 +221,6 @@ int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, int num);/* dapm path setup */ -int __deprecated snd_soc_dapm_connect_input (struct snd_soc_codec *codec, -const char *sink_name,const char *control_name,const char *src_name);int snd_soc_dapm_new_widgets (struct snd_soc_codec *codec);void snd_soc_dapm_free (struct snd_soc_device *socdev); int snd_soc_dapm_add_routes(struct snd_soc_codec *codec,sound/soc/soc-dapm.c +0
-22@@ -1007,28 +1007,6 @@ err: }/** -* snd_soc_dapm_connect_input - connect dapm widgets -* @codec: audio codec -* @sink: name of target widget -* @control: mixer control name -* @source: name of source name -* -* Connects 2 dapm widgets together via a named audio path. The sink is -* the widget receiving the audio signal, whilst the source is the sender -* of the audio signal. -* -* This function has been deprecated in favour of snd_soc_dapm_add_routes(). -* -* Returns 0 for success else error. -*/ -int snd_soc_dapm_connect_input (struct snd_soc_codec *codec,const char *sink, -const char *control,const char *source) -{ -return snd_soc_dapm_add_route (codec, sink, control, source); -} -EXPORT_SYMBOL_GPL (snd_soc_dapm_connect_input); - -/** * snd_soc_dapm_add_routes - Add routes between DAPM widgets * @codec: codec * @route: audio routes Signature · 1 line
1.5.6.5
Re: [PATCH 2/2] ASoC: Remove snd_soc_dapm_connect_input()
Quoted 5 lines · Takashi Iwai
My stand-point is that we should have removed it *before* the merge window if we must remove. If not, let's postpone.
Either removing or not, this can't be a big issue. But, I simply don't like the API change now.
I saw. I wasn't expecting you to submit these to Linus but since I saw that you were queuing things for 2.6.29 already and thought that it was as well to send the changes now while I remembered.
Re: [PATCH 2/2] ASoC: Remove snd_soc_dapm_connect_input()
At Thu, 16 Oct 2008 13:12:45 +0100,
Quoted 6 lines · Mark Brown
Quoted 2 lines · Takashi Iwai
My stand-point is that we should have removed it *before* the merge window if we must remove. If not, let's postpone.
Quoted 6 lines
Quoted 2 lines
Either removing or not, this can't be a big issue. But, I simply don't like the API change now.
I saw. I wasn't expecting you to submit these to Linus but since I saw that you were queuing things for 2.6.29 already and thought that it was as well to send the changes now while I remembered.
I applied the API removal patch to topic/asoc-next branch while the fix for playmaq_wm8510 to topic/asoc so that it'll be in the next pull request.
Thanks,
Takashi