All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets
@ 2015-05-03 17:27 Lars-Peter Clausen
  2015-05-03 17:27 ` [PATCH 2/5] ASoC: smdk_wm8994: " Lars-Peter Clausen
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Lars-Peter Clausen @ 2015-05-03 17:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Sangbeom Kim, Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

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.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/samsung/lowland.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/samsung/lowland.c b/sound/soc/samsung/lowland.c
index 5f15609..0d0f582 100644
--- a/sound/soc/samsung/lowland.c
+++ b/sound/soc/samsung/lowland.c
@@ -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,
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/5] ASoC: smdk_wm8994: Use card DAPM context to access widgets
  2015-05-03 17:27 [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets Lars-Peter Clausen
@ 2015-05-03 17:27 ` Lars-Peter Clausen
  2015-05-03 17:27 ` [PATCH 3/5] ASoC: smartq: Remove unnecessary snd_soc_dapm_disable_pin() Lars-Peter Clausen
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Lars-Peter Clausen @ 2015-05-03 17:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Sangbeom Kim, Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

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.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/samsung/smdk_wm8994.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
index d38595f..ff57b19 100644
--- a/sound/soc/samsung/smdk_wm8994.c
+++ b/sound/soc/samsung/smdk_wm8994.c
@@ -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");
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/5] ASoC: smartq: Remove unnecessary snd_soc_dapm_disable_pin()
  2015-05-03 17:27 [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets Lars-Peter Clausen
  2015-05-03 17:27 ` [PATCH 2/5] ASoC: smdk_wm8994: " Lars-Peter Clausen
@ 2015-05-03 17:27 ` Lars-Peter Clausen
  2015-05-03 17:27 ` [PATCH 4/5] ASoC: smartq: Use card DAPM context to access widgets Lars-Peter Clausen
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Lars-Peter Clausen @ 2015-05-03 17:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Sangbeom Kim, Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The "Headphone Jack" widget is managed by the jack detection layer, there
is no need to manually disable.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/samsung/smartq_wm8987.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c
index dfbe2db..c75f98d 100644
--- a/sound/soc/samsung/smartq_wm8987.c
+++ b/sound/soc/samsung/smartq_wm8987.c
@@ -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,
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/5] ASoC: smartq: Use card DAPM context to access widgets
  2015-05-03 17:27 [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets Lars-Peter Clausen
  2015-05-03 17:27 ` [PATCH 2/5] ASoC: smdk_wm8994: " Lars-Peter Clausen
  2015-05-03 17:27 ` [PATCH 3/5] ASoC: smartq: Remove unnecessary snd_soc_dapm_disable_pin() Lars-Peter Clausen
@ 2015-05-03 17:27 ` Lars-Peter Clausen
  2015-05-03 17:27 ` [PATCH 5/5] ASoC: speyside: Use snd_soc_codec_get_dapm() Lars-Peter Clausen
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Lars-Peter Clausen @ 2015-05-03 17:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Sangbeom Kim, Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

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.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/samsung/smartq_wm8987.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c
index c75f98d..a0fe37f 100644
--- a/sound/soc/samsung/smartq_wm8987.c
+++ b/sound/soc/samsung/smartq_wm8987.c
@@ -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 */
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/5] ASoC: speyside: Use snd_soc_codec_get_dapm()
  2015-05-03 17:27 [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets Lars-Peter Clausen
                   ` (2 preceding siblings ...)
  2015-05-03 17:27 ` [PATCH 4/5] ASoC: smartq: Use card DAPM context to access widgets Lars-Peter Clausen
@ 2015-05-03 17:27 ` Lars-Peter Clausen
  2015-05-04  8:07   ` Charles Keepax
  2015-05-04  8:07 ` [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets Charles Keepax
  2015-05-04 11:55 ` Mark Brown
  5 siblings, 1 reply; 8+ messages in thread
From: Lars-Peter Clausen @ 2015-05-03 17:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Sangbeom Kim, Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The 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.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
Depends on topic/dapm
---
 sound/soc/samsung/speyside.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c
index 2dcb988..d1ae21c 100644
--- a/sound/soc/samsung/speyside.c
+++ b/sound/soc/samsung/speyside.c
@@ -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)
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets
  2015-05-03 17:27 [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets Lars-Peter Clausen
                   ` (3 preceding siblings ...)
  2015-05-03 17:27 ` [PATCH 5/5] ASoC: speyside: Use snd_soc_codec_get_dapm() Lars-Peter Clausen
@ 2015-05-04  8:07 ` Charles Keepax
  2015-05-04 11:55 ` Mark Brown
  5 siblings, 0 replies; 8+ messages in thread
From: Charles Keepax @ 2015-05-04  8:07 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Sangbeom Kim, alsa-devel, Mark Brown, Liam Girdwood, patches

On Sun, May 03, 2015 at 07:27:06PM +0200, Lars-Peter Clausen wrote:
> 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.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 5/5] ASoC: speyside: Use snd_soc_codec_get_dapm()
  2015-05-03 17:27 ` [PATCH 5/5] ASoC: speyside: Use snd_soc_codec_get_dapm() Lars-Peter Clausen
@ 2015-05-04  8:07   ` Charles Keepax
  0 siblings, 0 replies; 8+ messages in thread
From: Charles Keepax @ 2015-05-04  8:07 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Sangbeom Kim, alsa-devel, Mark Brown, Liam Girdwood, patches

On Sun, May 03, 2015 at 07:27:10PM +0200, Lars-Peter Clausen wrote:
> The 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.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets
  2015-05-03 17:27 [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets Lars-Peter Clausen
                   ` (4 preceding siblings ...)
  2015-05-04  8:07 ` [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets Charles Keepax
@ 2015-05-04 11:55 ` Mark Brown
  5 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2015-05-04 11:55 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Sangbeom Kim, Charles Keepax, patches, Liam Girdwood, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 569 bytes --]

On Sun, May 03, 2015 at 07:27:06PM +0200, Lars-Peter Clausen wrote:
> 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.

Applied all, thanks.  Whenever the headers were reorganized to remove
references to the mach headers these dependencies should have been
updated.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-05-04 13:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-03 17:27 [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets Lars-Peter Clausen
2015-05-03 17:27 ` [PATCH 2/5] ASoC: smdk_wm8994: " Lars-Peter Clausen
2015-05-03 17:27 ` [PATCH 3/5] ASoC: smartq: Remove unnecessary snd_soc_dapm_disable_pin() Lars-Peter Clausen
2015-05-03 17:27 ` [PATCH 4/5] ASoC: smartq: Use card DAPM context to access widgets Lars-Peter Clausen
2015-05-03 17:27 ` [PATCH 5/5] ASoC: speyside: Use snd_soc_codec_get_dapm() Lars-Peter Clausen
2015-05-04  8:07   ` Charles Keepax
2015-05-04  8:07 ` [PATCH 1/5] ASoC: lowland: Use card DAPM context to access widgets Charles Keepax
2015-05-04 11:55 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.