[alsa-devel] 1.0.15rc3 patch_analog.s bug + fix
Vasily Khoruzhick
anarsoul at gmail.com
Tue Oct 16 09:58:19 CEST 2007
> > Hmm, the code logic looks correct to me. If HP jack is present, the
> > internal speaker should be muted. Otherwise it follows the state of
> > HP jack (muted/unmuted, that acts as a master switch).
Original patch:
present = snd_hda_codec_read(codec, 0x1a, 0,
AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
Code in alsa (patch-analog.c line 614):
present = snd_hda_codec_read(codec, 0x1a, 0, AC_VERB_GET_PIN_SENSE, 0);
spec->jack_present = (present & 0x80000000) != 0;
Seems to have quite different logic, don't it?
Should be:
present = snd_hda_codec_read(codec, 0x1a, 0, AC_VERB_GET_PIN_SENSE, 0);
spec->jack_present = (present & 0x80000000) == 0;
P.S. It's very sad that you've released 1.0.15 with that bug :(
More information about the Alsa-devel
mailing list