Skip to content

Commit

Permalink
ALSA: hda - Fix a wrong busy check in alt PCM open
Browse files Browse the repository at this point in the history
Currently, the alt PCM open callback returns -EBUSY when an
independent HP is turned off, supposing that it conflicts with the
main PCM.  However, obviously, this check is wrong when the
independent HP itself isn't enabled but the alt PCM was explicitly
created via alc_dac_nid by a codec driver.

Reported-and-tested-by: Kailang Yang <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jul 8, 2015
1 parent e828b23 commit d1f15e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -5175,7 +5175,7 @@ static int alt_playback_pcm_open(struct hda_pcm_stream *hinfo,
int err = 0;

mutex_lock(&spec->pcm_mutex);
if (!spec->indep_hp_enabled)
if (spec->indep_hp && !spec->indep_hp_enabled)
err = -EBUSY;
else
spec->active_streams |= 1 << STREAM_INDEP_HP;
Expand Down

0 comments on commit d1f15e0

Please sign in to comment.