diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-02-01 21:33:45 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-01 21:33:45 -0500 |
commit | 9d3f1881abeae0494a27716b08fcf2d3264bb0fa (patch) | |
tree | f457dd2d35af29bc831b93865efa47229d0b9bee /sound | |
parent | b6c58b1d987a5795086c5c2babd8c7367d2fdb8c (diff) | |
parent | bc10e875d4aeaa93a0d418d8b4346b72f5067ea0 (diff) |
Merge branch 'sh/stable-updates'
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/sound.c | 4 | ||||
-rw-r--r-- | sound/core/sound_oss.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 131 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 61 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8903.c | 3 | ||||
-rw-r--r-- | sound/soc/omap/Makefile | 2 | ||||
-rw-r--r-- | sound/sound_core.c | 2 |
9 files changed, 159 insertions, 49 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c index 7872a02f6ca9..563d1967a0ad 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -468,5 +468,5 @@ static void __exit alsa_sound_exit(void) | |||
468 | unregister_chrdev(major, "alsa"); | 468 | unregister_chrdev(major, "alsa"); |
469 | } | 469 | } |
470 | 470 | ||
471 | module_init(alsa_sound_init) | 471 | subsys_initcall(alsa_sound_init); |
472 | module_exit(alsa_sound_exit) | 472 | module_exit(alsa_sound_exit); |
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index 7fe12264ff80..0c164e5e4322 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c | |||
@@ -93,7 +93,7 @@ static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev) | |||
93 | default: | 93 | default: |
94 | return -EINVAL; | 94 | return -EINVAL; |
95 | } | 95 | } |
96 | if (snd_BUG_ON(minor < 0 || minor >= SNDRV_OSS_MINORS)) | 96 | if (minor < 0 || minor >= SNDRV_OSS_MINORS) |
97 | return -EINVAL; | 97 | return -EINVAL; |
98 | return minor; | 98 | return minor; |
99 | } | 99 | } |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index ec9c348336cc..565de38a3fc7 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -2332,6 +2332,7 @@ static void __devinit check_probe_mask(struct azx *chip, int dev) | |||
2332 | */ | 2332 | */ |
2333 | static struct snd_pci_quirk msi_black_list[] __devinitdata = { | 2333 | static struct snd_pci_quirk msi_black_list[] __devinitdata = { |
2334 | SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ | 2334 | SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ |
2335 | SND_PCI_QUIRK(0x1043, 0x829c, "ASUS", 0), /* nvidia */ | ||
2335 | {} | 2336 | {} |
2336 | }; | 2337 | }; |
2337 | 2338 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e3caa78ccd54..da34095c707f 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1093,6 +1093,16 @@ static void alc889_coef_init(struct hda_codec *codec) | |||
1093 | snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, tmp|0x2010); | 1093 | snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, tmp|0x2010); |
1094 | } | 1094 | } |
1095 | 1095 | ||
1096 | /* turn on/off EAPD control (only if available) */ | ||
1097 | static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on) | ||
1098 | { | ||
1099 | if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN) | ||
1100 | return; | ||
1101 | if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD) | ||
1102 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE, | ||
1103 | on ? 2 : 0); | ||
1104 | } | ||
1105 | |||
1096 | static void alc_auto_init_amp(struct hda_codec *codec, int type) | 1106 | static void alc_auto_init_amp(struct hda_codec *codec, int type) |
1097 | { | 1107 | { |
1098 | unsigned int tmp; | 1108 | unsigned int tmp; |
@@ -1110,25 +1120,22 @@ static void alc_auto_init_amp(struct hda_codec *codec, int type) | |||
1110 | case ALC_INIT_DEFAULT: | 1120 | case ALC_INIT_DEFAULT: |
1111 | switch (codec->vendor_id) { | 1121 | switch (codec->vendor_id) { |
1112 | case 0x10ec0260: | 1122 | case 0x10ec0260: |
1113 | snd_hda_codec_write(codec, 0x0f, 0, | 1123 | set_eapd(codec, 0x0f, 1); |
1114 | AC_VERB_SET_EAPD_BTLENABLE, 2); | 1124 | set_eapd(codec, 0x10, 1); |
1115 | snd_hda_codec_write(codec, 0x10, 0, | ||
1116 | AC_VERB_SET_EAPD_BTLENABLE, 2); | ||
1117 | break; | 1125 | break; |
1118 | case 0x10ec0262: | 1126 | case 0x10ec0262: |
1119 | case 0x10ec0267: | 1127 | case 0x10ec0267: |
1120 | case 0x10ec0268: | 1128 | case 0x10ec0268: |
1121 | case 0x10ec0269: | 1129 | case 0x10ec0269: |
1130 | case 0x10ec0270: | ||
1122 | case 0x10ec0272: | 1131 | case 0x10ec0272: |
1123 | case 0x10ec0660: | 1132 | case 0x10ec0660: |
1124 | case 0x10ec0662: | 1133 | case 0x10ec0662: |
1125 | case 0x10ec0663: | 1134 | case 0x10ec0663: |
1126 | case 0x10ec0862: | 1135 | case 0x10ec0862: |
1127 | case 0x10ec0889: | 1136 | case 0x10ec0889: |
1128 | snd_hda_codec_write(codec, 0x14, 0, | 1137 | set_eapd(codec, 0x14, 1); |
1129 | AC_VERB_SET_EAPD_BTLENABLE, 2); | 1138 | set_eapd(codec, 0x15, 1); |
1130 | snd_hda_codec_write(codec, 0x15, 0, | ||
1131 | AC_VERB_SET_EAPD_BTLENABLE, 2); | ||
1132 | break; | 1139 | break; |
1133 | } | 1140 | } |
1134 | switch (codec->vendor_id) { | 1141 | switch (codec->vendor_id) { |
@@ -1230,6 +1237,8 @@ static void alc_init_auto_mic(struct hda_codec *codec) | |||
1230 | return; /* invalid entry */ | 1237 | return; /* invalid entry */ |
1231 | } | 1238 | } |
1232 | } | 1239 | } |
1240 | if (!ext || !fixed) | ||
1241 | return; | ||
1233 | if (!(get_wcaps(codec, ext) & AC_WCAP_UNSOL_CAP)) | 1242 | if (!(get_wcaps(codec, ext) & AC_WCAP_UNSOL_CAP)) |
1234 | return; /* no unsol support */ | 1243 | return; /* no unsol support */ |
1235 | snd_printdd("realtek: Enable auto-mic switch on NID 0x%x/0x%x\n", | 1244 | snd_printdd("realtek: Enable auto-mic switch on NID 0x%x/0x%x\n", |
@@ -1834,10 +1843,8 @@ static void alc889_acer_aspire_8930g_setup(struct hda_codec *codec) | |||
1834 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 1843 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
1835 | static void alc889_power_eapd(struct hda_codec *codec, int power) | 1844 | static void alc889_power_eapd(struct hda_codec *codec, int power) |
1836 | { | 1845 | { |
1837 | snd_hda_codec_write(codec, 0x14, 0, | 1846 | set_eapd(codec, 0x14, power); |
1838 | AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0); | 1847 | set_eapd(codec, 0x15, power); |
1839 | snd_hda_codec_write(codec, 0x15, 0, | ||
1840 | AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0); | ||
1841 | } | 1848 | } |
1842 | #endif | 1849 | #endif |
1843 | 1850 | ||
@@ -4812,6 +4819,49 @@ static void fixup_automic_adc(struct hda_codec *codec) | |||
4812 | spec->auto_mic = 0; /* disable auto-mic to be sure */ | 4819 | spec->auto_mic = 0; /* disable auto-mic to be sure */ |
4813 | } | 4820 | } |
4814 | 4821 | ||
4822 | /* choose the ADC/MUX containing the input pin and initialize the setup */ | ||
4823 | static void fixup_single_adc(struct hda_codec *codec) | ||
4824 | { | ||
4825 | struct alc_spec *spec = codec->spec; | ||
4826 | hda_nid_t pin; | ||
4827 | int i; | ||
4828 | |||
4829 | /* search for the input pin; there must be only one */ | ||
4830 | for (i = 0; i < AUTO_PIN_LAST; i++) { | ||
4831 | if (spec->autocfg.input_pins[i]) { | ||
4832 | pin = spec->autocfg.input_pins[i]; | ||
4833 | break; | ||
4834 | } | ||
4835 | } | ||
4836 | if (!pin) | ||
4837 | return; | ||
4838 | |||
4839 | /* set the default connection to that pin */ | ||
4840 | for (i = 0; i < spec->num_adc_nids; i++) { | ||
4841 | hda_nid_t cap = spec->capsrc_nids ? | ||
4842 | spec->capsrc_nids[i] : spec->adc_nids[i]; | ||
4843 | int idx; | ||
4844 | |||
4845 | idx = get_connection_index(codec, cap, pin); | ||
4846 | if (idx < 0) | ||
4847 | continue; | ||
4848 | /* use only this ADC */ | ||
4849 | if (spec->capsrc_nids) | ||
4850 | spec->capsrc_nids += i; | ||
4851 | spec->adc_nids += i; | ||
4852 | spec->num_adc_nids = 1; | ||
4853 | /* select or unmute this route */ | ||
4854 | if (get_wcaps_type(get_wcaps(codec, cap)) == AC_WID_AUD_MIX) { | ||
4855 | snd_hda_codec_amp_stereo(codec, cap, HDA_INPUT, idx, | ||
4856 | HDA_AMP_MUTE, 0); | ||
4857 | } else { | ||
4858 | snd_hda_codec_write_cache(codec, cap, 0, | ||
4859 | AC_VERB_SET_CONNECT_SEL, idx); | ||
4860 | } | ||
4861 | return; | ||
4862 | } | ||
4863 | } | ||
4864 | |||
4815 | static void set_capture_mixer(struct hda_codec *codec) | 4865 | static void set_capture_mixer(struct hda_codec *codec) |
4816 | { | 4866 | { |
4817 | struct alc_spec *spec = codec->spec; | 4867 | struct alc_spec *spec = codec->spec; |
@@ -4824,14 +4874,15 @@ static void set_capture_mixer(struct hda_codec *codec) | |||
4824 | alc_capture_mixer3 }, | 4874 | alc_capture_mixer3 }, |
4825 | }; | 4875 | }; |
4826 | if (spec->num_adc_nids > 0 && spec->num_adc_nids <= 3) { | 4876 | if (spec->num_adc_nids > 0 && spec->num_adc_nids <= 3) { |
4827 | int mux; | 4877 | int mux = 0; |
4828 | if (spec->auto_mic) { | 4878 | if (spec->auto_mic) |
4829 | mux = 0; | ||
4830 | fixup_automic_adc(codec); | 4879 | fixup_automic_adc(codec); |
4831 | } else if (spec->input_mux && spec->input_mux->num_items > 1) | 4880 | else if (spec->input_mux) { |
4832 | mux = 1; | 4881 | if (spec->input_mux->num_items > 1) |
4833 | else | 4882 | mux = 1; |
4834 | mux = 0; | 4883 | else if (spec->input_mux->num_items == 1) |
4884 | fixup_single_adc(codec); | ||
4885 | } | ||
4835 | spec->cap_mixer = caps[mux][spec->num_adc_nids - 1]; | 4886 | spec->cap_mixer = caps[mux][spec->num_adc_nids - 1]; |
4836 | } | 4887 | } |
4837 | } | 4888 | } |
@@ -7094,8 +7145,8 @@ static struct snd_kcontrol_new alc885_mb5_mixer[] = { | |||
7094 | HDA_BIND_MUTE ("Surround Playback Switch", 0x0d, 0x02, HDA_INPUT), | 7145 | HDA_BIND_MUTE ("Surround Playback Switch", 0x0d, 0x02, HDA_INPUT), |
7095 | HDA_CODEC_VOLUME("LFE Playback Volume", 0x0e, 0x00, HDA_OUTPUT), | 7146 | HDA_CODEC_VOLUME("LFE Playback Volume", 0x0e, 0x00, HDA_OUTPUT), |
7096 | HDA_BIND_MUTE ("LFE Playback Switch", 0x0e, 0x02, HDA_INPUT), | 7147 | HDA_BIND_MUTE ("LFE Playback Switch", 0x0e, 0x02, HDA_INPUT), |
7097 | HDA_CODEC_VOLUME("HP Playback Volume", 0x0f, 0x00, HDA_OUTPUT), | 7148 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0f, 0x00, HDA_OUTPUT), |
7098 | HDA_BIND_MUTE ("HP Playback Switch", 0x0f, 0x02, HDA_INPUT), | 7149 | HDA_BIND_MUTE ("Headphone Playback Switch", 0x0f, 0x02, HDA_INPUT), |
7099 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 7150 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
7100 | HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 7151 | HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
7101 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 7152 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
@@ -7496,6 +7547,7 @@ static struct hda_verb alc885_mb5_init_verbs[] = { | |||
7496 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | 7547 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, |
7497 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 7548 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
7498 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x03}, | 7549 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x03}, |
7550 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | ||
7499 | /* Front Mic pin: input vref at 80% */ | 7551 | /* Front Mic pin: input vref at 80% */ |
7500 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | 7552 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, |
7501 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | 7553 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, |
@@ -7680,6 +7732,27 @@ static void alc885_mbp3_setup(struct hda_codec *codec) | |||
7680 | spec->autocfg.speaker_pins[0] = 0x14; | 7732 | spec->autocfg.speaker_pins[0] = 0x14; |
7681 | } | 7733 | } |
7682 | 7734 | ||
7735 | static void alc885_mb5_automute(struct hda_codec *codec) | ||
7736 | { | ||
7737 | unsigned int present; | ||
7738 | |||
7739 | present = snd_hda_codec_read(codec, 0x14, 0, | ||
7740 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
7741 | snd_hda_codec_amp_stereo(codec, 0x18, HDA_OUTPUT, 0, | ||
7742 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | ||
7743 | snd_hda_codec_amp_stereo(codec, 0x1a, HDA_OUTPUT, 0, | ||
7744 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | ||
7745 | |||
7746 | } | ||
7747 | |||
7748 | static void alc885_mb5_unsol_event(struct hda_codec *codec, | ||
7749 | unsigned int res) | ||
7750 | { | ||
7751 | /* Headphone insertion or removal. */ | ||
7752 | if ((res >> 26) == ALC880_HP_EVENT) | ||
7753 | alc885_mb5_automute(codec); | ||
7754 | } | ||
7755 | |||
7683 | static void alc885_imac91_automute(struct hda_codec *codec) | 7756 | static void alc885_imac91_automute(struct hda_codec *codec) |
7684 | { | 7757 | { |
7685 | unsigned int present; | 7758 | unsigned int present; |
@@ -9126,6 +9199,8 @@ static struct alc_config_preset alc882_presets[] = { | |||
9126 | .input_mux = &mb5_capture_source, | 9199 | .input_mux = &mb5_capture_source, |
9127 | .dig_out_nid = ALC882_DIGOUT_NID, | 9200 | .dig_out_nid = ALC882_DIGOUT_NID, |
9128 | .dig_in_nid = ALC882_DIGIN_NID, | 9201 | .dig_in_nid = ALC882_DIGIN_NID, |
9202 | .unsol_event = alc885_mb5_unsol_event, | ||
9203 | .init_hook = alc885_mb5_automute, | ||
9129 | }, | 9204 | }, |
9130 | [ALC885_MACPRO] = { | 9205 | [ALC885_MACPRO] = { |
9131 | .mixers = { alc882_macpro_mixer }, | 9206 | .mixers = { alc882_macpro_mixer }, |
@@ -9403,6 +9478,7 @@ static struct alc_config_preset alc882_presets[] = { | |||
9403 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), | 9478 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), |
9404 | .channel_mode = alc883_3ST_6ch_modes, | 9479 | .channel_mode = alc883_3ST_6ch_modes, |
9405 | .need_dac_fix = 1, | 9480 | .need_dac_fix = 1, |
9481 | .const_channel_count = 6, | ||
9406 | .num_mux_defs = | 9482 | .num_mux_defs = |
9407 | ARRAY_SIZE(alc888_2_capture_sources), | 9483 | ARRAY_SIZE(alc888_2_capture_sources), |
9408 | .input_mux = alc888_2_capture_sources, | 9484 | .input_mux = alc888_2_capture_sources, |
@@ -10307,7 +10383,7 @@ static void alc262_hp_t5735_setup(struct hda_codec *codec) | |||
10307 | struct alc_spec *spec = codec->spec; | 10383 | struct alc_spec *spec = codec->spec; |
10308 | 10384 | ||
10309 | spec->autocfg.hp_pins[0] = 0x15; | 10385 | spec->autocfg.hp_pins[0] = 0x15; |
10310 | spec->autocfg.speaker_pins[0] = 0x0c; /* HACK: not actually a pin */ | 10386 | spec->autocfg.speaker_pins[0] = 0x14; |
10311 | } | 10387 | } |
10312 | 10388 | ||
10313 | static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = { | 10389 | static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = { |
@@ -11179,7 +11255,7 @@ static int alc262_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
11179 | } | 11255 | } |
11180 | 11256 | ||
11181 | #define alc262_auto_create_input_ctls \ | 11257 | #define alc262_auto_create_input_ctls \ |
11182 | alc880_auto_create_input_ctls | 11258 | alc882_auto_create_input_ctls |
11183 | 11259 | ||
11184 | /* | 11260 | /* |
11185 | * generic initialization of ADC, input mixers and output mixers | 11261 | * generic initialization of ADC, input mixers and output mixers |
@@ -11718,9 +11794,9 @@ static struct alc_config_preset alc262_presets[] = { | |||
11718 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | 11794 | .num_channel_mode = ARRAY_SIZE(alc262_modes), |
11719 | .channel_mode = alc262_modes, | 11795 | .channel_mode = alc262_modes, |
11720 | .input_mux = &alc262_capture_source, | 11796 | .input_mux = &alc262_capture_source, |
11721 | .unsol_event = alc_automute_amp_unsol_event, | 11797 | .unsol_event = alc_sku_unsol_event, |
11722 | .setup = alc262_hp_t5735_setup, | 11798 | .setup = alc262_hp_t5735_setup, |
11723 | .init_hook = alc_automute_amp, | 11799 | .init_hook = alc_inithook, |
11724 | }, | 11800 | }, |
11725 | [ALC262_HP_RP5700] = { | 11801 | [ALC262_HP_RP5700] = { |
11726 | .mixers = { alc262_hp_rp5700_mixer }, | 11802 | .mixers = { alc262_hp_rp5700_mixer }, |
@@ -12471,6 +12547,7 @@ static int alc268_new_analog_output(struct alc_spec *spec, hda_nid_t nid, | |||
12471 | dac = 0x02; | 12547 | dac = 0x02; |
12472 | break; | 12548 | break; |
12473 | case 0x15: | 12549 | case 0x15: |
12550 | case 0x21: | ||
12474 | dac = 0x03; | 12551 | dac = 0x03; |
12475 | break; | 12552 | break; |
12476 | default: | 12553 | default: |
@@ -14855,6 +14932,8 @@ static int patch_alc861(struct hda_codec *codec) | |||
14855 | spec->stream_digital_playback = &alc861_pcm_digital_playback; | 14932 | spec->stream_digital_playback = &alc861_pcm_digital_playback; |
14856 | spec->stream_digital_capture = &alc861_pcm_digital_capture; | 14933 | spec->stream_digital_capture = &alc861_pcm_digital_capture; |
14857 | 14934 | ||
14935 | if (!spec->cap_mixer) | ||
14936 | set_capture_mixer(codec); | ||
14858 | set_beep_amp(spec, 0x23, 0, HDA_OUTPUT); | 14937 | set_beep_amp(spec, 0x23, 0, HDA_OUTPUT); |
14859 | 14938 | ||
14860 | spec->vmaster_nid = 0x03; | 14939 | spec->vmaster_nid = 0x03; |
@@ -17251,7 +17330,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { | |||
17251 | SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_ECS), | 17330 | SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_ECS), |
17252 | SND_PCI_QUIRK(0x105b, 0x0d47, "Foxconn 45CMX/45GMX/45CMX-K", | 17331 | SND_PCI_QUIRK(0x105b, 0x0d47, "Foxconn 45CMX/45GMX/45CMX-K", |
17253 | ALC662_3ST_6ch_DIG), | 17332 | ALC662_3ST_6ch_DIG), |
17254 | SND_PCI_QUIRK(0x1179, 0xff6e, "Toshiba NB200", ALC663_ASUS_MODE4), | 17333 | SND_PCI_QUIRK(0x1179, 0xff6e, "Toshiba NB20x", ALC662_AUTO), |
17255 | SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10), | 17334 | SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10), |
17256 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L", | 17335 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L", |
17257 | ALC662_3ST_6ch_DIG), | 17336 | ALC662_3ST_6ch_DIG), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 2291a8396817..799ba2570902 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -4730,6 +4730,26 @@ static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res) | |||
4730 | } | 4730 | } |
4731 | } | 4731 | } |
4732 | 4732 | ||
4733 | static int hp_blike_system(u32 subsystem_id); | ||
4734 | |||
4735 | static void set_hp_led_gpio(struct hda_codec *codec) | ||
4736 | { | ||
4737 | struct sigmatel_spec *spec = codec->spec; | ||
4738 | switch (codec->vendor_id) { | ||
4739 | case 0x111d7608: | ||
4740 | /* GPIO 0 */ | ||
4741 | spec->gpio_led = 0x01; | ||
4742 | break; | ||
4743 | case 0x111d7600: | ||
4744 | case 0x111d7601: | ||
4745 | case 0x111d7602: | ||
4746 | case 0x111d7603: | ||
4747 | /* GPIO 3 */ | ||
4748 | spec->gpio_led = 0x08; | ||
4749 | break; | ||
4750 | } | ||
4751 | } | ||
4752 | |||
4733 | /* | 4753 | /* |
4734 | * This method searches for the mute LED GPIO configuration | 4754 | * This method searches for the mute LED GPIO configuration |
4735 | * provided as OEM string in SMBIOS. The format of that string | 4755 | * provided as OEM string in SMBIOS. The format of that string |
@@ -4741,6 +4761,14 @@ static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res) | |||
4741 | * | 4761 | * |
4742 | * So, HP B-series like systems may have HP_Mute_LED_0 (current models) | 4762 | * So, HP B-series like systems may have HP_Mute_LED_0 (current models) |
4743 | * or HP_Mute_LED_0_3 (future models) OEM SMBIOS strings | 4763 | * or HP_Mute_LED_0_3 (future models) OEM SMBIOS strings |
4764 | * | ||
4765 | * | ||
4766 | * The dv-series laptops don't seem to have the HP_Mute_LED* strings in | ||
4767 | * SMBIOS - at least the ones I have seen do not have them - which include | ||
4768 | * my own system (HP Pavilion dv6-1110ax) and my cousin's | ||
4769 | * HP Pavilion dv9500t CTO. | ||
4770 | * Need more information on whether it is true across the entire series. | ||
4771 | * -- kunal | ||
4744 | */ | 4772 | */ |
4745 | static int find_mute_led_gpio(struct hda_codec *codec) | 4773 | static int find_mute_led_gpio(struct hda_codec *codec) |
4746 | { | 4774 | { |
@@ -4751,28 +4779,27 @@ static int find_mute_led_gpio(struct hda_codec *codec) | |||
4751 | while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, | 4779 | while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, |
4752 | NULL, dev))) { | 4780 | NULL, dev))) { |
4753 | if (sscanf(dev->name, "HP_Mute_LED_%d_%d", | 4781 | if (sscanf(dev->name, "HP_Mute_LED_%d_%d", |
4754 | &spec->gpio_led_polarity, | 4782 | &spec->gpio_led_polarity, |
4755 | &spec->gpio_led) == 2) { | 4783 | &spec->gpio_led) == 2) { |
4756 | spec->gpio_led = 1 << spec->gpio_led; | 4784 | spec->gpio_led = 1 << spec->gpio_led; |
4757 | return 1; | 4785 | return 1; |
4758 | } | 4786 | } |
4759 | if (sscanf(dev->name, "HP_Mute_LED_%d", | 4787 | if (sscanf(dev->name, "HP_Mute_LED_%d", |
4760 | &spec->gpio_led_polarity) == 1) { | 4788 | &spec->gpio_led_polarity) == 1) { |
4761 | switch (codec->vendor_id) { | 4789 | set_hp_led_gpio(codec); |
4762 | case 0x111d7608: | 4790 | return 1; |
4763 | /* GPIO 0 */ | ||
4764 | spec->gpio_led = 0x01; | ||
4765 | return 1; | ||
4766 | case 0x111d7600: | ||
4767 | case 0x111d7601: | ||
4768 | case 0x111d7602: | ||
4769 | case 0x111d7603: | ||
4770 | /* GPIO 3 */ | ||
4771 | spec->gpio_led = 0x08; | ||
4772 | return 1; | ||
4773 | } | ||
4774 | } | 4791 | } |
4775 | } | 4792 | } |
4793 | |||
4794 | /* | ||
4795 | * Fallback case - if we don't find the DMI strings, | ||
4796 | * we statically set the GPIO - if not a B-series system. | ||
4797 | */ | ||
4798 | if (!hp_blike_system(codec->subsystem_id)) { | ||
4799 | set_hp_led_gpio(codec); | ||
4800 | spec->gpio_led_polarity = 1; | ||
4801 | return 1; | ||
4802 | } | ||
4776 | } | 4803 | } |
4777 | return 0; | 4804 | return 0; |
4778 | } | 4805 | } |
@@ -5548,6 +5575,8 @@ again: | |||
5548 | spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids); | 5575 | spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids); |
5549 | spec->num_smuxes = stac92hd71bxx_connected_smuxes(codec, 0x1e); | 5576 | spec->num_smuxes = stac92hd71bxx_connected_smuxes(codec, 0x1e); |
5550 | 5577 | ||
5578 | snd_printdd("Found board config: %d\n", spec->board_config); | ||
5579 | |||
5551 | switch (spec->board_config) { | 5580 | switch (spec->board_config) { |
5552 | case STAC_HP_M4: | 5581 | case STAC_HP_M4: |
5553 | /* enable internal microphone */ | 5582 | /* enable internal microphone */ |
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index a9dc5fb54774..da589d8664d0 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -627,7 +627,7 @@ static int tlv320aic23_resume(struct platform_device *pdev) | |||
627 | u16 reg; | 627 | u16 reg; |
628 | 628 | ||
629 | /* Sync reg_cache with the hardware */ | 629 | /* Sync reg_cache with the hardware */ |
630 | for (reg = 0; reg < TLV320AIC23_RESET; reg++) { | 630 | for (reg = 0; reg <= TLV320AIC23_ACTIVE; reg++) { |
631 | u16 val = tlv320aic23_read_reg_cache(codec, reg); | 631 | u16 val = tlv320aic23_read_reg_cache(codec, reg); |
632 | tlv320aic23_write(codec, reg, val); | 632 | tlv320aic23_write(codec, reg, val); |
633 | } | 633 | } |
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index ce5515e3f2b0..3595bd57c4eb 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -1504,7 +1504,7 @@ static int wm8903_resume(struct platform_device *pdev) | |||
1504 | struct i2c_client *i2c = codec->control_data; | 1504 | struct i2c_client *i2c = codec->control_data; |
1505 | int i; | 1505 | int i; |
1506 | u16 *reg_cache = codec->reg_cache; | 1506 | u16 *reg_cache = codec->reg_cache; |
1507 | u16 *tmp_cache = kmemdup(codec->reg_cache, sizeof(wm8903_reg_defaults), | 1507 | u16 *tmp_cache = kmemdup(reg_cache, sizeof(wm8903_reg_defaults), |
1508 | GFP_KERNEL); | 1508 | GFP_KERNEL); |
1509 | 1509 | ||
1510 | /* Bring the codec back up to standby first to minimise pop/clicks */ | 1510 | /* Bring the codec back up to standby first to minimise pop/clicks */ |
@@ -1516,6 +1516,7 @@ static int wm8903_resume(struct platform_device *pdev) | |||
1516 | for (i = 2; i < ARRAY_SIZE(wm8903_reg_defaults); i++) | 1516 | for (i = 2; i < ARRAY_SIZE(wm8903_reg_defaults); i++) |
1517 | if (tmp_cache[i] != reg_cache[i]) | 1517 | if (tmp_cache[i] != reg_cache[i]) |
1518 | snd_soc_write(codec, i, tmp_cache[i]); | 1518 | snd_soc_write(codec, i, tmp_cache[i]); |
1519 | kfree(tmp_cache); | ||
1519 | } else { | 1520 | } else { |
1520 | dev_err(&i2c->dev, "Failed to allocate temporary cache\n"); | 1521 | dev_err(&i2c->dev, "Failed to allocate temporary cache\n"); |
1521 | } | 1522 | } |
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile index 3db8a6c523f4..19283e5edfbf 100644 --- a/sound/soc/omap/Makefile +++ b/sound/soc/omap/Makefile | |||
@@ -25,7 +25,7 @@ obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o | |||
25 | obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o | 25 | obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o |
26 | obj-$(CONFIG_SND_OMAP_SOC_OMAP2EVM) += snd-soc-omap2evm.o | 26 | obj-$(CONFIG_SND_OMAP_SOC_OMAP2EVM) += snd-soc-omap2evm.o |
27 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3EVM) += snd-soc-omap3evm.o | 27 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3EVM) += snd-soc-omap3evm.o |
28 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3517EVM) += snd-soc-am3517evm.o | 28 | obj-$(CONFIG_SND_OMAP_SOC_AM3517EVM) += snd-soc-am3517evm.o |
29 | obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o | 29 | obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o |
30 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o | 30 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o |
31 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o | 31 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o |
diff --git a/sound/sound_core.c b/sound/sound_core.c index dbca7c909a31..7c2d677a2df5 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c | |||
@@ -61,7 +61,7 @@ static void __exit cleanup_soundcore(void) | |||
61 | class_destroy(sound_class); | 61 | class_destroy(sound_class); |
62 | } | 62 | } |
63 | 63 | ||
64 | module_init(init_soundcore); | 64 | subsys_initcall(init_soundcore); |
65 | module_exit(cleanup_soundcore); | 65 | module_exit(cleanup_soundcore); |
66 | 66 | ||
67 | 67 | ||