All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] ASoC: DAPM: Allow multiple mixer sources to be routed via the same switch
@ 2011-08-15 18:15 ` Lars-Peter Clausen
  0 siblings, 0 replies; 53+ messages in thread
From: Lars-Peter Clausen @ 2011-08-15 18:15 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: alsa-devel, device-drivers-devel, linux-kernel, Mike Frysinger,
	Lars-Peter Clausen

Currently it is only possible to route one source per switch into a mixer.
This patch modifies the code, so that it is possible to route multiple sources
into a mixer via the same switch. One use-case for this is routing a stereo
channel pair into a mono-mixer via the same switch.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/soc-dapm.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index c265311..170c4ff 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -443,6 +443,11 @@ static int dapm_new_mixer(struct snd_soc_dapm_widget *w)
 			if (path->name != (char *)w->kcontrol_news[i].name)
 				continue;
 
+			if (w->kcontrols[i]) {
+				path->kcontrol = w->kcontrols[i];
+				continue;
+			}
+
 			wlistsize = sizeof(struct snd_soc_dapm_widget_list) +
 				    sizeof(struct snd_soc_dapm_widget *),
 			wlist = kzalloc(wlistsize, GFP_KERNEL);
@@ -1556,7 +1561,6 @@ static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
 		/* found, now check type */
 		found = 1;
 		path->connect = connect;
-		break;
 	}
 
 	if (found)
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 53+ messages in thread
* [PATCH 1/4] ASoC: DAPM: Allow multiple mixer sources to be routed via the same switch
@ 2011-08-10  3:52 Lars-Peter Clausen
  2011-08-10  3:52   ` Lars-Peter Clausen
  0 siblings, 1 reply; 53+ messages in thread
From: Lars-Peter Clausen @ 2011-08-10  3:52 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: alsa-devel, device-drivers-devel, linux-kernel, Mike Frysinger,
	Lars-Peter Clausen

Currently it is only possible to route one source per switch into a mixer.
This patch modifies the code, so that it is possible to route multiple sources
into a mixer via the same switch. One use-case for this is routing a stereo
channel pair into a mono-mixer via the same switch.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/soc-dapm.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index c265311..170c4ff 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -443,6 +443,11 @@ static int dapm_new_mixer(struct snd_soc_dapm_widget *w)
 			if (path->name != (char *)w->kcontrol_news[i].name)
 				continue;
 
+			if (w->kcontrols[i]) {
+				path->kcontrol = w->kcontrols[i];
+				continue;
+			}
+
 			wlistsize = sizeof(struct snd_soc_dapm_widget_list) +
 				    sizeof(struct snd_soc_dapm_widget *),
 			wlist = kzalloc(wlistsize, GFP_KERNEL);
@@ -1556,7 +1561,6 @@ static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
 		/* found, now check type */
 		found = 1;
 		path->connect = connect;
-		break;
 	}
 
 	if (found)
-- 
1.7.2.5


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

end of thread, other threads:[~2011-08-19 22:02 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-15 18:15 [PATCH 1/4] ASoC: DAPM: Allow multiple mixer sources to be routed via the same switch Lars-Peter Clausen
2011-08-15 18:15 ` Lars-Peter Clausen
2011-08-15 18:15 ` [PATCH 2/4] ASoC: Add ADAU1373 codec support Lars-Peter Clausen
2011-08-15 20:31   ` USB Audio questions Pierre-Louis Bossart
     [not found]   ` <4e498227.854fdf0a.0dd4.6281SMTPIN_ADDED@mx.google.com>
2011-08-15 20:55     ` Daniel Mack
2011-08-15 21:48       ` Pierre-Louis Bossart
     [not found]   ` <000001cc5b8a$4a6577c0$df306740$@bossart@linux.intel.com>
2011-08-16  5:30     ` David Henningsson
2011-08-16  6:47       ` Clemens Ladisch
2011-08-16  6:37     ` Clemens Ladisch
2011-08-16  7:30       ` Daniel Mack
2011-08-16 15:46         ` Clemens Ladisch
2011-08-16 15:38       ` Pierre-Louis Bossart
     [not found]       ` <20110816145353.GB5233@xanatos>
2011-08-16 15:44         ` Pierre-Louis Bossart
     [not found]       ` <000601cc5c2a$87a26350$96e729f0$@bossart@linux.intel.com>
2011-08-16 16:09         ` Clemens Ladisch
2011-08-16 17:19           ` Pierre-Louis Bossart
     [not found]           ` <000001cc5c38$b07abee0$11703ca0$@bossart@linux.intel.com>
2011-08-17  6:29             ` Clemens Ladisch
2011-08-17 15:21               ` Pierre-Louis Bossart
2011-08-19 22:02               ` Pierre-Louis Bossart
2011-08-16 20:41         ` Torsten Schenk
2011-08-16 22:11           ` Pavel Hofman
2011-08-17  6:36             ` Clemens Ladisch
     [not found]           ` <000001cc5c5a$e7d5c3e0$b7814ba0$@bossart@linux.intel.com>
2011-08-16 22:13             ` Torsten Schenk
2011-08-16 15:54   ` [PATCH 2/4] ASoC: Add ADAU1373 codec support Mark Brown
2011-08-16 15:54     ` Mark Brown
2011-08-15 18:15 ` [PATCH 3/4] ASoC: Blackfin: ADAU1373 eval board support Lars-Peter Clausen
2011-08-15 18:15   ` Lars-Peter Clausen
2011-08-16 15:54   ` Mark Brown
2011-08-16 15:54     ` Mark Brown
2011-08-15 18:15 ` [PATCH 4/4] Blackfin: bf537: Stamp: Register ASoC EVAL-ADAU1373 board driver Lars-Peter Clausen
2011-08-15 18:15   ` Lars-Peter Clausen
2011-08-16 15:56   ` Mark Brown
2011-08-16 15:56     ` Mark Brown
2011-08-18 13:52     ` Lars-Peter Clausen
2011-08-18 13:52       ` Lars-Peter Clausen
2011-08-15 23:25 ` [PATCH 1/4] ASoC: DAPM: Allow multiple mixer sources to be routed via the same switch Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2011-08-10  3:52 Lars-Peter Clausen
2011-08-10  3:52 ` [PATCH 2/4] ASoC: Add ADAU1373 codec support Lars-Peter Clausen
2011-08-10  3:52   ` Lars-Peter Clausen
2011-08-10  6:11   ` Lars-Peter Clausen
2011-08-10  6:11     ` Lars-Peter Clausen
2011-08-11  9:27   ` Mark Brown
2011-08-11  9:27     ` Mark Brown
2011-08-11 10:11     ` Lars-Peter Clausen
2011-08-11 10:11       ` Lars-Peter Clausen
2011-08-11 13:16       ` Mark Brown
2011-08-11 13:16         ` Mark Brown
2011-08-12  0:20         ` Lars-Peter Clausen
2011-08-12  0:20           ` Lars-Peter Clausen
2011-08-12  1:20           ` Mark Brown
2011-08-12  1:20             ` Mark Brown
2011-08-13  3:25             ` Lars-Peter Clausen
2011-08-13  3:25               ` Lars-Peter Clausen
2011-08-14 10:24               ` Mark Brown
2011-08-14 10:24                 ` 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.