Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155324
b: refs/heads/master
c: aba6653
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jul 5, 2009
1 parent 9c413d6 commit 9532f99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 02358fcfa54ce018a0bb56ca9f5a898de574a9d3
refs/heads/master: aba6653617754e12763a0d3c9dda332b66190a50
18 changes: 11 additions & 7 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,6 +1455,17 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
return err;
}
snd_pcm_limit_hw_rates(runtime);
/* sanity check */
if (snd_BUG_ON(!runtime->hw.channels_min) ||
snd_BUG_ON(!runtime->hw.channels_max) ||
snd_BUG_ON(!runtime->hw.formats) ||
snd_BUG_ON(!runtime->hw.rates)) {
azx_release_device(azx_dev);
hinfo->ops.close(hinfo, apcm->codec, substream);
snd_hda_power_down(apcm->codec);
mutex_unlock(&chip->open_mutex);
return -EINVAL;
}
spin_lock_irqsave(&chip->reg_lock, flags);
azx_dev->substream = substream;
azx_dev->running = 0;
Expand All @@ -1463,13 +1474,6 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
runtime->private_data = azx_dev;
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;
}

Expand Down

0 comments on commit 9532f99

Please sign in to comment.