* ASoC: multi-component - two cleanup patches
@ 2010-08-11 12:29 Sascha Hauer
2010-08-11 12:29 ` [PATCH 1/2] asoc/multi-component: remove superfluous snd_card member from snd_soc_codec Sascha Hauer
2010-08-11 12:29 ` [PATCH 2/2] asoc/multi-component: remove superfluous snd_card member from snd_soc_platform Sascha Hauer
0 siblings, 2 replies; 4+ messages in thread
From: Sascha Hauer @ 2010-08-11 12:29 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Liam Girdwood
Hi,
Two small patches you might consider adding to the multi-component
rework.
Sascha
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] asoc/multi-component: remove superfluous snd_card member from snd_soc_codec
2010-08-11 12:29 ASoC: multi-component - two cleanup patches Sascha Hauer
@ 2010-08-11 12:29 ` Sascha Hauer
2010-08-11 13:44 ` Liam Girdwood
2010-08-11 12:29 ` [PATCH 2/2] asoc/multi-component: remove superfluous snd_card member from snd_soc_platform Sascha Hauer
1 sibling, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2010-08-11 12:29 UTC (permalink / raw)
To: alsa-devel; +Cc: Sascha Hauer, Mark Brown, Liam Girdwood
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/sound/soc.h | 1 -
sound/soc/soc-core.c | 6 +++---
sound/soc/soc-dapm.c | 6 +++---
sound/soc/soc-jack.c | 2 +-
4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 6982b15..4b0f4cd 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -428,7 +428,6 @@ struct snd_soc_codec {
struct snd_soc_codec_driver *driver;
struct mutex mutex;
- struct snd_card *snd_card;
struct snd_soc_card *card;
struct list_head list;
struct list_head card_list;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e2cc8fa..4300d6f 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1287,7 +1287,7 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num)
dev_dbg(card->dev, "probe %s dai link %d\n", card->name, num);
/* config components */
- platform->snd_card = codec->snd_card = card->snd_card;
+ platform->snd_card = card->snd_card;
codec_dai->codec = codec;
codec->card = card;
cpu_dai->platform = platform;
@@ -1902,7 +1902,7 @@ EXPORT_SYMBOL_GPL(snd_soc_cnew);
int snd_soc_add_controls(struct snd_soc_codec *codec,
const struct snd_kcontrol_new *controls, int num_controls)
{
- struct snd_card *card = codec->snd_card;
+ struct snd_card *card = codec->card->snd_card;
int err, i;
for (i = 0; i < num_controls; i++) {
@@ -2457,7 +2457,7 @@ EXPORT_SYMBOL_GPL(snd_soc_put_volsw_s8);
int snd_soc_limit_volume(struct snd_soc_codec *codec,
const char *name, int max)
{
- struct snd_card *card = codec->snd_card;
+ struct snd_card *card = codec->card->snd_card;
struct snd_kcontrol *kctl;
struct soc_mixer_control *mc;
int found = 0;
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index fb68c7d..035cab8 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -368,7 +368,7 @@ static int dapm_new_mixer(struct snd_soc_codec *codec,
path->kcontrol = snd_soc_cnew(&w->kcontrols[i], w,
path->long_name);
- ret = snd_ctl_add(codec->snd_card, path->kcontrol);
+ ret = snd_ctl_add(codec->card->snd_card, path->kcontrol);
if (ret < 0) {
printk(KERN_ERR "asoc: failed to add dapm kcontrol %s: %d\n",
path->long_name,
@@ -396,7 +396,7 @@ static int dapm_new_mux(struct snd_soc_codec *codec,
}
kcontrol = snd_soc_cnew(&w->kcontrols[0], w, w->name);
- ret = snd_ctl_add(codec->snd_card, kcontrol);
+ ret = snd_ctl_add(codec->card->snd_card, kcontrol);
if (ret < 0)
goto err;
@@ -435,7 +435,7 @@ static inline void dapm_clear_walk(struct snd_soc_codec *codec)
*/
static int snd_soc_dapm_suspend_check(struct snd_soc_dapm_widget *widget)
{
- int level = snd_power_get_state(widget->codec->snd_card);
+ int level = snd_power_get_state(widget->codec->card->snd_card);
switch (level) {
case SNDRV_CTL_POWER_D3hot:
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 1dfc4fd..8862770 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -39,7 +39,7 @@ int snd_soc_jack_new(struct snd_soc_codec *codec, const char *id, int type,
INIT_LIST_HEAD(&jack->pins);
BLOCKING_INIT_NOTIFIER_HEAD(&jack->notifier);
- return snd_jack_new(codec->snd_card, id, type, &jack->jack);
+ return snd_jack_new(codec->card->snd_card, id, type, &jack->jack);
}
EXPORT_SYMBOL_GPL(snd_soc_jack_new);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] asoc/multi-component: remove superfluous snd_card member from snd_soc_platform
2010-08-11 12:29 ASoC: multi-component - two cleanup patches Sascha Hauer
2010-08-11 12:29 ` [PATCH 1/2] asoc/multi-component: remove superfluous snd_card member from snd_soc_codec Sascha Hauer
@ 2010-08-11 12:29 ` Sascha Hauer
1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2010-08-11 12:29 UTC (permalink / raw)
To: alsa-devel; +Cc: Sascha Hauer, Mark Brown, Liam Girdwood
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/sound/soc.h | 1 -
sound/soc/soc-core.c | 1 -
2 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 4b0f4cd..d31e8b7 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -526,7 +526,6 @@ struct snd_soc_platform {
unsigned int suspended:1; /* platform is suspended */
unsigned int probed:1;
- struct snd_card *snd_card;
struct snd_soc_card *card;
struct list_head list;
struct list_head card_list;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4300d6f..1a2c745 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1287,7 +1287,6 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num)
dev_dbg(card->dev, "probe %s dai link %d\n", card->name, num);
/* config components */
- platform->snd_card = card->snd_card;
codec_dai->codec = codec;
codec->card = card;
cpu_dai->platform = platform;
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] asoc/multi-component: remove superfluous snd_card member from snd_soc_codec
2010-08-11 12:29 ` [PATCH 1/2] asoc/multi-component: remove superfluous snd_card member from snd_soc_codec Sascha Hauer
@ 2010-08-11 13:44 ` Liam Girdwood
0 siblings, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2010-08-11 13:44 UTC (permalink / raw)
To: Sascha Hauer; +Cc: alsa-devel, Mark Brown
On Wed, 2010-08-11 at 14:29 +0200, Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> include/sound/soc.h | 1 -
> sound/soc/soc-core.c | 6 +++---
> sound/soc/soc-dapm.c | 6 +++---
> sound/soc/soc-jack.c | 2 +-
> 4 files changed, 7 insertions(+), 8 deletions(-)
>
Both applied.
Thanks.
Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-11 13:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-11 12:29 ASoC: multi-component - two cleanup patches Sascha Hauer
2010-08-11 12:29 ` [PATCH 1/2] asoc/multi-component: remove superfluous snd_card member from snd_soc_codec Sascha Hauer
2010-08-11 13:44 ` Liam Girdwood
2010-08-11 12:29 ` [PATCH 2/2] asoc/multi-component: remove superfluous snd_card member from snd_soc_platform Sascha Hauer
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.