[alsa-devel] [PATCH 1/2] ASoC: Convert playpaq_wm8510 to bulk route registration API
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/at32/playpaq_wm8510.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/sound/soc/at32/playpaq_wm8510.c b/sound/soc/at32/playpaq_wm8510.c index 98a2d58..b1966e4 100644 --- a/sound/soc/at32/playpaq_wm8510.c +++ b/sound/soc/at32/playpaq_wm8510.c @@ -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 */
This was marked as deprecated in 2.6.27 and all users except for playpaq_wm8510 fixed in that release.
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- include/sound/soc-dapm.h | 2 -- sound/soc/soc-dapm.c | 22 ---------------------- 2 files changed, 0 insertions(+), 24 deletions(-)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index ca699a3..7ee2f70 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -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, diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index efbd0b3..4060fc5 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -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
At Thu, 16 Oct 2008 11:00:07 +0100, Mark Brown wrote:
This was marked as deprecated in 2.6.27 and all users except for playpaq_wm8510 fixed in that release.
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com
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
include/sound/soc-dapm.h | 2 -- sound/soc/soc-dapm.c | 22 ---------------------- 2 files changed, 0 insertions(+), 24 deletions(-)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index ca699a3..7ee2f70 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -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, diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index efbd0b3..4060fc5 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -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
-- 1.5.6.5
On Thu, Oct 16, 2008 at 12:20:25PM +0200, Takashi Iwai wrote:
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.
At Thu, 16 Oct 2008 13:12:45 +0100, Mark Brown wrote:
On Thu, Oct 16, 2008 at 12:20:25PM +0200, Takashi Iwai wrote:
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.
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
participants (2)
-
Mark Brown
-
Takashi Iwai