diff options
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index bfd74a526b85..6309e0c67e6a 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1242,7 +1242,12 @@ static int __devinit create_codec_pcm(struct azx *chip, struct hda_codec *codec, | |||
1242 | struct snd_pcm *pcm; | 1242 | struct snd_pcm *pcm; |
1243 | struct azx_pcm *apcm; | 1243 | struct azx_pcm *apcm; |
1244 | 1244 | ||
1245 | snd_assert(cpcm->stream[0].substreams || cpcm->stream[1].substreams, return -EINVAL); | 1245 | /* if no substreams are defined for both playback and capture, |
1246 | * it's just a placeholder. ignore it. | ||
1247 | */ | ||
1248 | if (!cpcm->stream[0].substreams && !cpcm->stream[1].substreams) | ||
1249 | return 0; | ||
1250 | |||
1246 | snd_assert(cpcm->name, return -EINVAL); | 1251 | snd_assert(cpcm->name, return -EINVAL); |
1247 | 1252 | ||
1248 | err = snd_pcm_new(chip->card, cpcm->name, pcm_dev, | 1253 | err = snd_pcm_new(chip->card, cpcm->name, pcm_dev, |
@@ -1268,7 +1273,8 @@ static int __devinit create_codec_pcm(struct azx *chip, struct hda_codec *codec, | |||
1268 | snd_dma_pci_data(chip->pci), | 1273 | snd_dma_pci_data(chip->pci), |
1269 | 1024 * 64, 1024 * 128); | 1274 | 1024 * 64, 1024 * 128); |
1270 | chip->pcm[pcm_dev] = pcm; | 1275 | chip->pcm[pcm_dev] = pcm; |
1271 | chip->pcm_devs = pcm_dev + 1; | 1276 | if (chip->pcm_devs < pcm_dev + 1) |
1277 | chip->pcm_devs = pcm_dev + 1; | ||
1272 | 1278 | ||
1273 | return 0; | 1279 | return 0; |
1274 | } | 1280 | } |