diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-04 17:48:39 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-04 17:48:39 +0100 |
commit | bfc5c26fb692fa7a196108c3b23d9c747d105c00 (patch) | |
tree | 47d72aebe5208c369e12f70f068503cb9e589a28 | |
parent | b91f080f517cf9dd52023c11127a0ca33190e31a (diff) | |
download | linux-3.10-bfc5c26fb692fa7a196108c3b23d9c747d105c00.tar.gz linux-3.10-bfc5c26fb692fa7a196108c3b23d9c747d105c00.tar.bz2 linux-3.10-bfc5c26fb692fa7a196108c3b23d9c747d105c00.zip |
ALSA: hda - Don't create empty PCM streams
Due to the hda-reconfiguration patches, the check of empty stream
is gone, and this results in an error with the codec setup with empty
streams.
This patch adds the check again to avoid the error at probing.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/hda_codec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index aa9cd142c30..3e7cda9c3de 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -2485,6 +2485,11 @@ int snd_hda_build_pcms(struct hda_bus *bus) struct hda_pcm *cpcm = &codec->pcm_info[pcm]; int type = cpcm->pcm_type; int dev; + + if (!cpcm->stream[0].substreams && + !cpcm->stream[1].substreams) + continue; /* no substreams assigned */ + switch (type) { case HDA_PCM_TYPE_AUDIO: if (num_devs[type] >= ARRAY_SIZE(audio_idx)) { |