ASoC: lowland: Use card DAPM context to access widgets
Subsystems (4)
PATCH 1/5 ASoC: lowland: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context.
--- sound/soc/samsung/lowland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/samsung/lowland.c +1 -1
@@ -72,7 +72,7 @@ static int lowland_wm9081_init(struct snd_soc_pcm_runtime *rtd) {struct snd_soc_codec *codec = rtd->codec; -snd_soc_dapm_nc_pin (&codec->dapm,"LINEOUT" ); +snd_soc_dapm_nc_pin (&rtd->card->dapm,"LINEOUT" );/* At any time the WM9081 is active it will have this clock */ return snd_soc_codec_set_sysclk(codec, WM9081_SYSCLK_MCLK, 0,
Signature · 1 line
1.8.0
PATCH 2/5 ASoC: smdk_wm8994: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context.
--- sound/soc/samsung/smdk_wm8994.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/samsung/smdk_wm8994.c +1 -2
@@ -86,8 +86,7 @@ static struct snd_soc_ops smdk_ops = {static int smdk_wm8994_init_paiftx (struct snd_soc_pcm_runtime *rtd) { -struct snd_soc_codec *codec = rtd->codec; -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm = &rtd->card->dapm;/* Other pins NC */ snd_soc_dapm_nc_pin (dapm,"HPOUT2P" );
Signature · 1 line
1.8.0
PATCH 3/5 ASoC: smartq: Remove unnecessary snd_soc_dapm_disable_pin()
In reply to Lars-Peter ClausenThe "Headphone Jack" widget is managed by the jack detection layer, there is no need to manually disable.
--- sound/soc/samsung/smartq_wm8987.c | 3 --- 1 file changed, 3 deletions(-)
sound/soc/samsung/smartq_wm8987.c +0 -3
@@ -147,9 +147,6 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd)snd_soc_dapm_nc_pin (dapm,"OUT3" );snd_soc_dapm_nc_pin (dapm,"ROUT1" ); -/* set endpoints to default off mode */ -snd_soc_dapm_disable_pin (dapm,"Headphone Jack" ); -/* Headphone jack detection */ err = snd_soc_card_jack_new(rtd->card, "Headphone Jack", SND_JACK_HEADPHONE, &smartq_jack,
Signature · 1 line
1.8.0
PATCH 4/5 ASoC: smartq: Use card DAPM context to access widgets
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context.
--- sound/soc/samsung/smartq_wm8987.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/samsung/smartq_wm8987.c +1 -2
@@ -137,8 +137,7 @@ static const struct snd_soc_dapm_route audio_map[] = {static int smartq_wm8987_init (struct snd_soc_pcm_runtime *rtd) { -struct snd_soc_codec *codec = rtd->codec; -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm = &rtd->card->dapm;int err =0 ;/* set endpoints to not connected */
Signature · 1 line
1.8.0
PATCH 5/5 ASoC: speyside: Use snd_soc_codec_get_dapm()
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed. Replace direct access to it with snd_soc_codec_get_dapm(), which will return the DAPM context for the CODEC.
---
Depends on topic/dapm
--- sound/soc/samsung/speyside.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/samsung/speyside.c +1 -1
@@ -123,7 +123,7 @@ static void speyside_set_polarity(struct snd_soc_codec *codec,gpio_direction_output (WM8996_HPSEL_GPIO , speyside_jack_polarity);/* Re-run DAPM to make sure we're using the correct mic bias */ -snd_soc_dapm_sync (&codec->dapm); +snd_soc_dapm_sync (snd_soc_codec_get_dapm (codec)); }static int speyside_wm0010_init (struct snd_soc_pcm_runtime *rtd)
Signature · 1 line
1.8.0
Re: [PATCH 5/5] ASoC: speyside: Use snd_soc_codec_get_dapm()
Quoted 6 lines · Lars-Peter Clausen
The dapm field of the
snd_soc_codecstruct is eventually going to be removed. Replace direct access to it withsnd_soc_codec_get_dapm(), which will return the DAPM context for the CODEC.Signed-off-by Lars-Peter Clausen <[email protected]>---
Thanks,
Charles
Quoted 8 lines · Lars-Peter Clausen
The dapm field of the
snd_soc_codecstruct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context.Signed-off-by Lars-Peter Clausen <[email protected]>---
Thanks,
Charles
Quoted 5 lines · Lars-Peter Clausen
The dapm field of the
snd_soc_codecstruct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context.
Applied all, thanks. Whenever the headers were reorganized to remove references to the mach headers these dependencies should have been updated.