diff options
author | Dan Murphy <dmurphy@ti.com> | 2011-08-31 07:32:59 -0500 |
---|---|---|
committer | Dan Murphy <dmurphy@ti.com> | 2011-08-31 07:32:59 -0500 |
commit | d21743dc00ad185044ae01c6217a8fac9714c525 (patch) | |
tree | 7004932c624ac2b668496a7c41b1a49de66365e3 /sound/soc/soc-dapm.c | |
parent | ddbaa04f52ec447cbe86fb132b1da0cd8980c019 (diff) | |
parent | 87050c34e61d0ec1b0e72713ceb3ec15cffb9928 (diff) | |
download | kernel_samsung_espresso10-d21743dc00ad185044ae01c6217a8fac9714c525.zip kernel_samsung_espresso10-d21743dc00ad185044ae01c6217a8fac9714c525.tar.gz kernel_samsung_espresso10-d21743dc00ad185044ae01c6217a8fac9714c525.tar.bz2 |
Merge branch 'android-omap-3.0' into p-android-omap-3.0
Change-Id: I1160c3de134db29f5af54d55e2704bd4c52b0c6e
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 7a58b48..a3ac2cb 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1498,7 +1498,8 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) trace_snd_soc_dapm_start(card); list_for_each_entry(d, &card->dapm_list, list) - if (d->n_widgets || d->codec == NULL) + if (d->n_widgets || d->codec == NULL || + strstr(d->codec->name, "null-codec")) d->dev_power = 0; /* Check which widgets we need to power and store them in @@ -2862,6 +2863,36 @@ static void soc_dapm_stream_event(struct snd_soc_dapm_context *dapm, dapm->stream_event(dapm); } +static void soc_dapm_platform_stream_event(struct snd_soc_platform *platform, + const char *stream, int event) +{ + soc_dapm_stream_event(&platform->dapm, stream, event); +} + +static void soc_dapm_codec_stream_event(struct snd_soc_codec *codec, + const char *stream, int event) +{ + soc_dapm_stream_event(&codec->dapm, stream, event); +} + +void snd_soc_dapm_platform_stream_event(struct snd_soc_platform *platform, + const char *stream, int event) +{ + mutex_lock(&platform->card->dapm_mutex); + soc_dapm_platform_stream_event(platform, stream, event); + mutex_unlock(&platform->card->dapm_mutex); +} +EXPORT_SYMBOL(snd_soc_dapm_platform_stream_event); + +void snd_soc_dapm_codec_stream_event(struct snd_soc_codec *codec, + const char *stream, int event) +{ + mutex_lock(&codec->card->dapm_mutex); + soc_dapm_codec_stream_event(codec, stream, event); + mutex_unlock(&codec->card->dapm_mutex); +} +EXPORT_SYMBOL(snd_soc_dapm_codec_stream_event); + /** * snd_soc_dapm_stream_event - send a stream event to the dapm core * @rtd: PCM runtime data @@ -2881,8 +2912,8 @@ int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, mutex_lock(&rtd->card->dapm_mutex); - soc_dapm_stream_event(&rtd->platform->dapm, stream, event); - soc_dapm_stream_event(&rtd->codec->dapm, stream, event); + soc_dapm_platform_stream_event(rtd->platform, stream, event); + soc_dapm_codec_stream_event(rtd->codec, stream, event); mutex_unlock(&rtd->card->dapm_mutex); return 0; |