diff options
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/pci/hda/hda_codec.c | 34 | ||||
| -rw-r--r-- | sound/pci/hda/hda_generic.c | 8 | ||||
| -rw-r--r-- | sound/pci/hda/hda_generic.h | 1 | ||||
| -rw-r--r-- | sound/pci/hda/hda_intel.c | 2 | ||||
| -rw-r--r-- | sound/pci/hda/patch_analog.c | 27 | ||||
| -rw-r--r-- | sound/pci/hda/patch_conexant.c | 3 | ||||
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 20 | ||||
| -rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 27 | ||||
| -rw-r--r-- | sound/pci/hda/thinkpad_helper.c | 1 | ||||
| -rw-r--r-- | sound/usb/Kconfig | 1 |
10 files changed, 87 insertions, 37 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index ec4536c8d8d4..dafcf82139e2 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
| @@ -932,7 +932,7 @@ int snd_hda_bus_new(struct snd_card *card, | |||
| 932 | } | 932 | } |
| 933 | EXPORT_SYMBOL_GPL(snd_hda_bus_new); | 933 | EXPORT_SYMBOL_GPL(snd_hda_bus_new); |
| 934 | 934 | ||
| 935 | #ifdef CONFIG_SND_HDA_GENERIC | 935 | #if IS_ENABLED(CONFIG_SND_HDA_GENERIC) |
| 936 | #define is_generic_config(codec) \ | 936 | #define is_generic_config(codec) \ |
| 937 | (codec->modelname && !strcmp(codec->modelname, "generic")) | 937 | (codec->modelname && !strcmp(codec->modelname, "generic")) |
| 938 | #else | 938 | #else |
| @@ -1339,23 +1339,15 @@ get_hda_cvt_setup(struct hda_codec *codec, hda_nid_t nid) | |||
| 1339 | /* | 1339 | /* |
| 1340 | * Dynamic symbol binding for the codec parsers | 1340 | * Dynamic symbol binding for the codec parsers |
| 1341 | */ | 1341 | */ |
| 1342 | #ifdef MODULE | ||
| 1343 | #define load_parser_sym(sym) ((int (*)(struct hda_codec *))symbol_request(sym)) | ||
| 1344 | #define unload_parser_addr(addr) symbol_put_addr(addr) | ||
| 1345 | #else | ||
| 1346 | #define load_parser_sym(sym) (sym) | ||
| 1347 | #define unload_parser_addr(addr) do {} while (0) | ||
| 1348 | #endif | ||
| 1349 | 1342 | ||
| 1350 | #define load_parser(codec, sym) \ | 1343 | #define load_parser(codec, sym) \ |
| 1351 | ((codec)->parser = load_parser_sym(sym)) | 1344 | ((codec)->parser = (int (*)(struct hda_codec *))symbol_request(sym)) |
| 1352 | 1345 | ||
| 1353 | static void unload_parser(struct hda_codec *codec) | 1346 | static void unload_parser(struct hda_codec *codec) |
| 1354 | { | 1347 | { |
| 1355 | if (codec->parser) { | 1348 | if (codec->parser) |
| 1356 | unload_parser_addr(codec->parser); | 1349 | symbol_put_addr(codec->parser); |
| 1357 | codec->parser = NULL; | 1350 | codec->parser = NULL; |
| 1358 | } | ||
| 1359 | } | 1351 | } |
| 1360 | 1352 | ||
| 1361 | /* | 1353 | /* |
| @@ -1570,7 +1562,7 @@ int snd_hda_codec_update_widgets(struct hda_codec *codec) | |||
| 1570 | EXPORT_SYMBOL_GPL(snd_hda_codec_update_widgets); | 1562 | EXPORT_SYMBOL_GPL(snd_hda_codec_update_widgets); |
| 1571 | 1563 | ||
| 1572 | 1564 | ||
| 1573 | #ifdef CONFIG_SND_HDA_CODEC_HDMI | 1565 | #if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI) |
| 1574 | /* if all audio out widgets are digital, let's assume the codec as a HDMI/DP */ | 1566 | /* if all audio out widgets are digital, let's assume the codec as a HDMI/DP */ |
| 1575 | static bool is_likely_hdmi_codec(struct hda_codec *codec) | 1567 | static bool is_likely_hdmi_codec(struct hda_codec *codec) |
| 1576 | { | 1568 | { |
| @@ -1620,12 +1612,20 @@ int snd_hda_codec_configure(struct hda_codec *codec) | |||
| 1620 | patch = codec->preset->patch; | 1612 | patch = codec->preset->patch; |
| 1621 | if (!patch) { | 1613 | if (!patch) { |
| 1622 | unload_parser(codec); /* to be sure */ | 1614 | unload_parser(codec); /* to be sure */ |
| 1623 | if (is_likely_hdmi_codec(codec)) | 1615 | if (is_likely_hdmi_codec(codec)) { |
| 1616 | #if IS_MODULE(CONFIG_SND_HDA_CODEC_HDMI) | ||
| 1624 | patch = load_parser(codec, snd_hda_parse_hdmi_codec); | 1617 | patch = load_parser(codec, snd_hda_parse_hdmi_codec); |
| 1625 | #ifdef CONFIG_SND_HDA_GENERIC | 1618 | #elif IS_BUILTIN(CONFIG_SND_HDA_CODEC_HDMI) |
| 1626 | if (!patch) | 1619 | patch = snd_hda_parse_hdmi_codec; |
| 1620 | #endif | ||
| 1621 | } | ||
| 1622 | if (!patch) { | ||
| 1623 | #if IS_MODULE(CONFIG_SND_HDA_GENERIC) | ||
| 1627 | patch = load_parser(codec, snd_hda_parse_generic_codec); | 1624 | patch = load_parser(codec, snd_hda_parse_generic_codec); |
| 1625 | #elif IS_BUILTIN(CONFIG_SND_HDA_GENERIC) | ||
| 1626 | patch = snd_hda_parse_generic_codec; | ||
| 1628 | #endif | 1627 | #endif |
| 1628 | } | ||
| 1629 | if (!patch) { | 1629 | if (!patch) { |
| 1630 | printk(KERN_ERR "hda-codec: No codec parser is available\n"); | 1630 | printk(KERN_ERR "hda-codec: No codec parser is available\n"); |
| 1631 | return -ENODEV; | 1631 | return -ENODEV; |
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 8321a97d5c05..d9a09bdd09db 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
| @@ -3269,7 +3269,7 @@ static int cap_put_caller(struct snd_kcontrol *kcontrol, | |||
| 3269 | mutex_unlock(&codec->control_mutex); | 3269 | mutex_unlock(&codec->control_mutex); |
| 3270 | snd_hda_codec_flush_cache(codec); /* flush the updates */ | 3270 | snd_hda_codec_flush_cache(codec); /* flush the updates */ |
| 3271 | if (err >= 0 && spec->cap_sync_hook) | 3271 | if (err >= 0 && spec->cap_sync_hook) |
| 3272 | spec->cap_sync_hook(codec, ucontrol); | 3272 | spec->cap_sync_hook(codec, kcontrol, ucontrol); |
| 3273 | return err; | 3273 | return err; |
| 3274 | } | 3274 | } |
| 3275 | 3275 | ||
| @@ -3390,7 +3390,7 @@ static int cap_single_sw_put(struct snd_kcontrol *kcontrol, | |||
| 3390 | return ret; | 3390 | return ret; |
| 3391 | 3391 | ||
| 3392 | if (spec->cap_sync_hook) | 3392 | if (spec->cap_sync_hook) |
| 3393 | spec->cap_sync_hook(codec, ucontrol); | 3393 | spec->cap_sync_hook(codec, kcontrol, ucontrol); |
| 3394 | 3394 | ||
| 3395 | return ret; | 3395 | return ret; |
| 3396 | } | 3396 | } |
| @@ -3795,7 +3795,7 @@ static int mux_select(struct hda_codec *codec, unsigned int adc_idx, | |||
| 3795 | return 0; | 3795 | return 0; |
| 3796 | snd_hda_activate_path(codec, path, true, false); | 3796 | snd_hda_activate_path(codec, path, true, false); |
| 3797 | if (spec->cap_sync_hook) | 3797 | if (spec->cap_sync_hook) |
| 3798 | spec->cap_sync_hook(codec, NULL); | 3798 | spec->cap_sync_hook(codec, NULL, NULL); |
| 3799 | path_power_down_sync(codec, old_path); | 3799 | path_power_down_sync(codec, old_path); |
| 3800 | return 1; | 3800 | return 1; |
| 3801 | } | 3801 | } |
| @@ -5270,7 +5270,7 @@ static void init_input_src(struct hda_codec *codec) | |||
| 5270 | } | 5270 | } |
| 5271 | 5271 | ||
| 5272 | if (spec->cap_sync_hook) | 5272 | if (spec->cap_sync_hook) |
| 5273 | spec->cap_sync_hook(codec, NULL); | 5273 | spec->cap_sync_hook(codec, NULL, NULL); |
| 5274 | } | 5274 | } |
| 5275 | 5275 | ||
| 5276 | /* set right pin controls for digital I/O */ | 5276 | /* set right pin controls for digital I/O */ |
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h index 07f767231c9f..c908afbe4d94 100644 --- a/sound/pci/hda/hda_generic.h +++ b/sound/pci/hda/hda_generic.h | |||
| @@ -274,6 +274,7 @@ struct hda_gen_spec { | |||
| 274 | void (*init_hook)(struct hda_codec *codec); | 274 | void (*init_hook)(struct hda_codec *codec); |
| 275 | void (*automute_hook)(struct hda_codec *codec); | 275 | void (*automute_hook)(struct hda_codec *codec); |
| 276 | void (*cap_sync_hook)(struct hda_codec *codec, | 276 | void (*cap_sync_hook)(struct hda_codec *codec, |
| 277 | struct snd_kcontrol *kcontrol, | ||
| 277 | struct snd_ctl_elem_value *ucontrol); | 278 | struct snd_ctl_elem_value *ucontrol); |
| 278 | 279 | ||
| 279 | /* PCM hooks */ | 280 | /* PCM hooks */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index fa2879a21a50..e354ab1ec20f 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
| @@ -198,7 +198,7 @@ MODULE_DESCRIPTION("Intel HDA driver"); | |||
| 198 | #endif | 198 | #endif |
| 199 | 199 | ||
| 200 | #if defined(CONFIG_PM) && defined(CONFIG_VGA_SWITCHEROO) | 200 | #if defined(CONFIG_PM) && defined(CONFIG_VGA_SWITCHEROO) |
| 201 | #ifdef CONFIG_SND_HDA_CODEC_HDMI | 201 | #if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI) |
| 202 | #define SUPPORT_VGA_SWITCHEROO | 202 | #define SUPPORT_VGA_SWITCHEROO |
| 203 | #endif | 203 | #endif |
| 204 | #endif | 204 | #endif |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 7a426ed491f2..df3652ad15ef 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
| @@ -244,6 +244,19 @@ static void ad_fixup_inv_jack_detect(struct hda_codec *codec, | |||
| 244 | } | 244 | } |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | /* Toshiba Satellite L40 implements EAPD in a standard way unlike others */ | ||
| 248 | static void ad1986a_fixup_eapd(struct hda_codec *codec, | ||
| 249 | const struct hda_fixup *fix, int action) | ||
| 250 | { | ||
| 251 | struct ad198x_spec *spec = codec->spec; | ||
| 252 | |||
| 253 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | ||
| 254 | codec->inv_eapd = 0; | ||
| 255 | spec->gen.keep_eapd_on = 1; | ||
| 256 | spec->eapd_nid = 0x1b; | ||
| 257 | } | ||
| 258 | } | ||
| 259 | |||
| 247 | enum { | 260 | enum { |
| 248 | AD1986A_FIXUP_INV_JACK_DETECT, | 261 | AD1986A_FIXUP_INV_JACK_DETECT, |
| 249 | AD1986A_FIXUP_ULTRA, | 262 | AD1986A_FIXUP_ULTRA, |
| @@ -251,6 +264,7 @@ enum { | |||
| 251 | AD1986A_FIXUP_3STACK, | 264 | AD1986A_FIXUP_3STACK, |
| 252 | AD1986A_FIXUP_LAPTOP, | 265 | AD1986A_FIXUP_LAPTOP, |
| 253 | AD1986A_FIXUP_LAPTOP_IMIC, | 266 | AD1986A_FIXUP_LAPTOP_IMIC, |
| 267 | AD1986A_FIXUP_EAPD, | ||
| 254 | }; | 268 | }; |
| 255 | 269 | ||
| 256 | static const struct hda_fixup ad1986a_fixups[] = { | 270 | static const struct hda_fixup ad1986a_fixups[] = { |
| @@ -311,6 +325,10 @@ static const struct hda_fixup ad1986a_fixups[] = { | |||
| 311 | .chained_before = 1, | 325 | .chained_before = 1, |
| 312 | .chain_id = AD1986A_FIXUP_LAPTOP, | 326 | .chain_id = AD1986A_FIXUP_LAPTOP, |
| 313 | }, | 327 | }, |
| 328 | [AD1986A_FIXUP_EAPD] = { | ||
| 329 | .type = HDA_FIXUP_FUNC, | ||
| 330 | .v.func = ad1986a_fixup_eapd, | ||
| 331 | }, | ||
| 314 | }; | 332 | }; |
| 315 | 333 | ||
| 316 | static const struct snd_pci_quirk ad1986a_fixup_tbl[] = { | 334 | static const struct snd_pci_quirk ad1986a_fixup_tbl[] = { |
| @@ -318,6 +336,7 @@ static const struct snd_pci_quirk ad1986a_fixup_tbl[] = { | |||
| 318 | SND_PCI_QUIRK_MASK(0x1043, 0xff00, 0x8100, "ASUS P5", AD1986A_FIXUP_3STACK), | 336 | SND_PCI_QUIRK_MASK(0x1043, 0xff00, 0x8100, "ASUS P5", AD1986A_FIXUP_3STACK), |
| 319 | SND_PCI_QUIRK_MASK(0x1043, 0xff00, 0x8200, "ASUS M2", AD1986A_FIXUP_3STACK), | 337 | SND_PCI_QUIRK_MASK(0x1043, 0xff00, 0x8200, "ASUS M2", AD1986A_FIXUP_3STACK), |
| 320 | SND_PCI_QUIRK(0x10de, 0xcb84, "ASUS A8N-VM", AD1986A_FIXUP_3STACK), | 338 | SND_PCI_QUIRK(0x10de, 0xcb84, "ASUS A8N-VM", AD1986A_FIXUP_3STACK), |
| 339 | SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba Satellite L40", AD1986A_FIXUP_EAPD), | ||
| 321 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_FIXUP_LAPTOP), | 340 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_FIXUP_LAPTOP), |
| 322 | SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc000, "Samsung", AD1986A_FIXUP_SAMSUNG), | 341 | SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc000, "Samsung", AD1986A_FIXUP_SAMSUNG), |
| 323 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_FIXUP_ULTRA), | 342 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_FIXUP_ULTRA), |
| @@ -472,6 +491,8 @@ static int ad1983_add_spdif_mux_ctl(struct hda_codec *codec) | |||
| 472 | static int patch_ad1983(struct hda_codec *codec) | 491 | static int patch_ad1983(struct hda_codec *codec) |
| 473 | { | 492 | { |
| 474 | struct ad198x_spec *spec; | 493 | struct ad198x_spec *spec; |
| 494 | static hda_nid_t conn_0c[] = { 0x08 }; | ||
| 495 | static hda_nid_t conn_0d[] = { 0x09 }; | ||
| 475 | int err; | 496 | int err; |
| 476 | 497 | ||
| 477 | err = alloc_ad_spec(codec); | 498 | err = alloc_ad_spec(codec); |
| @@ -479,8 +500,14 @@ static int patch_ad1983(struct hda_codec *codec) | |||
| 479 | return err; | 500 | return err; |
| 480 | spec = codec->spec; | 501 | spec = codec->spec; |
| 481 | 502 | ||
| 503 | spec->gen.mixer_nid = 0x0e; | ||
| 482 | spec->gen.beep_nid = 0x10; | 504 | spec->gen.beep_nid = 0x10; |
| 483 | set_beep_amp(spec, 0x10, 0, HDA_OUTPUT); | 505 | set_beep_amp(spec, 0x10, 0, HDA_OUTPUT); |
| 506 | |||
| 507 | /* limit the loopback routes not to confuse the parser */ | ||
| 508 | snd_hda_override_conn_list(codec, 0x0c, ARRAY_SIZE(conn_0c), conn_0c); | ||
| 509 | snd_hda_override_conn_list(codec, 0x0d, ARRAY_SIZE(conn_0d), conn_0d); | ||
| 510 | |||
| 484 | err = ad198x_parse_auto_config(codec, false); | 511 | err = ad198x_parse_auto_config(codec, false); |
| 485 | if (err < 0) | 512 | if (err < 0) |
| 486 | goto error; | 513 | goto error; |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 4e0ec146553d..bcf91bea3317 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
| @@ -3291,7 +3291,8 @@ static void cxt_update_headset_mode(struct hda_codec *codec) | |||
| 3291 | } | 3291 | } |
| 3292 | 3292 | ||
| 3293 | static void cxt_update_headset_mode_hook(struct hda_codec *codec, | 3293 | static void cxt_update_headset_mode_hook(struct hda_codec *codec, |
| 3294 | struct snd_ctl_elem_value *ucontrol) | 3294 | struct snd_kcontrol *kcontrol, |
| 3295 | struct snd_ctl_elem_value *ucontrol) | ||
| 3295 | { | 3296 | { |
| 3296 | cxt_update_headset_mode(codec); | 3297 | cxt_update_headset_mode(codec); |
| 3297 | } | 3298 | } |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 56a8f1876603..a9a83b85517a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -708,7 +708,8 @@ static void alc_inv_dmic_sync(struct hda_codec *codec, bool force) | |||
| 708 | } | 708 | } |
| 709 | 709 | ||
| 710 | static void alc_inv_dmic_hook(struct hda_codec *codec, | 710 | static void alc_inv_dmic_hook(struct hda_codec *codec, |
| 711 | struct snd_ctl_elem_value *ucontrol) | 711 | struct snd_kcontrol *kcontrol, |
| 712 | struct snd_ctl_elem_value *ucontrol) | ||
| 712 | { | 713 | { |
| 713 | alc_inv_dmic_sync(codec, false); | 714 | alc_inv_dmic_sync(codec, false); |
| 714 | } | 715 | } |
| @@ -1821,6 +1822,7 @@ enum { | |||
| 1821 | ALC889_FIXUP_IMAC91_VREF, | 1822 | ALC889_FIXUP_IMAC91_VREF, |
| 1822 | ALC889_FIXUP_MBA11_VREF, | 1823 | ALC889_FIXUP_MBA11_VREF, |
| 1823 | ALC889_FIXUP_MBA21_VREF, | 1824 | ALC889_FIXUP_MBA21_VREF, |
| 1825 | ALC889_FIXUP_MP11_VREF, | ||
| 1824 | ALC882_FIXUP_INV_DMIC, | 1826 | ALC882_FIXUP_INV_DMIC, |
| 1825 | ALC882_FIXUP_NO_PRIMARY_HP, | 1827 | ALC882_FIXUP_NO_PRIMARY_HP, |
| 1826 | ALC887_FIXUP_ASUS_BASS, | 1828 | ALC887_FIXUP_ASUS_BASS, |
| @@ -2190,6 +2192,12 @@ static const struct hda_fixup alc882_fixups[] = { | |||
| 2190 | .chained = true, | 2192 | .chained = true, |
| 2191 | .chain_id = ALC889_FIXUP_MBP_VREF, | 2193 | .chain_id = ALC889_FIXUP_MBP_VREF, |
| 2192 | }, | 2194 | }, |
| 2195 | [ALC889_FIXUP_MP11_VREF] = { | ||
| 2196 | .type = HDA_FIXUP_FUNC, | ||
| 2197 | .v.func = alc889_fixup_mba11_vref, | ||
| 2198 | .chained = true, | ||
| 2199 | .chain_id = ALC885_FIXUP_MACPRO_GPIO, | ||
| 2200 | }, | ||
| 2193 | [ALC882_FIXUP_INV_DMIC] = { | 2201 | [ALC882_FIXUP_INV_DMIC] = { |
| 2194 | .type = HDA_FIXUP_FUNC, | 2202 | .type = HDA_FIXUP_FUNC, |
| 2195 | .v.func = alc_fixup_inv_dmic_0x12, | 2203 | .v.func = alc_fixup_inv_dmic_0x12, |
| @@ -2253,7 +2261,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
| 2253 | SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF), | 2261 | SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF), |
| 2254 | SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC889_FIXUP_MBP_VREF), | 2262 | SND_PCI_QUIRK(0x106b, 0x00a1, "Macbook", ALC889_FIXUP_MBP_VREF), |
| 2255 | SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), | 2263 | SND_PCI_QUIRK(0x106b, 0x00a4, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), |
| 2256 | SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC885_FIXUP_MACPRO_GPIO), | 2264 | SND_PCI_QUIRK(0x106b, 0x0c00, "Mac Pro", ALC889_FIXUP_MP11_VREF), |
| 2257 | SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO), | 2265 | SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_FIXUP_MACPRO_GPIO), |
| 2258 | SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO), | 2266 | SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_FIXUP_MACPRO_GPIO), |
| 2259 | SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF), | 2267 | SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF), |
| @@ -3211,7 +3219,8 @@ static void alc269_fixup_hp_gpio_mute_hook(void *private_data, int enabled) | |||
| 3211 | 3219 | ||
| 3212 | /* turn on/off mic-mute LED per capture hook */ | 3220 | /* turn on/off mic-mute LED per capture hook */ |
| 3213 | static void alc269_fixup_hp_gpio_mic_mute_hook(struct hda_codec *codec, | 3221 | static void alc269_fixup_hp_gpio_mic_mute_hook(struct hda_codec *codec, |
| 3214 | struct snd_ctl_elem_value *ucontrol) | 3222 | struct snd_kcontrol *kcontrol, |
| 3223 | struct snd_ctl_elem_value *ucontrol) | ||
| 3215 | { | 3224 | { |
| 3216 | struct alc_spec *spec = codec->spec; | 3225 | struct alc_spec *spec = codec->spec; |
| 3217 | unsigned int oldval = spec->gpio_led; | 3226 | unsigned int oldval = spec->gpio_led; |
| @@ -3521,7 +3530,8 @@ static void alc_update_headset_mode(struct hda_codec *codec) | |||
| 3521 | } | 3530 | } |
| 3522 | 3531 | ||
| 3523 | static void alc_update_headset_mode_hook(struct hda_codec *codec, | 3532 | static void alc_update_headset_mode_hook(struct hda_codec *codec, |
| 3524 | struct snd_ctl_elem_value *ucontrol) | 3533 | struct snd_kcontrol *kcontrol, |
| 3534 | struct snd_ctl_elem_value *ucontrol) | ||
| 3525 | { | 3535 | { |
| 3526 | alc_update_headset_mode(codec); | 3536 | alc_update_headset_mode(codec); |
| 3527 | } | 3537 | } |
| @@ -4322,6 +4332,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
| 4322 | SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), | 4332 | SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), |
| 4323 | SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), | 4333 | SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), |
| 4324 | SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101), | 4334 | SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101), |
| 4335 | SND_PCI_QUIRK(0x104d, 0x90b5, "Sony VAIO Pro 11", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), | ||
| 4325 | SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), | 4336 | SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), |
| 4326 | SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), | 4337 | SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), |
| 4327 | SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), | 4338 | SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
| @@ -5096,6 +5107,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = { | |||
| 5096 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), | 5107 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
| 5097 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5108 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
| 5098 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5109 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
| 5110 | SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | ||
| 5099 | SND_PCI_QUIRK(0x1028, 0x0623, "Dell", ALC668_FIXUP_AUTO_MUTE), | 5111 | SND_PCI_QUIRK(0x1028, 0x0623, "Dell", ALC668_FIXUP_AUTO_MUTE), |
| 5100 | SND_PCI_QUIRK(0x1028, 0x0624, "Dell", ALC668_FIXUP_AUTO_MUTE), | 5112 | SND_PCI_QUIRK(0x1028, 0x0624, "Dell", ALC668_FIXUP_AUTO_MUTE), |
| 5101 | SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5113 | SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 6998cf29b9bc..7311badf6a94 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
| @@ -194,7 +194,7 @@ struct sigmatel_spec { | |||
| 194 | int default_polarity; | 194 | int default_polarity; |
| 195 | 195 | ||
| 196 | unsigned int mic_mute_led_gpio; /* capture mute LED GPIO */ | 196 | unsigned int mic_mute_led_gpio; /* capture mute LED GPIO */ |
| 197 | bool mic_mute_led_on; /* current mic mute state */ | 197 | unsigned int mic_enabled; /* current mic mute state (bitmask) */ |
| 198 | 198 | ||
| 199 | /* stream */ | 199 | /* stream */ |
| 200 | unsigned int stream_delay; | 200 | unsigned int stream_delay; |
| @@ -324,19 +324,26 @@ static void stac_gpio_set(struct hda_codec *codec, unsigned int mask, | |||
| 324 | 324 | ||
| 325 | /* hook for controlling mic-mute LED GPIO */ | 325 | /* hook for controlling mic-mute LED GPIO */ |
| 326 | static void stac_capture_led_hook(struct hda_codec *codec, | 326 | static void stac_capture_led_hook(struct hda_codec *codec, |
| 327 | struct snd_ctl_elem_value *ucontrol) | 327 | struct snd_kcontrol *kcontrol, |
| 328 | struct snd_ctl_elem_value *ucontrol) | ||
| 328 | { | 329 | { |
| 329 | struct sigmatel_spec *spec = codec->spec; | 330 | struct sigmatel_spec *spec = codec->spec; |
| 330 | bool mute; | 331 | unsigned int mask; |
| 332 | bool cur_mute, prev_mute; | ||
| 331 | 333 | ||
| 332 | if (!ucontrol) | 334 | if (!kcontrol || !ucontrol) |
| 333 | return; | 335 | return; |
| 334 | 336 | ||
| 335 | mute = !(ucontrol->value.integer.value[0] || | 337 | mask = 1U << snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
| 336 | ucontrol->value.integer.value[1]); | 338 | prev_mute = !spec->mic_enabled; |
| 337 | if (spec->mic_mute_led_on != mute) { | 339 | if (ucontrol->value.integer.value[0] || |
| 338 | spec->mic_mute_led_on = mute; | 340 | ucontrol->value.integer.value[1]) |
| 339 | if (mute) | 341 | spec->mic_enabled |= mask; |
| 342 | else | ||
| 343 | spec->mic_enabled &= ~mask; | ||
| 344 | cur_mute = !spec->mic_enabled; | ||
| 345 | if (cur_mute != prev_mute) { | ||
| 346 | if (cur_mute) | ||
| 340 | spec->gpio_data |= spec->mic_mute_led_gpio; | 347 | spec->gpio_data |= spec->mic_mute_led_gpio; |
| 341 | else | 348 | else |
| 342 | spec->gpio_data &= ~spec->mic_mute_led_gpio; | 349 | spec->gpio_data &= ~spec->mic_mute_led_gpio; |
| @@ -4462,7 +4469,7 @@ static void stac_setup_gpio(struct hda_codec *codec) | |||
| 4462 | if (spec->mic_mute_led_gpio) { | 4469 | if (spec->mic_mute_led_gpio) { |
| 4463 | spec->gpio_mask |= spec->mic_mute_led_gpio; | 4470 | spec->gpio_mask |= spec->mic_mute_led_gpio; |
| 4464 | spec->gpio_dir |= spec->mic_mute_led_gpio; | 4471 | spec->gpio_dir |= spec->mic_mute_led_gpio; |
| 4465 | spec->mic_mute_led_on = true; | 4472 | spec->mic_enabled = 0; |
| 4466 | spec->gpio_data |= spec->mic_mute_led_gpio; | 4473 | spec->gpio_data |= spec->mic_mute_led_gpio; |
| 4467 | 4474 | ||
| 4468 | spec->gen.cap_sync_hook = stac_capture_led_hook; | 4475 | spec->gen.cap_sync_hook = stac_capture_led_hook; |
diff --git a/sound/pci/hda/thinkpad_helper.c b/sound/pci/hda/thinkpad_helper.c index 5799fbc24c28..8fe3b8c18ed4 100644 --- a/sound/pci/hda/thinkpad_helper.c +++ b/sound/pci/hda/thinkpad_helper.c | |||
| @@ -39,6 +39,7 @@ static void update_tpacpi_mute_led(void *private_data, int enabled) | |||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | static void update_tpacpi_micmute_led(struct hda_codec *codec, | 41 | static void update_tpacpi_micmute_led(struct hda_codec *codec, |
| 42 | struct snd_kcontrol *kcontrol, | ||
| 42 | struct snd_ctl_elem_value *ucontrol) | 43 | struct snd_ctl_elem_value *ucontrol) |
| 43 | { | 44 | { |
| 44 | if (!ucontrol || !led_set_func) | 45 | if (!ucontrol || !led_set_func) |
diff --git a/sound/usb/Kconfig b/sound/usb/Kconfig index de9408b83f75..e05a86b7c0da 100644 --- a/sound/usb/Kconfig +++ b/sound/usb/Kconfig | |||
| @@ -14,6 +14,7 @@ config SND_USB_AUDIO | |||
| 14 | select SND_HWDEP | 14 | select SND_HWDEP |
| 15 | select SND_RAWMIDI | 15 | select SND_RAWMIDI |
| 16 | select SND_PCM | 16 | select SND_PCM |
| 17 | select BITREVERSE | ||
| 17 | help | 18 | help |
| 18 | Say Y here to include support for USB audio and USB MIDI | 19 | Say Y here to include support for USB audio and USB MIDI |
| 19 | devices. | 20 | devices. |
