ASoC: build fix for snd_soc_info_bool_ext
Subsystems (6)
PATCH 1/10 ASoC: build fix for snd_soc_info_bool_ext
From: Philipp Zabel <[email protected]>
I suspect that snd_ctl_boolean_mono should have been snd_ctl_boolean_mono_info instead. This fixes the build for magician.
--- include/sound/soc.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/sound/soc.h +1 -1
@@ -238,7 +238,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);int snd_soc_info_volsw_ext (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_info *uinfo); -#define snd_soc_info_bool_ext snd_ctl_boolean_mono +#define snd_soc_info_bool_ext snd_ctl_boolean_mono_infoint snd_soc_get_volsw (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol); int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
Signature · 1 line
1.5.5.1
PATCH 2/10 soc - DAPM - Add bulk control registration
Most SoC drivers cut'n'paste a loop iterating over an array to register their DAPM controls. Provide a function they can call instead.
--- include/sound/soc-dapm.h | 3 +++ sound/soc/soc-dapm.c | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 0 deletions(-)
include/sound/soc-dapm.h +3 -0
@@ -205,6 +205,9 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);int snd_soc_dapm_new_control (struct snd_soc_codec *codec,const struct snd_soc_dapm_widget *widget); +int snd_soc_dapm_new_controls (struct snd_soc_codec *codec, +const struct snd_soc_dapm_widget *widget, +int num);/* dapm path setup */ int snd_soc_dapm_connect_input(struct snd_soc_codec *codec,
sound/soc/soc-dapm.c +27 -0
@@ -1234,6 +1234,33 @@ int snd_soc_dapm_new_control(struct snd_soc_codec *codec,EXPORT_SYMBOL_GPL (snd_soc_dapm_new_control);/** +* snd_soc_dapm_new_controls - create new dapm controls +* @codec: audio codec +* @widget: widget array +* @num: number of widgets +* +* Creates new DAPM controls based upon the templates. +* +* Returns 0 for success else error. +*/ +int snd_soc_dapm_new_controls (struct snd_soc_codec *codec, +const struct snd_soc_dapm_widget *widget, +int num) +{ +int i, ret; + +for (i =0 ; i < num; i++) { + ret =snd_soc_dapm_new_control (codec, widget); +if (ret <0 ) +return ret; + widget++; + } +return 0 ; +} +EXPORT_SYMBOL_GPL (snd_soc_dapm_new_controls); + + +/** * snd_soc_dapm_stream_event - send a stream event to the dapm core * @codec: audio codec * @stream: stream name
Signature · 1 line
1.5.5.1
PATCH 3/10 soc - DAPM - Bulk route registration
ASoC codecs and machine drivers that use DAPM routes all cut'n'paste a loop iterating over a null terminated array of routes. Factor out this into a bulk registration function, improving the error reporting for most users, and deprecate the old API to help out of tree users pick up the changes.
--- include/sound/soc-dapm.h | 17 ++++++++++- sound/soc/soc-dapm.c | 72 ++++++++++++++++++++++++++++++++++++--------- 2 files changed, 73 insertions(+), 16 deletions(-)
include/sound/soc-dapm.h +16 -1
@@ -193,6 +193,7 @@ struct snd_soc_dapm_widget;enum snd_soc_dapm_type ;struct snd_soc_dapm_path ;struct snd_soc_dapm_pin ; +struct snd_soc_dapm_route ;/* dapm controls */ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
@@ -210,10 +211,12 @@ int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, int num);/* dapm path setup */ -int snd_soc_dapm_connect_input (struct snd_soc_codec *codec, +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, +const struct snd_soc_dapm_route *route,int num);/* dapm events */ int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, char *stream,
@@ -250,6 +253,18 @@ enum snd_soc_dapm_type { snd_soc_dapm_post, /* machine specific post widget - exec last */ }; +/* +* DAPM audio route definition. +* +* Defines an audio route originating at source via control and finishing +* at sink. +*/ +struct snd_soc_dapm_route { +const char *sink; +const char *control; +const char *source; +}; +/* dapm audio path between two widgets */ struct snd_soc_dapm_path {char *name;
sound/soc/soc-dapm.c +57 -15
87 lines not on this page · raw message
Signature · 1 line
1.5.5.1
PATCH 4/10 soc - Convert Wolfson codec drivers to use bulk DAPM registration
--- sound/soc/codecs/wm8731.c | 16 ++++------------ sound/soc/codecs/wm8750.c | 16 ++++------------ sound/soc/codecs/wm8753.c | 17 ++++------------- sound/soc/codecs/wm9712.c | 17 ++++------------- sound/soc/codecs/wm9713.c | 15 ++++----------- 5 files changed, 20 insertions(+), 61 deletions(-)
sound/soc/codecs/wm8731.c +4 -12
@@ -193,7 +193,7 @@ SND_SOC_DAPM_INPUT("RLINEIN"), SND_SOC_DAPM_INPUT("LLINEIN"), }; -static const char *intercon[][3 ] = { +static const struct snd_soc_dapm_route intercon[] = {/* output mixer */ {"Output Mixer" ,"Line Bypass Switch" ,"Line Input" }, {"Output Mixer" ,"HiFi Playback Switch" ,"DAC" },
@@ -214,22 +214,14 @@ static const char *intercon[][3] = { {"Line Input", NULL, "LLINEIN"}, {"Line Input", NULL, "RLINEIN"}, {"Mic Bias", NULL, "MICIN"}, - -/* terminator */ - {NULL, NULL, NULL}, };static int wm8731_add_widgets (struct snd_soc_codec *codec) { -int i; - -for (i =0 ; i <ARRAY_SIZE (wm8731_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &wm8731_dapm_widgets[i]); +snd_soc_dapm_new_controls (codec, wm8731_dapm_widgets, +ARRAY_SIZE (wm8731_dapm_widgets)); -/* set up 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));snd_soc_dapm_new_widgets (codec);return 0 ;
sound/soc/codecs/wm8750.c +4 -12
@@ -378,7 +378,7 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = { SND_SOC_DAPM_INPUT("RINPUT3"), }; -static const char *audio_map[][3 ] = { +static const struct snd_soc_dapm_route audio_map[] = {/* left mixer */ {"Left Mixer" ,"Playback Switch" ,"Left DAC" }, {"Left Mixer" ,"Left Bypass Switch" ,"Left Line Mux" },
@@ -470,22 +470,14 @@ static const char *audio_map[][3] = {/* ADC */ {"Left ADC", NULL, "Left ADC Mux"}, {"Right ADC", NULL, "Right ADC Mux"}, - -/* terminator */ - {NULL, NULL, NULL}, };static int wm8750_add_widgets (struct snd_soc_codec *codec) { -int i; - -for (i =0 ; i <ARRAY_SIZE (wm8750_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &wm8750_dapm_widgets[i]); +snd_soc_dapm_new_controls (codec, wm8750_dapm_widgets, +ARRAY_SIZE (wm8750_dapm_widgets)); -/* set up audio path audio_mapnects */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); +snd_soc_dapm_add_routes (codec, audio_map,ARRAY_SIZE (audio_map));snd_soc_dapm_new_widgets (codec);return 0 ;
sound/soc/codecs/wm8753.c +4 -13
@@ -523,7 +523,7 @@ SND_SOC_DAPM_INPUT("MIC2"), SND_SOC_DAPM_VMID("VREF"), }; -static const char *audio_map[][3 ] = { +static const struct snd_soc_dapm_route audio_map[] = {/* left mixer */ {"Left Mixer" ,"Left Playback Switch" ,"Left DAC" }, {"Left Mixer" ,"Voice Playback Switch" ,"Voice DAC" },
@@ -674,23 +674,14 @@ static const char *audio_map[][3] = {/* ACOP */ {"ACOP", NULL, "ALC Mixer"}, - -/* terminator */ - {NULL, NULL, NULL}, };static int wm8753_add_widgets (struct snd_soc_codec *codec) { -int i; +snd_soc_dapm_new_controls (codec, wm8753_dapm_widgets, +ARRAY_SIZE (wm8753_dapm_widgets)); -for (i =0 ; i <ARRAY_SIZE (wm8753_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &wm8753_dapm_widgets[i]); - -/* set up the WM8753 audio map */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) { -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); - } +snd_soc_dapm_add_routes (codec, audio_map,ARRAY_SIZE (audio_map));snd_soc_dapm_new_widgets (codec);return 0 ;
sound/soc/codecs/wm9712.c +4 -13
@@ -350,7 +350,7 @@ SND_SOC_DAPM_INPUT("MIC1"), SND_SOC_DAPM_INPUT("MIC2"), }; -static const char *audio_map[][3 ] = { +static const struct snd_soc_dapm_route audio_map[] = {/* virtual mixer - mixes left & right channels for spk and mono */ {"AC97 Mixer" ,NULL ,"Left DAC" }, {"AC97 Mixer" ,NULL ,"Right DAC" },
@@ -446,23 +446,14 @@ static const char *audio_map[][3] = { {"Speaker PGA", NULL, "Speaker Mux"}, {"LOUT2", NULL, "Speaker PGA"}, {"ROUT2", NULL, "Speaker PGA"}, - - {NULL, NULL, NULL}, };static int wm9712_add_widgets (struct snd_soc_codec *codec) { -int i; - -for (i =0 ; i <ARRAY_SIZE (wm9712_dapm_widgets); i++) { -snd_soc_dapm_new_control (codec, &wm9712_dapm_widgets[i]); - } +snd_soc_dapm_new_controls (codec, wm9712_dapm_widgets, +ARRAY_SIZE (wm9712_dapm_widgets)); -/* set up audio path audio_mapnects */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) { -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); - } +snd_soc_dapm_add_routes (codec, audio_map,ARRAY_SIZE (audio_map));snd_soc_dapm_new_widgets (codec);return 0 ;
sound/soc/codecs/wm9713.c +4 -11
@@ -456,7 +456,7 @@ SND_SOC_DAPM_INPUT("MIC2B"), SND_SOC_DAPM_VMID("VMID"), }; -static const char *audio_map[][3 ] = { +static const struct snd_soc_dapm_route audio_map[] = {/* left HP mixer */ {"Left HP Mixer" ,"PC Beep Playback Switch" ,"PCBEEP" }, {"Left HP Mixer" ,"Voice Playback Switch" ,"Voice DAC" },
@@ -607,21 +607,14 @@ static const char *audio_map[][3] = { {"Capture Mono Mux", "Stereo", "Capture Mixer"}, {"Capture Mono Mux", "Left", "Left Capture Source"}, {"Capture Mono Mux", "Right", "Right Capture Source"}, - - {NULL, NULL, NULL}, };static int wm9713_add_widgets (struct snd_soc_codec *codec) { -int i; - -for (i =0 ; i <ARRAY_SIZE (wm9713_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &wm9713_dapm_widgets[i]); +snd_soc_dapm_new_controls (codec, wm9713_dapm_widgets, +ARRAY_SIZE (wm9713_dapm_widgets)); -/* set up audio path audio_mapnects */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); +snd_soc_dapm_add_routes (codec, audio_map,ARRAY_SIZE (audio_map));snd_soc_dapm_new_widgets (codec);return 0 ;
Signature · 1 line
1.5.5.1
PATCH 5/10 soc - tlv320aic3x - Convert to use bulk registration APIs
--- sound/soc/codecs/tlv320aic3x.c | 15 ++++----------- 1 files changed, 4 insertions(+), 11 deletions(-)
sound/soc/codecs/tlv320aic3x.c +4 -11
@@ -497,7 +497,7 @@ static const struct snd_soc_dapm_widget aic3x_dapm_widgets[] = { SND_SOC_DAPM_INPUT("LINE2R"), }; -static const char *intercon[][3 ] = { +static const struct snd_soc_dapm_route intercon[] = {/* Left Output */ {"Left DAC Mux" ,"DAC_L1" ,"Left DAC" }, {"Left DAC Mux" ,"DAC_L2" ,"Left DAC" },
@@ -641,22 +641,15 @@ static const char *intercon[][3] = { {"Right Line Out", NULL, "Right Line2 Bypass Mixer"}, {"Mono Out", NULL, "Right Line2 Bypass Mixer"}, {"Right HP Out", NULL, "Right Line2 Bypass Mixer"}, - -/* terminator */ - {NULL, NULL, NULL}, };static int aic3x_add_widgets (struct snd_soc_codec *codec) { -int i; - -for (i =0 ; i <ARRAY_SIZE (aic3x_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &aic3x_dapm_widgets[i]); +snd_soc_dapm_new_controls (codec, aic3x_dapm_widgets, +ARRAY_SIZE (aic3x_dapm_widgets));/* set up 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));snd_soc_dapm_new_widgets (codec);return 0 ;
Signature · 1 line
1.5.5.1
PATCH 6/10 soc - Zaurus - Convert to bulk DAPM registration APIs
--- sound/soc/pxa/corgi.c | 12 ++++-------- sound/soc/pxa/poodle.c | 14 +++++--------- sound/soc/pxa/spitz.c | 14 +++++--------- sound/soc/pxa/tosa.c | 14 ++++---------- 4 files changed, 18 insertions(+), 36 deletions(-)
sound/soc/pxa/corgi.c +4 -8
@@ -247,7 +247,7 @@ SND_SOC_DAPM_HP("Headset Jack", NULL), };/* Corgi machine audio map (connections to the codec pins) */ -static const char *audio_map[][3 ] = { +static const struct snd_soc_dapm_route audio_map[] = {/* headset Jack - in = micin, out = LHPOUT*/ {"Headset Jack" ,NULL ,"LHPOUT" },
@@ -265,8 +265,6 @@ static const char *audio_map[][3] = {/* Same as the above but no mic bias for line signals */ {"MICIN", NULL, "Line Jack"}, - - {NULL, NULL, NULL}, }; static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset",
@@ -303,13 +301,11 @@ static int corgi_wm8731_init(struct snd_soc_codec *codec) }/* Add corgi specific widgets */ -for (i =0 ; i <ARRAY_SIZE (wm8731_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &wm8731_dapm_widgets[i]); +snd_soc_dapm_new_controls (codec, wm8731_dapm_widgets, +ARRAY_SIZE (wm8731_dapm_widgets));/* Set up corgi specific audio path audio_map */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); +snd_soc_dapm_add_routes (codec, audio_map,ARRAY_SIZE (audio_map));snd_soc_dapm_sync_endpoints (codec);return 0 ;
sound/soc/pxa/poodle.c +5 -9
@@ -215,8 +215,8 @@ SND_SOC_DAPM_HP("Headphone Jack", NULL), SND_SOC_DAPM_SPK("Ext Spk", poodle_amp_event), }; -/* Corgi machine audio_mapnections to the codec pins */ -static const char *audio_map[][3 ] = { +/* Corgi machine connections to the codec pins */ +static const struct snd_soc_dapm_route audio_map[] = {/* headphone connected to LHPOUT1, RHPOUT1 */ {"Headphone Jack" ,NULL ,"LHPOUT" },
@@ -225,8 +225,6 @@ static const char *audio_map[][3] = {/* speaker connected to LOUT, ROUT */ {"Ext Spk", NULL, "ROUT"}, {"Ext Spk", NULL, "LOUT"}, - - {NULL, NULL, NULL}, };static const char *jack_function[] = {"Off" ,"Headphone" };
@@ -263,13 +261,11 @@ static int poodle_wm8731_init(struct snd_soc_codec *codec) }/* Add poodle specific widgets */ -for (i =0 ; i <ARRAY_SIZE (wm8731_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &wm8731_dapm_widgets[i]); +snd_soc_dapm_new_controls (codec, wm8731_dapm_widgets, +ARRAY_SIZE (wm8731_dapm_widgets));/* Set up poodle specific audio path audio_map */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); +snd_soc_dapm_add_routes (codec, audio_map,ARRAY_SIZE (audio_map));snd_soc_dapm_sync_endpoints (codec);return 0 ;
sound/soc/pxa/spitz.c +5 -9
@@ -250,7 +250,7 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = { };/* Spitz machine audio_map */ -static const char *audio_map[][3 ] = { +static const struct snd_soc_dapm_route audio_map[] = {/* headphone connected to LOUT1, ROUT1 */ {"Headphone Jack" ,NULL ,"LOUT1" },
@@ -269,8 +269,6 @@ static const char *audio_map[][3] = {/* line is connected to input 1 - no bias */ {"LINPUT1", NULL, "Line Jack"}, - - {NULL, NULL, NULL}, }; static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset",
@@ -313,13 +311,11 @@ static int spitz_wm8750_init(struct snd_soc_codec *codec) }/* Add spitz specific widgets */ -for (i =0 ; i <ARRAY_SIZE (wm8750_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &wm8750_dapm_widgets[i]); +snd_soc_dapm_new_controls (codec, wm8750_dapm_widgets, +ARRAY_SIZE (wm8750_dapm_widgets)); -/* Set up spitz specific audio path audio_map */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); +/* Set up spitz specific audio paths */ +snd_soc_dapm_add_routes (codec, audio_map,ARRAY_SIZE (audio_map));snd_soc_dapm_sync_endpoints (codec);return 0 ;
sound/soc/pxa/tosa.c +4 -10
@@ -154,7 +154,7 @@ SND_SOC_DAPM_SPK("Speaker", NULL), };/* tosa audio map */ -static const char *audio_map[][3 ] = { +static const snd_soc_dapm_route audio_map[] = {/* headphone connected to HPOUTL, HPOUTR */ {"Headphone Jack" ,NULL ,"HPOUTL" },
@@ -173,8 +173,6 @@ static const char *audio_map[][3] = { {"Headset Jack", NULL, "HPOUTR"}, {"LINEINR", NULL, "Mic Bias"}, {"Mic Bias", NULL, "Headset Jack"}, - - {NULL, NULL, NULL}, }; static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset",
@@ -208,15 +206,11 @@ static int tosa_ac97_init(struct snd_soc_codec *codec) }/* add tosa specific widgets */ -for (i =0 ; i <ARRAY_SIZE (tosa_dapm_widgets); i++) { -snd_soc_dapm_new_control (codec, &tosa_dapm_widgets[i]); - } +snd_soc_dapm_new_controls (codec, &tosa_dapm_widgets, +ARRAY_SIZE (tosa_dapm_widgets));/* set up tosa specific audio path audio_map */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) { -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); - } +snd_soc_dapm_add_routes (codec, audio_map,ARRAY_SIZE (audio_map));snd_soc_dapm_sync_endpoints (codec);return 0 ;
Signature · 1 line
1.5.5.1
PATCH 7/10 soc - eti_b1_wm8731 - Convert to use bulk DAPM control registration
--- sound/soc/at91/eti_b1_wm8731.c | 17 ++++------------- 1 files changed, 4 insertions(+), 13 deletions(-)
sound/soc/at91/eti_b1_wm8731.c +4 -13
@@ -191,7 +191,7 @@ static const struct snd_soc_dapm_widget eti_b1_dapm_widgets[] = { SND_SOC_DAPM_SPK("Ext Spk", NULL), }; -static const char *intercon[][3 ] = { +static const struct snd_soc_dapm_route intercon[] = {/* speaker connected to LHPOUT */ {"Ext Spk" ,NULL ,"LHPOUT" },
@@ -199,9 +199,6 @@ static const char *intercon[][3] = {/* mic is connected to Mic Jack, with WM8731 Mic Bias */ {"MICIN", NULL, "Mic Bias"}, {"Mic Bias", NULL, "Int Mic"}, - -/* terminator */ - {NULL, NULL, NULL}, };/*
@@ -209,20 +206,14 @@ static const char *intercon[][3] = {*/ static int eti_b1_wm8731_init (struct snd_soc_codec *codec) { -int i; -DBG ("eti_b1_wm8731_init() called\n" );/* Add specific widgets */ -for (i =0 ; i <ARRAY_SIZE (eti_b1_dapm_widgets); i++) { -snd_soc_dapm_new_control (codec, &eti_b1_dapm_widgets[i]); - } +snd_soc_dapm_new_controls (codec, eti_b1_dapm_widgets, +ARRAY_SIZE (eti_b1_dapm_widgets));/* Set up specific 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_route (codec, intercon,ARRAY_SIZE (intercon));/* not connected */ snd_soc_dapm_set_endpoint (codec,"RLINEIN" ,0 );
Signature · 1 line
1.5.5.1
PATCH 8/10 soc - neo1973_wm8753 - Convert to bulk DAPM registration APIs
--- sound/soc/s3c24xx/neo1973_wm8753.c | 17 ++++++----------- 1 files changed, 6 insertions(+), 11 deletions(-)
sound/soc/s3c24xx/neo1973_wm8753.c +6 -11
@@ -425,8 +425,7 @@ static const struct snd_soc_dapm_widget wm8753_dapm_widgets[] = { }; -/* example machine audio_mapnections */ -static const char *audio_map[][3 ] = { +static const struct snd_soc_dapm_route dapm_routes[] = {/* Connections to the lm4857 amp */ {"Audio Out" ,NULL ,"LOUT1" },
@@ -449,8 +448,6 @@ static const char *audio_map[][3] = {/* Connect the ALC pins */ {"ACIN", NULL, "ACOP"}, - - {NULL, NULL, NULL}, }; static const char *lm4857_mode[] = {
@@ -526,8 +523,8 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)set_scenario_endpoints (codec,NEO_AUDIO_OFF );/* Add neo1973 specific widgets */ -for (i =0 ; i <ARRAY_SIZE (wm8753_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &wm8753_dapm_widgets[i]); +snd_soc_dapm_new_controls (codec, wm8753_dapm_widgets, +ARRAY_SIZE (wm8753_dapm_widgets));/* add neo1973 specific controls */ for (i =0 ; i <ARRAY_SIZE (wm8753_neo1973_controls); i++) {
@@ -538,11 +535,9 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)return err; } -/* set up neo1973 specific audio path audio_mapnects */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) { -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); - } +/* set up neo1973 specific audio routes */ + err =snd_soc_dapm_add_routes (codec, dapm_routes, +ARRAY_SIZE (dapm_routes));snd_soc_dapm_sync_endpoints (codec);return 0 ;
Signature · 1 line
1.5.5.1
PATCH 9/10 soc - davinci-evm - Update for bulk DAPM registration APIs
--- sound/soc/davinci/davinci-evm.c | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-)
sound/soc/davinci/davinci-evm.c +4 -10
@@ -71,7 +71,7 @@ static const struct snd_soc_dapm_widget aic3x_dapm_widgets[] = { };/* davinci-evm machine audio_mapnections to the codec pins */ -static const char *audio_map[][3 ] = { +static const struct snd_soc_dapm_route audio_map[] = {/* Headphone connected to HPLOUT, HPROUT */ {"Headphone Jack" ,NULL ,"HPLOUT" }, {"Headphone Jack" ,NULL ,"HPROUT" },
@@ -90,23 +90,17 @@ static const char *audio_map[][3] = { {"LINE2L", NULL, "Line In"}, {"LINE1R", NULL, "Line In"}, {"LINE2R", NULL, "Line In"}, - - {NULL, NULL, NULL}, };/* Logic for a aic3x as connected on a davinci-evm */ static int evm_aic3x_init (struct snd_soc_codec *codec) { -int i; -/* Add davinci-evm specific widgets */ -for (i =0 ; i <ARRAY_SIZE (aic3x_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &aic3x_dapm_widgets[i]); +snd_soc_dapm_new_controls (codec, aic3x_dapm_widgets, +ARRAY_SIZE (aic3x_dapm_widgets));/* Set up davinci-evm specific audio path audio_map */ -for (i =0 ; audio_map[i][0 ] !=NULL ; i++) -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); +snd_soc_dapm_add_routes (codec, audio_map,ARRAY_SIZE (audio_map));/* not connected */ snd_soc_dapm_set_endpoint (codec,"MONO_LOUT" ,0 );
Signature · 1 line
1.5.5.1
PATCH 10/10 soc - n810 - Update for bulk DAPM registration APIs
--- sound/soc/omap/n810.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
sound/soc/omap/n810.c +4 -6
@@ -177,7 +177,7 @@ static const struct snd_soc_dapm_widget aic33_dapm_widgets[] = { SND_SOC_DAPM_HP("Headphone Jack", n810_jack_event), }; -static const char *audio_map[][3 ] = { +static const struct snd_soc_dapm_route audio_map[] = { {"Headphone Jack" ,NULL ,"HPLOUT" }, {"Headphone Jack" ,NULL ,"HPROUT" },
@@ -217,13 +217,11 @@ static int n810_aic33_init(struct snd_soc_codec *codec) }/* Add N810 specific widgets */ -for (i =0 ; i <ARRAY_SIZE (aic33_dapm_widgets); i++) -snd_soc_dapm_new_control (codec, &aic33_dapm_widgets[i]); +snd_soc_dapm_new_controls (codec, aic33_dapm_widgets, +ARRAY_SIZE (aic33_dapm_widgets));/* Set up N810 specific audio path audio_map */ -for (i =0 ; i <ARRAY_SIZE (audio_map); i++) -snd_soc_dapm_connect_input (codec, audio_map[i][0 ], - audio_map[i][1 ], audio_map[i][2 ]); +snd_soc_dapm_add_routes (codec, audio_map,ARRAY_SIZE (audio_map));snd_soc_dapm_sync_endpoints (codec);
Signature · 1 line
1.5.5.1
Re: [PATCH 05/10] soc - tlv320aic3x - Convert to use bulk registration APIs
In reply to Mark BrownQuoted 6 lines · On Tue, 13 May 2008 12:40:10 +0100 "ext Mark Brown"…
Signed-off-by Mark Brown <[email protected]>Cc Jarkko Nikula <[email protected]>--- sound/soc/codecs/tlv320aic3x.c | 15 ++++----------- 1 files changed, 4 insertions(+), 11 deletions(-)
Hmm. I applied patches 2, 3, 5 and 10 to my n810-aic33 setup and following codec controls below disappear. Probably I miss some patch from asoc-dev since I build this test on top of linux-omap with two recent aic3x patches from Daniel?
Jarkko
new renamed from curr +0 -22
@@ -20,18 +20,7 @@ Simple mixer control 'Left DAC_L1 Mixer Mono',0 Simple mixer control 'Left HPCOM Mux',0 Simple mixer control 'Left Line1L Mux',0 -Simple mixer control 'Left Line2 Bypass Mixer HP Swit',0 -Simple mixer control 'Left Line2 Bypass Mixer HPCOM S',0 -Simple mixer control 'Left Line2 Bypass Mixer Line Sw',0 -Simple mixer control 'Left Line2 Bypass Mixer Mono Sw',0 Simple mixer control 'Left Line2L Mux',0 -Simple mixer control 'Left PGA Bypass Mixer HP',0 -Simple mixer control 'Left PGA Bypass Mixer HPCOM Swi',0 -Simple mixer control 'Left PGA Bypass Mixer Line Swit',0 -Simple mixer control 'Left PGA Bypass Mixer Mono Swit',0 -Simple mixer control 'Left PGA Mixer Line1L',0 -Simple mixer control 'Left PGA Mixer Line2L',0 -Simple mixer control 'Left PGA Mixer Mic3L',0 Simple mixer control 'PGA',0 Simple mixer control 'Right DAC Mux',0 Simple mixer control 'Right DAC_R1 Mixer HP',0
@@ -40,16 +29,5 @@ Simple mixer control 'Right DAC_R1 Mixer Mono',0 Simple mixer control 'Right HPCOM Mux',0 Simple mixer control 'Right Line1R Mux',0 -Simple mixer control 'Right Line2 Bypass Mixer HP Swi',0 -Simple mixer control 'Right Line2 Bypass Mixer HPCOM ',0 -Simple mixer control 'Right Line2 Bypass Mixer Line S',0 -Simple mixer control 'Right Line2 Bypass Mixer Mono S',0 Simple mixer control 'Right Line2R Mux',0 -Simple mixer control 'Right PGA Bypass Mixer HP Switc',0 -Simple mixer control 'Right PGA Bypass Mixer HPCOM Sw',0 -Simple mixer control 'Right PGA Bypass Mixer Line Swi',0 -Simple mixer control 'Right PGA Bypass Mixer Mono Swi',0 -Simple mixer control 'Right PGA Mixer Line1R',0 -Simple mixer control 'Right PGA Mixer Line2R',0 -Simple mixer control 'Right PGA Mixer Mic3R',0 Simple mixer control 'Speaker Function',0
Re: [PATCH 05/10] soc - tlv320aic3x - Convert to use bulk registration APIs
Quoted 4 lines · Jarkko Nikula
Hmm. I applied patches 2, 3, 5 and 10 to my n810-aic33 setup and following codec controls below disappear. Probably I miss some patch from asoc-dev since I build this test on top of linux-omap with two recent aic3x patches from Daniel?
No, there shouldn't be any other dependencies. I'll take a look but I don't have any relevant hardware. Are there any complaints in dmesg?
Re: [PATCH 05/10] soc - tlv320aic3x - Convert to use bulk registration APIs
In reply to Jarkko NikulaMy own patch [1] fixed this problem. Thanks to new log message "Failed to add route Mono Out->MONOLOUT" :-)
Jarkko
1.
http://mailman.alsa-project.org/pipermail/alsa-devel/2008-May/007721.html
Quoted 55 lines · On Tue, 13 May 2008 15:34:19 +0300 Jarkko Nikula <[email protected]>…
Quoted 6 lines · On Tue, 13 May 2008 12:40:10 +0100 "ext Mark Brown"…
Signed-off-by Mark Brown <[email protected]>Cc Jarkko Nikula <[email protected]>--- sound/soc/codecs/tlv320aic3x.c | 15 ++++----------- 1 files changed, 4 insertions(+), 11 deletions(-)Hmm. I applied patches 2, 3, 5 and 10 to my n810-aic33 setup and following codec controls below disappear. Probably I miss some patch from asoc-dev since I build this test on top of linux-omap with two recent aic3x patches from Daniel?
Jarkko
new renamed from curr +0
-22@@ -20,18 +20,7 @@ Simple mixer control 'Left DAC_L1 Mixer Mono',0 Simple mixer control 'Left HPCOM Mux',0 Simple mixer control 'Left Line1L Mux',0 -Simple mixer control 'Left Line2 Bypass Mixer HP Swit',0 -Simple mixer control 'Left Line2 Bypass Mixer HPCOM S',0 -Simple mixer control 'Left Line2 Bypass Mixer Line Sw',0 -Simple mixer control 'Left Line2 Bypass Mixer Mono Sw',0 Simple mixer control 'Left Line2L Mux',0 -Simple mixer control 'Left PGA Bypass Mixer HP',0 -Simple mixer control 'Left PGA Bypass Mixer HPCOM Swi',0 -Simple mixer control 'Left PGA Bypass Mixer Line Swit',0 -Simple mixer control 'Left PGA Bypass Mixer Mono Swit',0 -Simple mixer control 'Left PGA Mixer Line1L',0 -Simple mixer control 'Left PGA Mixer Line2L',0 -Simple mixer control 'Left PGA Mixer Mic3L',0 Simple mixer control 'PGA',0 Simple mixer control 'Right DAC Mux',0 Simple mixer control 'Right DAC_R1 Mixer HP',0@@ -40,16 +29,5 @@ Simple mixer control 'Right DAC_R1 Mixer Mono',0 Simple mixer control 'Right HPCOM Mux',0 Simple mixer control 'Right Line1R Mux',0 -Simple mixer control 'Right Line2 Bypass Mixer HP Swi',0 -Simple mixer control 'Right Line2 Bypass Mixer HPCOM ',0 -Simple mixer control 'Right Line2 Bypass Mixer Line S',0 -Simple mixer control 'Right Line2 Bypass Mixer Mono S',0 Simple mixer control 'Right Line2R Mux',0 -Simple mixer control 'Right PGA Bypass Mixer HP Switc',0 -Simple mixer control 'Right PGA Bypass Mixer HPCOM Sw',0 -Simple mixer control 'Right PGA Bypass Mixer Line Swi',0 -Simple mixer control 'Right PGA Bypass Mixer Mono Swi',0 -Simple mixer control 'Right PGA Mixer Line1R',0 -Simple mixer control 'Right PGA Mixer Line2R',0 -Simple mixer control 'Right PGA Mixer Mic3R',0 Simple mixer control 'Speaker Function',0
Re: [PATCH 05/10] soc - tlv320aic3x - Convert to use bulk registration APIs
Quoted 2 lines · Jarkko Nikula
My own patch [1] fixed this problem. Thanks to new log message "Failed to add route Mono
Out->MONOLOUT" :-)
Ah, excellent - that's already in ALSA so the patch series should apply safely. Thanks.
Takashi Iwai
AppliedAt Tue, 13 May 2008 12:40:06 +0100,
Quoted 8 lines · Mark Brown
From: Philipp Zabel <[email protected]>
I suspect that
snd_ctl_boolean_monoshould have beensnd_ctl_boolean_mono_infoinstead. This fixes the build for magician.Signed-off-by Philipp Zabel <[email protected]>Signed-off-by Liam Girdwood <[email protected]>
Applied all patches to ALSA tree. The first one was already applied directly to be pushed to the upstream at the next time.
Thanks,
Takashi
Quoted 2 lines · Takashi Iwai
Applied all patches to ALSA tree. The first one was already applied directly to be pushed to the upstream at the next time.
Thanks.
FWIW I'm currently basing my patches against the mm branch of:
git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa.git
so I will automagically drop anything that appears in hg. Is there anything better to use?
At Tue, 13 May 2008 14:41:12 +0100,
Quoted 6 lines · Mark Brown
Quoted 2 lines · Takashi Iwai
Applied all patches to ALSA tree. The first one was already applied directly to be pushed to the upstream at the next time.
Quoted 8 lines
Thanks.
FWIW I'm currently basing my patches against the mm branch of:
git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa.gitso I will automagically drop anything that appears in hg. Is there anything better to use?
I'm currently working on my own git:
git://git.kernel.orb/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
It's rebased sometimes, but not too often.
Takashi
Quoted 4 lines · Takashi Iwai
I'm currently working on my own git:
git://git.kernel.orb/pub/scm/linux/kernel/git/tiwai/sound-2.6.gitIt's rebased sometimes, but not too often.
The master branch looks like the best one to base things not intended for stable on?
At Tue, 13 May 2008 15:08:50 +0100,
Quoted 10 lines · Mark Brown
Quoted 4 lines · Takashi Iwai
I'm currently working on my own git:
git://git.kernel.orb/pub/scm/linux/kernel/git/tiwai/sound-2.6.gitIt's rebased sometimes, but not too often.
The master branch looks like the best one to base things not intended for stable on?
Yes, the master branch is for the next kernel release, and thus good for basing.
Takashi