提交 bfc5c26f 编写于 作者: T Takashi Iwai

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: NTakashi Iwai <tiwai@suse.de>
上级 b91f080f
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册