At Mon, 18 May 2009 12:52:43 +0200, Torben Schulz wrote:
This patch adds support for MacBook 3,1 sound by adding a model new "mb31" with the appropriate init verbs, mixers and channel modes to the ALC883 configuration. patch_alc882() and patch_alc883() are modified to handle the MacBook 3,1 sound-chip (Realtek ALC889A) correctly.
Note: Diff'ed against the 2009-05-16 snapshot (Soory, I don't have regular net access atm.)
Signed-off by: Torben Schulz public@letorbi.de
Thanks, the patch looks almost good to me. But, please run $LINUX/scripts/checkpatch.pl and fix the warnings about the coding style.
+/* Mute speakers according to the headphone jack state */ +static void alc889A_mb31_automute(struct hda_codec *codec) +{
- unsigned int present;
- /* Mute only in 2ch or 4ch mode */
- if (snd_hda_codec_read(codec, 0x15, 0, AC_VERB_GET_CONNECT_SEL, 0) == 0x00) {
present = snd_hda_codec_read(codec, 0x15, 0, AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
Use AC_PINSENSE_PRESENCE instead of 0x80000000.
Could repost the fixed patch later?
thanks,
Takashi