linux/sound/pci/hda
Justin P. Mattock b7cccc52fe ALSA: hda - iMac9,1 sound fixes
First issue:
With the original patch, I've noticed by unmuting the mic
(and even having it muted), there is a distorted("Noise")
coming from the internal speakers, even when the headphones are plugged in.
What my finding's revealed is:

	/* Mic (rear) pin: input vref at 80% */
	{0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
	{0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},

From the original patch. Looking at codec#0 0x18/0x1a is listed as:

Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x90100141: [Fixed] Speaker at Int N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0x4, Sequence = 0x1
    Misc = NO_PRESENCE
  Pin-ctls: 0x41: OUT VREF_50
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26

seems this Node is listed as: [Fixed] Speaker while 0x15

Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x018b3020: [Jack] Line In at Ext Rear
    Conn = Comb, Color = Blue
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x01: VREF_50
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c 0x0d* 0x0e 0x0f 0x26

is [Jack] Line In at Ext Rear.
(looking at the other apple products as examples
I came up with the fix below).

Second issue:
alc885_mbp_4ch_modes
The original patch does a good job with the
HP pin automute function, but from what I noticed is I would have to manually
change the channel form 2 to 4 after plugging the headphones in.
And not to mention having odd moments to where I was jamming out
with the headphones on, then later realized I had sound blasting out
of the speakers as well. My findings revealed that changing
alc885_mbp_4ch_modes to alc885_mba21_ch_modes and setting
-	spec->autocfg.speaker_pins[0] = 0x15;
+	spec->autocfg.speaker_pins[0] = 0x18;
gets the automute function when the headphones plugged in working
flawlessly(and the no need to manually change the channel number
afterwards).

Third issue:
alc885_imac91_mixer
There probably doesnt need to be anything changed with this
(esspecially if your one to like lots of sliders),but my findings
revealed that mac osx only has a master on the top right,
another switch on itunes, and then a slider for the mic.

So the changes I did below try and mimic osx as much as possible
(only thing I had an issue with is just having one mute switch
on the master, instead of having two(still investigating)).

fourth issue:
alc882_capture_source
I endeded up creating alc889A_imac91_capture_source()
only  because looking at alc882_capture_source I see
that the mic is set to 0x1 while this works, I also noticed
that adding 0x1 and 0x01 and testing that 0x1 somehow
stops working, and 0x01 works(so I figured 0x01 was more
of the alpha of the numbers(still need to figure out
where that valuse is)). In any case the microphone
does work with the original, and with the below patch, but both
still record not as clean(lots of "Noise", which I would like to
look into too).
Note: using alsamixer -Va reveals the capture switches.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-25 08:44:59 +02:00
..
hda_beep.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hda_beep.h ALSA: hda - Fix beep_mode option value 2009-11-16 15:33:49 +01:00
hda_codec.c ALSA: hda - introduce snd_hda_codec_update_cache() 2010-03-30 18:03:44 +02:00
hda_codec.h ALSA: hda - introduce snd_hda_codec_update_cache() 2010-03-30 18:03:44 +02:00
hda_eld.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hda_generic.c ALSA: hda - add more NID->Control mapping 2009-12-15 09:33:04 +01:00
hda_hwdep.c ALSA: hda - Allow override more fields via patch loader 2010-01-28 00:04:21 +01:00
hda_intel.c ALSA: hda: Use LPIB for Toshiba A100-259 2010-05-25 08:40:50 +02:00
hda_local.h fix comment typo in sound/pci/hda/hda_local.h 2010-03-19 11:00:58 +01:00
hda_proc.c ALSA: hda - introduce HDA_SUBDEV_AMP_FLAG (ControlAmp in proc) 2009-12-15 09:33:17 +01:00
Kconfig ALSA: intelhdmi - add dependency on SND_DYNAMIC_MINORS 2010-05-17 08:11:39 +02:00
Makefile ALSA: hda - Build hda_eld into snd-hda-codec module 2010-03-04 16:05:24 +01:00
patch_analog.c Merge branch 'fix/hda' into topic/hda 2010-05-06 08:39:43 +02:00
patch_atihdmi.c ALSA: hda: move open coded tricks into get_wcaps_channels() 2009-08-24 09:42:48 +02:00
patch_ca0110.c ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignment 2009-11-16 11:35:14 +01:00
patch_cirrus.c ALSA: hda - fix array indexing while creating inputs for Cirrus codecs 2010-05-05 09:45:33 +02:00
patch_cmedia.c ALSA: hda - Fix NID association for capture mixers 2009-12-23 08:38:28 +01:00
patch_conexant.c Merge branch 'topic/hda' into for-linus 2010-05-20 11:59:52 +02:00
patch_hdmi.c ALSA: hdmi - dont fail on extra nodes 2010-05-17 08:12:13 +02:00
patch_intelhdmi.c ALSA: intelhdmi - add id for the CougarPoint chipset 2010-05-17 08:11:59 +02:00
patch_nvhdmi.c ALSA: hda - Sort codec entry list of Nvidia HDMI 2010-03-22 08:07:55 +01:00
patch_realtek.c ALSA: hda - iMac9,1 sound fixes 2010-05-25 08:44:59 +02:00
patch_si3054.c ALSA: hda - add more NID->Control mapping 2009-12-15 09:33:04 +01:00
patch_sigmatel.c ALSA: hda - Add hp-dv4 model for IDT 92HD71bx 2010-05-12 10:20:42 +02:00
patch_via.c ALSA: hda - Avoid invalid "Independent HP" control for VIA codecs 2010-04-14 14:36:23 +02:00