summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-20 19:04:08 +0300
committerTakashi Iwai <tiwai@suse.de>2015-02-20 21:51:50 +0300
commit646e1dd8f9f47c57560ce81c02fdd57ff0929bc6 (patch)
tree355061f4e446580ea0cf8984ee771df20207aefd /sound/core
parentb95bd3a454cf9e9e111b6b87c02550368fe6e802 (diff)
downloadlinux-646e1dd8f9f47c57560ce81c02fdd57ff0929bc6.tar.xz
ALSA: pcm: Don't notify internal PCMs
Notifier shouldn't listen to the changes of internal PCMs. Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index d440629e08e2..542dbc6f54e8 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -888,8 +888,9 @@ static int snd_pcm_free(struct snd_pcm *pcm)
if (!pcm)
return 0;
- list_for_each_entry(notify, &snd_pcm_notify_list, list) {
- notify->n_unregister(pcm);
+ if (!pcm->internal) {
+ list_for_each_entry(notify, &snd_pcm_notify_list, list)
+ notify->n_unregister(pcm);
}
if (pcm->private_free)
pcm->private_free(pcm);
@@ -1129,7 +1130,7 @@ static int snd_pcm_dev_disconnect(struct snd_device *device)
mutex_lock(&pcm->open_mutex);
wake_up(&pcm->open_wait);
list_del_init(&pcm->list);
- for (cidx = 0; cidx < 2; cidx++)
+ for (cidx = 0; cidx < 2; cidx++) {
for (substream = pcm->streams[cidx].substream; substream; substream = substream->next) {
snd_pcm_stream_lock_irq(substream);
if (substream->runtime) {
@@ -1139,8 +1140,10 @@ static int snd_pcm_dev_disconnect(struct snd_device *device)
}
snd_pcm_stream_unlock_irq(substream);
}
- list_for_each_entry(notify, &snd_pcm_notify_list, list) {
- notify->n_disconnect(pcm);
+ }
+ if (!pcm->internal) {
+ list_for_each_entry(notify, &snd_pcm_notify_list, list)
+ notify->n_disconnect(pcm);
}
for (cidx = 0; cidx < 2; cidx++) {
snd_unregister_device(&pcm->streams[cidx].dev);