Commit 700cb4e5 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Jaroslav Kysela <perex@suse.cz>

AC97 Codec Core
Fixed swap_headphone() when headpone controls do not exist
parent 94c6375e
...@@ -2115,6 +2115,8 @@ static int swap_headphone(ac97_t *ac97, int remove_master) ...@@ -2115,6 +2115,8 @@ static int swap_headphone(ac97_t *ac97, int remove_master)
{ {
/* FIXME: error checks.. */ /* FIXME: error checks.. */
if (remove_master) { if (remove_master) {
if (ctl_find(ac97, "Headphone Playback Switch") == NULL)
return 0;
snd_ac97_remove_ctl(ac97, "Master Playback Switch"); snd_ac97_remove_ctl(ac97, "Master Playback Switch");
snd_ac97_remove_ctl(ac97, "Master Playback Volume"); snd_ac97_remove_ctl(ac97, "Master Playback Volume");
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment