Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: Allow to force model to intel-mac-v3 in snd_hda_intel (sigmatel).
ALSA: cs4232: fix crash during chip PNP detection
ALSA: hda - Add automatic model setting for the Acer Aspire 5920G laptop
ALSA: make snd_ac97_add_vmaster() static
ALSA: sound/pci/azt3328.h: no variables for enums
ALSA: soc - wm9712 mono mixer
ALSA: hda - Add support of ASUS Eeepc P90*
ALSA: opti9xx: no isapnp param for !CONFIG_PNP
ALSA: opti93x - Fix NULL dereference
ALSA: hda - Added support for Asus V1Sn
ALSA: ASoC: Factor PGA DAPM handling into main
ALSA: ASoC: Refactor DAPM event handler
ALSA: ALSA: ens1370: communicate PCI device to AC97
ALSA: ens1370: SRC stands for Sample Rate Converter
ALSA: hda - Align BDL position adjustment parameter
ALSA: Au1xpsc: psc not disabled when TX is idle
ALSA: add TriTech 28023 AC97 codec ID and Wolfson 9701 name.

+260 -80
+1
Documentation/sound/alsa/ALSA-Configuration.txt
··· 1024 1024 intel-mac-v3 Intel Mac Type 3 1025 1025 intel-mac-v4 Intel Mac Type 4 1026 1026 intel-mac-v5 Intel Mac Type 5 1027 + intel-mac-auto Intel Mac (detect type according to subsystem id) 1027 1028 macmini Intel Mac Mini (equivalent with type 3) 1028 1029 macbook Intel Mac Book (eq. type 5) 1029 1030 macbook-pro-v1 Intel Mac Book Pro 1st generation (eq. type 3)
+1
sound/isa/cs423x/cs4236.c
··· 325 325 static int __devinit snd_card_cs4232_pnp(int dev, struct snd_card_cs4236 *acard, 326 326 struct pnp_dev *pdev) 327 327 { 328 + acard->wss = pdev; 328 329 if (snd_cs423x_pnp_init_wss(dev, acard->wss) < 0) 329 330 return -EBUSY; 330 331 cport[dev] = -1;
+5 -1
sound/isa/opti9xx/opti92x-ad1848.c
··· 68 68 static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ 69 69 static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ 70 70 //static int enable = SNDRV_DEFAULT_ENABLE1; /* Enable this card */ 71 + #ifdef CONFIG_PNP 71 72 static int isapnp = 1; /* Enable ISA PnP detection */ 73 + #endif 72 74 static long port = SNDRV_DEFAULT_PORT1; /* 0x530,0xe80,0xf40,0x604 */ 73 75 static long mpu_port = SNDRV_DEFAULT_PORT1; /* 0x300,0x310,0x320,0x330 */ 74 76 static long fm_port = SNDRV_DEFAULT_PORT1; /* 0x388 */ ··· 87 85 MODULE_PARM_DESC(id, "ID string for opti9xx based soundcard."); 88 86 //module_param(enable, bool, 0444); 89 87 //MODULE_PARM_DESC(enable, "Enable opti9xx soundcard."); 88 + #ifdef CONFIG_PNP 90 89 module_param(isapnp, bool, 0444); 91 90 MODULE_PARM_DESC(isapnp, "Enable ISA PnP detection for specified soundcard."); 91 + #endif 92 92 module_param(port, long, 0444); 93 93 MODULE_PARM_DESC(port, "WSS port # for opti9xx driver."); 94 94 module_param(mpu_port, long, 0444); ··· 692 688 if (chip) { 693 689 #ifdef OPTi93X 694 690 struct snd_cs4231 *codec = chip->codec; 695 - if (codec->irq > 0) { 691 + if (codec && codec->irq > 0) { 696 692 disable_irq(codec->irq); 697 693 free_irq(codec->irq, codec); 698 694 }
+2 -1
sound/pci/ac97/ac97_codec.c
··· 161 161 { 0x50534304, 0xffffffff, "UCB1400", patch_ucb1400, NULL }, 162 162 { 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH }, 163 163 { 0x54524102, 0xffffffff, "TR28022", NULL, NULL }, 164 + { 0x54524103, 0xffffffff, "TR28023", NULL, NULL }, 164 165 { 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, 165 166 { 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99] 166 167 { 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)] ··· 170 169 { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF 171 170 { 0x56494182, 0xffffffff, "VIA1618", NULL, NULL }, 172 171 { 0x57454301, 0xffffffff, "W83971D", NULL, NULL }, 173 - { 0x574d4c00, 0xffffffff, "WM9701A", NULL, NULL }, 172 + { 0x574d4c00, 0xffffffff, "WM9701,WM9701A", NULL, NULL }, 174 173 { 0x574d4C03, 0xffffffff, "WM9703,WM9707,WM9708,WM9717", patch_wolfson03, NULL}, 175 174 { 0x574d4C04, 0xffffffff, "WM9704M,WM9704Q", patch_wolfson04, NULL}, 176 175 { 0x574d4C05, 0xffffffff, "WM9705,WM9710", patch_wolfson05, NULL},
+2 -2
sound/pci/ac97/ac97_patch.c
··· 3381 3381 } 3382 3382 3383 3383 /* create a virtual master control and add slaves */ 3384 - int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name, 3385 - const unsigned int *tlv, const char **slaves) 3384 + static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name, 3385 + const unsigned int *tlv, const char **slaves) 3386 3386 { 3387 3387 struct snd_kcontrol *kctl; 3388 3388 const char **s;
+2 -2
sound/pci/azt3328.h
··· 94 94 AZF_FREQ(48000), 95 95 AZF_FREQ(66200), 96 96 #undef AZF_FREQ 97 - } AZF_FREQUENCIES; 97 + }; 98 98 99 99 /** recording area (see also: playback bit flag definitions) **/ 100 100 #define IDX_IO_REC_FLAGS 0x20 /* ??, PU:0x0000 */ ··· 210 210 211 211 enum { 212 212 AZF_GAME_LEGACY_IO_PORT = 0x200 213 - } AZF_GAME_CONFIGS; 213 + }; 214 214 215 215 #define IDX_GAME_LEGACY_COMPATIBLE 0x00 216 216 /* in some operation mode, writing anything to this port
+2 -1
sound/pci/ens1370.c
··· 522 522 return r; 523 523 cond_resched(); 524 524 } 525 - snd_printk(KERN_ERR "wait source ready timeout 0x%lx [0x%x]\n", 525 + snd_printk(KERN_ERR "wait src ready timeout 0x%lx [0x%x]\n", 526 526 ES_REG(ensoniq, 1371_SMPRATE), r); 527 527 return 0; 528 528 } ··· 1629 1629 memset(&ac97, 0, sizeof(ac97)); 1630 1630 ac97.private_data = ensoniq; 1631 1631 ac97.private_free = snd_ensoniq_mixer_free_ac97; 1632 + ac97.pci = ensoniq->pci; 1632 1633 ac97.scaps = AC97_SCAP_AUDIO; 1633 1634 if ((err = snd_ac97_mixer(pbus, &ac97, &ensoniq->u.es1371.ac97)) < 0) 1634 1635 return err;
+5 -1
sound/pci/hda/hda_intel.c
··· 1047 1047 pos_adj = bdl_pos_adj[chip->dev_index]; 1048 1048 if (pos_adj > 0) { 1049 1049 struct snd_pcm_runtime *runtime = substream->runtime; 1050 + int pos_align = pos_adj; 1050 1051 pos_adj = (pos_adj * runtime->rate + 47999) / 48000; 1051 1052 if (!pos_adj) 1052 - pos_adj = 1; 1053 + pos_adj = pos_align; 1054 + else 1055 + pos_adj = ((pos_adj + pos_align - 1) / pos_align) * 1056 + pos_align; 1053 1057 pos_adj = frames_to_bytes(runtime, pos_adj); 1054 1058 if (pos_adj >= period_bytes) { 1055 1059 snd_printk(KERN_WARNING "Too big adjustment %d\n",
+174 -7
sound/pci/hda/patch_realtek.c
··· 122 122 /* ALC269 models */ 123 123 enum { 124 124 ALC269_BASIC, 125 + ALC269_ASUS_EEEPC_P703, 126 + ALC269_ASUS_EEEPC_P901, 125 127 ALC269_AUTO, 126 128 ALC269_MODEL_LAST /* last tag */ 127 129 }; ··· 7907 7905 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_ACER_ASPIRE), 7908 7906 SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_ACER_ASPIRE), 7909 7907 SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_ACER_ASPIRE), 7908 + SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_ACER_ASPIRE), 7910 7909 SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */ 7911 7910 SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), 7912 7911 SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), ··· 10949 10946 10950 10947 static hda_nid_t alc269_adc_nids[1] = { 10951 10948 /* ADC1 */ 10952 - 0x07, 10949 + 0x08, 10950 + }; 10951 + 10952 + static struct hda_input_mux alc269_eeepc_dmic_capture_source = { 10953 + .num_items = 2, 10954 + .items = { 10955 + { "i-Mic", 0x5 }, 10956 + { "e-Mic", 0x0 }, 10957 + }, 10958 + }; 10959 + 10960 + static struct hda_input_mux alc269_eeepc_amic_capture_source = { 10961 + .num_items = 2, 10962 + .items = { 10963 + { "i-Mic", 0x1 }, 10964 + { "e-Mic", 0x0 }, 10965 + }, 10953 10966 }; 10954 10967 10955 10968 #define alc269_modes alc260_modes ··· 10987 10968 { } /* end */ 10988 10969 }; 10989 10970 10971 + /* bind volumes of both NID 0x0c and 0x0d */ 10972 + static struct hda_bind_ctls alc269_epc_bind_vol = { 10973 + .ops = &snd_hda_bind_vol, 10974 + .values = { 10975 + HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT), 10976 + HDA_COMPOSE_AMP_VAL(0x03, 3, 0, HDA_OUTPUT), 10977 + 0 10978 + }, 10979 + }; 10980 + 10981 + static struct snd_kcontrol_new alc269_eeepc_mixer[] = { 10982 + HDA_CODEC_MUTE("iSpeaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), 10983 + HDA_BIND_VOL("LineOut Playback Volume", &alc269_epc_bind_vol), 10984 + HDA_CODEC_MUTE("LineOut Playback Switch", 0x15, 0x0, HDA_OUTPUT), 10985 + { } /* end */ 10986 + }; 10987 + 10990 10988 /* capture mixer elements */ 10991 10989 static struct snd_kcontrol_new alc269_capture_mixer[] = { 10992 - HDA_CODEC_VOLUME("Capture Volume", 0x07, 0x0, HDA_INPUT), 10993 - HDA_CODEC_MUTE("Capture Switch", 0x07, 0x0, HDA_INPUT), 10990 + HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), 10991 + HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), 10994 10992 { 10995 10993 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 10996 10994 /* The multiple "Capture Source" controls confuse alsamixer ··· 11023 10987 { } /* end */ 11024 10988 }; 11025 10989 10990 + /* capture mixer elements */ 10991 + static struct snd_kcontrol_new alc269_epc_capture_mixer[] = { 10992 + HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), 10993 + HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), 10994 + { } /* end */ 10995 + }; 10996 + 11026 10997 /* 11027 10998 * generic initialization of ADC, input mixers and output mixers 11028 10999 */ ··· 11037 10994 /* 11038 10995 * Unmute ADC0 and set the default input to mic-in 11039 10996 */ 11040 - {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 10997 + {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 11041 10998 11042 10999 /* Mute input amps (PCBeep, Line In, Mic 1 & Mic 2) of the 11043 11000 * analog-loopback mixer widget ··· 11099 11056 {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, 11100 11057 { } 11101 11058 }; 11059 + 11060 + static struct hda_verb alc269_eeepc_dmic_init_verbs[] = { 11061 + {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, 11062 + {0x23, AC_VERB_SET_CONNECT_SEL, 0x05}, 11063 + {0x02, AC_VERB_SET_AMP_GAIN_MUTE, 0xb026 }, 11064 + {0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7019 | (0x00 << 8))}, 11065 + {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, 11066 + {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT}, 11067 + {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, 11068 + {} 11069 + }; 11070 + 11071 + static struct hda_verb alc269_eeepc_amic_init_verbs[] = { 11072 + {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, 11073 + {0x23, AC_VERB_SET_CONNECT_SEL, 0x01}, 11074 + {0x02, AC_VERB_SET_AMP_GAIN_MUTE, 0xb026 }, 11075 + {0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x701b | (0x00 << 8))}, 11076 + {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT}, 11077 + {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, 11078 + {} 11079 + }; 11080 + 11081 + /* toggle speaker-output according to the hp-jack state */ 11082 + static void alc269_speaker_automute(struct hda_codec *codec) 11083 + { 11084 + unsigned int present; 11085 + unsigned int bits; 11086 + 11087 + present = snd_hda_codec_read(codec, 0x15, 0, 11088 + AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; 11089 + bits = present ? AMP_IN_MUTE(0) : 0; 11090 + snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, 11091 + AMP_IN_MUTE(0), bits); 11092 + snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, 11093 + AMP_IN_MUTE(0), bits); 11094 + } 11095 + 11096 + static void alc269_eeepc_dmic_automute(struct hda_codec *codec) 11097 + { 11098 + unsigned int present; 11099 + 11100 + present = snd_hda_codec_read(codec, 0x18, 0, AC_VERB_GET_PIN_SENSE, 0) 11101 + & AC_PINSENSE_PRESENCE; 11102 + snd_hda_codec_write(codec, 0x23, 0, AC_VERB_SET_CONNECT_SEL, 11103 + present ? 0 : 5); 11104 + } 11105 + 11106 + static void alc269_eeepc_amic_automute(struct hda_codec *codec) 11107 + { 11108 + unsigned int present; 11109 + 11110 + present = snd_hda_codec_read(codec, 0x18, 0, AC_VERB_GET_PIN_SENSE, 0) 11111 + & AC_PINSENSE_PRESENCE; 11112 + snd_hda_codec_write(codec, 0x24, 0, AC_VERB_SET_AMP_GAIN_MUTE, 11113 + present ? AMP_IN_UNMUTE(0) : AMP_IN_MUTE(0)); 11114 + snd_hda_codec_write(codec, 0x24, 0, AC_VERB_SET_AMP_GAIN_MUTE, 11115 + present ? AMP_IN_MUTE(1) : AMP_IN_UNMUTE(1)); 11116 + } 11117 + 11118 + /* unsolicited event for HP jack sensing */ 11119 + static void alc269_eeepc_dmic_unsol_event(struct hda_codec *codec, 11120 + unsigned int res) 11121 + { 11122 + if ((res >> 26) == ALC880_HP_EVENT) 11123 + alc269_speaker_automute(codec); 11124 + 11125 + if ((res >> 26) == ALC880_MIC_EVENT) 11126 + alc269_eeepc_dmic_automute(codec); 11127 + } 11128 + 11129 + static void alc269_eeepc_dmic_inithook(struct hda_codec *codec) 11130 + { 11131 + alc269_speaker_automute(codec); 11132 + alc269_eeepc_dmic_automute(codec); 11133 + } 11134 + 11135 + /* unsolicited event for HP jack sensing */ 11136 + static void alc269_eeepc_amic_unsol_event(struct hda_codec *codec, 11137 + unsigned int res) 11138 + { 11139 + if ((res >> 26) == ALC880_HP_EVENT) 11140 + alc269_speaker_automute(codec); 11141 + 11142 + if ((res >> 26) == ALC880_MIC_EVENT) 11143 + alc269_eeepc_amic_automute(codec); 11144 + } 11145 + 11146 + static void alc269_eeepc_amic_inithook(struct hda_codec *codec) 11147 + { 11148 + alc269_speaker_automute(codec); 11149 + alc269_eeepc_amic_automute(codec); 11150 + } 11102 11151 11103 11152 /* add playback controls from the parsed DAC table */ 11104 11153 static int alc269_auto_create_multi_out_ctls(struct alc_spec *spec, ··· 11323 11188 if (err < 0) 11324 11189 return err; 11325 11190 11191 + spec->mixers[spec->num_mixers] = alc269_capture_mixer; 11192 + spec->num_mixers++; 11193 + 11326 11194 return 1; 11327 11195 } 11328 11196 ··· 11353 11215 }; 11354 11216 11355 11217 static struct snd_pci_quirk alc269_cfg_tbl[] = { 11218 + SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A", 11219 + ALC269_ASUS_EEEPC_P703), 11220 + SND_PCI_QUIRK(0x1043, 0x831a, "ASUS Eeepc P901", 11221 + ALC269_ASUS_EEEPC_P901), 11356 11222 {} 11357 11223 }; 11358 11224 11359 11225 static struct alc_config_preset alc269_presets[] = { 11360 11226 [ALC269_BASIC] = { 11361 - .mixers = { alc269_base_mixer }, 11227 + .mixers = { alc269_base_mixer, alc269_capture_mixer }, 11362 11228 .init_verbs = { alc269_init_verbs }, 11363 11229 .num_dacs = ARRAY_SIZE(alc269_dac_nids), 11364 11230 .dac_nids = alc269_dac_nids, ··· 11370 11228 .num_channel_mode = ARRAY_SIZE(alc269_modes), 11371 11229 .channel_mode = alc269_modes, 11372 11230 .input_mux = &alc269_capture_source, 11231 + }, 11232 + [ALC269_ASUS_EEEPC_P703] = { 11233 + .mixers = { alc269_eeepc_mixer, alc269_epc_capture_mixer }, 11234 + .init_verbs = { alc269_init_verbs, 11235 + alc269_eeepc_amic_init_verbs }, 11236 + .num_dacs = ARRAY_SIZE(alc269_dac_nids), 11237 + .dac_nids = alc269_dac_nids, 11238 + .hp_nid = 0x03, 11239 + .num_channel_mode = ARRAY_SIZE(alc269_modes), 11240 + .channel_mode = alc269_modes, 11241 + .input_mux = &alc269_eeepc_amic_capture_source, 11242 + .unsol_event = alc269_eeepc_amic_unsol_event, 11243 + .init_hook = alc269_eeepc_amic_inithook, 11244 + }, 11245 + [ALC269_ASUS_EEEPC_P901] = { 11246 + .mixers = { alc269_eeepc_mixer, alc269_epc_capture_mixer}, 11247 + .init_verbs = { alc269_init_verbs, 11248 + alc269_eeepc_dmic_init_verbs }, 11249 + .num_dacs = ARRAY_SIZE(alc269_dac_nids), 11250 + .dac_nids = alc269_dac_nids, 11251 + .hp_nid = 0x03, 11252 + .num_channel_mode = ARRAY_SIZE(alc269_modes), 11253 + .channel_mode = alc269_modes, 11254 + .input_mux = &alc269_eeepc_dmic_capture_source, 11255 + .unsol_event = alc269_eeepc_dmic_unsol_event, 11256 + .init_hook = alc269_eeepc_dmic_inithook, 11373 11257 }, 11374 11258 }; 11375 11259 ··· 11450 11282 11451 11283 spec->adc_nids = alc269_adc_nids; 11452 11284 spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids); 11453 - spec->mixers[spec->num_mixers] = alc269_capture_mixer; 11454 - spec->num_mixers++; 11455 11285 11456 11286 codec->patch_ops = alc_patch_ops; 11457 11287 if (board_config == ALC269_AUTO) ··· 13160 12994 SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_HP), 13161 12995 SND_PCI_QUIRK(0x1043, 0x12e2, "Asus z35m", ALC660VD_3ST), 13162 12996 SND_PCI_QUIRK(0x1043, 0x1339, "Asus G1", ALC660VD_3ST), 12997 + SND_PCI_QUIRK(0x1043, 0x1633, "Asus V1Sn", ALC861VD_LENOVO), 13163 12998 SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS", ALC660VD_3ST_DIG), 13164 12999 SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), 13165 13000 SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba A135", ALC861VD_LENOVO),
+11 -3
sound/pci/hda/patch_sigmatel.c
··· 94 94 STAC_INTEL_MAC_V3, 95 95 STAC_INTEL_MAC_V4, 96 96 STAC_INTEL_MAC_V5, 97 + STAC_INTEL_MAC_AUTO, /* This model is selected if no module parameter 98 + * is given, one of the above models will be 99 + * chosen according to the subsystem id. */ 97 100 /* for backward compatibility */ 98 101 STAC_MACMINI, 99 102 STAC_MACBOOK, ··· 1486 1483 [STAC_INTEL_MAC_V3] = intel_mac_v3_pin_configs, 1487 1484 [STAC_INTEL_MAC_V4] = intel_mac_v4_pin_configs, 1488 1485 [STAC_INTEL_MAC_V5] = intel_mac_v5_pin_configs, 1486 + [STAC_INTEL_MAC_AUTO] = intel_mac_v3_pin_configs, 1489 1487 /* for backward compatibility */ 1490 1488 [STAC_MACMINI] = intel_mac_v3_pin_configs, 1491 1489 [STAC_MACBOOK] = intel_mac_v5_pin_configs, ··· 1509 1505 [STAC_INTEL_MAC_V3] = "intel-mac-v3", 1510 1506 [STAC_INTEL_MAC_V4] = "intel-mac-v4", 1511 1507 [STAC_INTEL_MAC_V5] = "intel-mac-v5", 1508 + [STAC_INTEL_MAC_AUTO] = "intel-mac-auto", 1512 1509 /* for backward compatibility */ 1513 1510 [STAC_MACMINI] = "macmini", 1514 1511 [STAC_MACBOOK] = "macbook", ··· 1581 1576 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0707, 1582 1577 "Intel D945P", STAC_D945GTP5), 1583 1578 /* other systems */ 1584 - /* Apple Mac Mini (early 2006) */ 1579 + /* Apple Intel Mac (Mac Mini, MacBook, MacBook Pro...) */ 1585 1580 SND_PCI_QUIRK(0x8384, 0x7680, 1586 - "Mac Mini", STAC_INTEL_MAC_V3), 1581 + "Mac", STAC_INTEL_MAC_AUTO), 1587 1582 /* Dell systems */ 1588 1583 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01a7, 1589 1584 "unknown Dell", STAC_922X_DELL_D81), ··· 3730 3725 spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS, 3731 3726 stac922x_models, 3732 3727 stac922x_cfg_tbl); 3733 - if (spec->board_config == STAC_INTEL_MAC_V3) { 3728 + if (spec->board_config == STAC_INTEL_MAC_AUTO) { 3734 3729 spec->gpio_mask = spec->gpio_dir = 0x03; 3735 3730 spec->gpio_data = 0x03; 3736 3731 /* Intel Macs have all same PCI SSID, so we need to check ··· 3761 3756 case 0x106b0a00: 3762 3757 case 0x106b2200: 3763 3758 spec->board_config = STAC_INTEL_MAC_V5; 3759 + break; 3760 + default: 3761 + spec->board_config = STAC_INTEL_MAC_V3; 3764 3762 break; 3765 3763 } 3766 3764 }
+1 -1
sound/soc/au1x/psc-i2s.c
··· 231 231 232 232 /* if both TX and RX are idle, disable PSC */ 233 233 stat = au_readl(I2S_STAT(pscdata)); 234 - if (!(stat & (PSC_I2SSTAT_RB | PSC_I2SSTAT_RB))) { 234 + if (!(stat & (PSC_I2SSTAT_TB | PSC_I2SSTAT_RB))) { 235 235 au_writel(0, I2S_CFG(pscdata)); 236 236 au_sync(); 237 237 au_writel(PSC_CTRL_SUSPEND, PSC_CTRL(pscdata));
+5 -5
sound/soc/codecs/wm9712.c
··· 427 427 {"HPOUTR", NULL, "Headphone PGA"}, 428 428 {"Headphone PGA", NULL, "Right HP Mixer"}, 429 429 430 - /* mono hp mixer */ 431 - {"Mono HP Mixer", NULL, "Left HP Mixer"}, 432 - {"Mono HP Mixer", NULL, "Right HP Mixer"}, 430 + /* mono mixer */ 431 + {"Mono Mixer", NULL, "Left HP Mixer"}, 432 + {"Mono Mixer", NULL, "Right HP Mixer"}, 433 433 434 434 /* Out3 Mux */ 435 435 {"Out3 Mux", "Left", "Left HP Mixer"}, 436 436 {"Out3 Mux", "Mono", "Phone Mixer"}, 437 - {"Out3 Mux", "Left + Right", "Mono HP Mixer"}, 437 + {"Out3 Mux", "Left + Right", "Mono Mixer"}, 438 438 {"Out 3 PGA", NULL, "Out3 Mux"}, 439 439 {"OUT3", NULL, "Out 3 PGA"}, 440 440 441 441 /* speaker Mux */ 442 442 {"Speaker Mux", "Speaker Mix", "Speaker Mixer"}, 443 - {"Speaker Mux", "Headphone Mix", "Mono HP Mixer"}, 443 + {"Speaker Mux", "Headphone Mix", "Mono Mixer"}, 444 444 {"Speaker PGA", NULL, "Speaker Mux"}, 445 445 {"LOUT2", NULL, "Speaker PGA"}, 446 446 {"ROUT2", NULL, "Speaker PGA"},
+49 -56
sound/soc/soc-dapm.c
··· 523 523 continue; 524 524 } 525 525 526 - /* programmable gain/attenuation */ 527 - if (w->id == snd_soc_dapm_pga) { 528 - int on; 529 - in = is_connected_input_ep(w); 530 - dapm_clear_walk(w->codec); 531 - out = is_connected_output_ep(w); 532 - dapm_clear_walk(w->codec); 533 - w->power = on = (out != 0 && in != 0) ? 1 : 0; 534 - 535 - if (!on) 536 - dapm_set_pga(w, on); /* lower volume to reduce pops */ 537 - dapm_update_bits(w); 538 - if (on) 539 - dapm_set_pga(w, on); /* restore volume from zero */ 540 - 541 - continue; 542 - } 543 - 544 526 /* pre and post event widgets */ 545 527 if (w->id == snd_soc_dapm_pre) { 546 528 if (!w->event) ··· 568 586 power_change = (w->power == power) ? 0: 1; 569 587 w->power = power; 570 588 589 + if (!power_change) 590 + continue; 591 + 571 592 /* call any power change event handlers */ 572 - if (power_change) { 573 - if (w->event) { 574 - pr_debug("power %s event for %s flags %x\n", 575 - w->power ? "on" : "off", w->name, w->event_flags); 576 - if (power) { 577 - /* power up event */ 578 - if (w->event_flags & SND_SOC_DAPM_PRE_PMU) { 579 - ret = w->event(w, 580 - NULL, SND_SOC_DAPM_PRE_PMU); 581 - if (ret < 0) 582 - return ret; 583 - } 584 - dapm_update_bits(w); 585 - if (w->event_flags & SND_SOC_DAPM_POST_PMU){ 586 - ret = w->event(w, 587 - NULL, SND_SOC_DAPM_POST_PMU); 588 - if (ret < 0) 589 - return ret; 590 - } 591 - } else { 592 - /* power down event */ 593 - if (w->event_flags & SND_SOC_DAPM_PRE_PMD) { 594 - ret = w->event(w, 595 - NULL, SND_SOC_DAPM_PRE_PMD); 596 - if (ret < 0) 597 - return ret; 598 - } 599 - dapm_update_bits(w); 600 - if (w->event_flags & SND_SOC_DAPM_POST_PMD) { 601 - ret = w->event(w, 602 - NULL, SND_SOC_DAPM_POST_PMD); 603 - if (ret < 0) 604 - return ret; 605 - } 606 - } 607 - } else 608 - /* no event handler */ 609 - dapm_update_bits(w); 593 + if (w->event) 594 + pr_debug("power %s event for %s flags %x\n", 595 + w->power ? "on" : "off", 596 + w->name, w->event_flags); 597 + 598 + /* power up pre event */ 599 + if (power && w->event && 600 + (w->event_flags & SND_SOC_DAPM_PRE_PMU)) { 601 + ret = w->event(w, NULL, SND_SOC_DAPM_PRE_PMU); 602 + if (ret < 0) 603 + return ret; 604 + } 605 + 606 + /* power down pre event */ 607 + if (!power && w->event && 608 + (w->event_flags & SND_SOC_DAPM_PRE_PMD)) { 609 + ret = w->event(w, NULL, SND_SOC_DAPM_PRE_PMD); 610 + if (ret < 0) 611 + return ret; 612 + } 613 + 614 + /* Lower PGA volume to reduce pops */ 615 + if (w->id == snd_soc_dapm_pga && !power) 616 + dapm_set_pga(w, power); 617 + 618 + dapm_update_bits(w); 619 + 620 + /* Raise PGA volume to reduce pops */ 621 + if (w->id == snd_soc_dapm_pga && power) 622 + dapm_set_pga(w, power); 623 + 624 + /* power up post event */ 625 + if (power && w->event && 626 + (w->event_flags & SND_SOC_DAPM_POST_PMU)) { 627 + ret = w->event(w, 628 + NULL, SND_SOC_DAPM_POST_PMU); 629 + if (ret < 0) 630 + return ret; 631 + } 632 + 633 + /* power down post event */ 634 + if (!power && w->event && 635 + (w->event_flags & SND_SOC_DAPM_POST_PMD)) { 636 + ret = w->event(w, NULL, SND_SOC_DAPM_POST_PMD); 637 + if (ret < 0) 638 + return ret; 610 639 } 611 640 } 612 641 }