aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-07-04 12:20:25 +0200
committerTakashi Iwai <tiwai@suse.de>2009-07-04 12:20:25 +0200
commit1475ef0f0367766417f10f82880178ca42922748 (patch)
tree5e9d8fe6b35cfdfa8dfc56076f4facff92c2451e /sound/pci/hda/hda_intel.c
parentb0bb3aa6233dccfccd040793d0d9ce838e4890e1 (diff)
parent02358fcfa54ce018a0bb56ca9f5a898de574a9d3 (diff)
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a2f4a116f87..6abaa6bbb3d 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;
}