diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-07-04 12:20:25 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-07-04 12:20:25 +0200 |
commit | 1475ef0f0367766417f10f82880178ca42922748 (patch) | |
tree | 5e9d8fe6b35cfdfa8dfc56076f4facff92c2451e /sound/pci/hda/hda_intel.c | |
parent | b0bb3aa6233dccfccd040793d0d9ce838e4890e1 (diff) | |
parent | 02358fcfa54ce018a0bb56ca9f5a898de574a9d3 (diff) | |
download | op-kernel-dev-1475ef0f0367766417f10f82880178ca42922748.zip op-kernel-dev-1475ef0f0367766417f10f82880178ca42922748.tar.gz |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index a2f4a11..6abaa6b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1469,6 +1469,7 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) mutex_unlock(&chip->open_mutex); return err; } + snd_pcm_limit_hw_rates(runtime); spin_lock_irqsave(&chip->reg_lock, flags); azx_dev->substream = substream; azx_dev->running = 0; @@ -1478,6 +1479,12 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) snd_pcm_set_sync(substream); mutex_unlock(&chip->open_mutex); + if (snd_BUG_ON(!runtime->hw.channels_min || !runtime->hw.channels_max)) + return -EINVAL; + if (snd_BUG_ON(!runtime->hw.formats)) + return -EINVAL; + if (snd_BUG_ON(!runtime->hw.rates)) + return -EINVAL; return 0; } |