ALSA: hda - Don't break the PCM creation loop
authorTakashi Iwai <tiwai@suse.de>
Tue, 20 Jan 2009 17:21:23 +0000 (18:21 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 Jan 2009 17:21:23 +0000 (18:21 +0100)
Don't break the loop in snd_hda_codec_build_pcms() even if the item
has no substreams.

It's possible that it's an empty item and the next item containing
the valid substreams (e.g. realtek codecs may create the analog
and alt-analog but no digitl streams).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c

index 2d6f72ca0140866e1587969b2b661a1fe0d6b6fd..0129e95672ae59386387b2f0ce10d2a0c556f6c4 100644 (file)
@@ -2613,7 +2613,7 @@ int snd_hda_codec_build_pcms(struct hda_codec *codec)
                int dev;
 
                if (!cpcm->stream[0].substreams && !cpcm->stream[1].substreams)
-                       return 0; /* no substreams assigned */
+                       continue; /* no substreams assigned */
 
                if (!cpcm->pcm) {
                        dev = get_empty_pcm_device(codec->bus, cpcm->pcm_type);