diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-27 15:50:28 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-27 15:50:28 -0400 |
| commit | 2b25679453e55be112a6bf2463fa203d43a5f318 (patch) | |
| tree | 68e82cd536c4da5c42f6a87d20fc6a36ed89cb44 | |
| parent | 6ebfbe9a1a92fdde66f0b7b017bf39ad7974fe17 (diff) | |
| parent | 6e1c39c6b00d9141a82c231ba7c5e5b1716974b2 (diff) | |
Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Here you find quite a few changes for HD-audio and a copule of quirk
additions for USB-audio. All reasonably small and/or trivial."
* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix power-map regression for HP dv6 & co
ALSA: hda - Initialize caches at codec reconfiguration
ALSA: hda - Fix memory leaks at module unload
ALSA: hda - Fix memory leaks in Realtek & Conexant codec parsers
ALSA: hda - Add Realtek ALC280 codec support
ALSA: hda - Remove obsoleted CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS
ASoC: wm8994: remove duplicate code
ALSA: usb-audio: add BOSS GT-100 support
ALSA: HDA: Add inverted internal mic quirk for Lenovo S205
ALSA: hda - Fix ALC272X codec detection
ALSA: snd_usb_audio: ignore ctrl errors on QuickCam Pro for Notebooks
ALSA: snd_usb_audio: ignore ctrl errors on QuickCam E3500
| -rw-r--r-- | sound/pci/hda/Kconfig | 13 | ||||
| -rw-r--r-- | sound/pci/hda/hda_auto_parser.c | 1 | ||||
| -rw-r--r-- | sound/pci/hda/hda_auto_parser.h | 10 | ||||
| -rw-r--r-- | sound/pci/hda/hda_codec.c | 4 | ||||
| -rw-r--r-- | sound/pci/hda/patch_conexant.c | 6 | ||||
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 15 | ||||
| -rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 7 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8994.c | 3 | ||||
| -rw-r--r-- | sound/usb/mixer_maps.c | 8 | ||||
| -rw-r--r-- | sound/usb/quirks-table.h | 30 |
10 files changed, 72 insertions, 25 deletions
diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig index 163b6b5de3eb..d03079764189 100644 --- a/sound/pci/hda/Kconfig +++ b/sound/pci/hda/Kconfig | |||
| @@ -97,19 +97,6 @@ config SND_HDA_CODEC_REALTEK | |||
| 97 | snd-hda-codec-realtek. | 97 | snd-hda-codec-realtek. |
| 98 | This module is automatically loaded at probing. | 98 | This module is automatically loaded at probing. |
| 99 | 99 | ||
| 100 | config SND_HDA_ENABLE_REALTEK_QUIRKS | ||
| 101 | bool "Build static quirks for Realtek codecs" | ||
| 102 | depends on SND_HDA_CODEC_REALTEK | ||
| 103 | default y | ||
| 104 | help | ||
| 105 | Say Y here to build the static quirks codes for Realtek codecs. | ||
| 106 | If you need the "model" preset that the default BIOS auto-parser | ||
| 107 | can't handle, turn this option on. | ||
| 108 | |||
| 109 | If your device works with model=auto option, basically you don't | ||
| 110 | need the quirk code. By turning this off, you can reduce the | ||
| 111 | module size quite a lot. | ||
| 112 | |||
| 113 | config SND_HDA_CODEC_ANALOG | 100 | config SND_HDA_CODEC_ANALOG |
| 114 | bool "Build Analog Device HD-audio codec support" | 101 | bool "Build Analog Device HD-audio codec support" |
| 115 | default y | 102 | default y |
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c index 6e9ef3e25093..f7520b9f909c 100644 --- a/sound/pci/hda/hda_auto_parser.c +++ b/sound/pci/hda/hda_auto_parser.c | |||
| @@ -618,7 +618,6 @@ int snd_hda_gen_add_verbs(struct hda_gen_spec *spec, | |||
| 618 | const struct hda_verb *list) | 618 | const struct hda_verb *list) |
| 619 | { | 619 | { |
| 620 | const struct hda_verb **v; | 620 | const struct hda_verb **v; |
| 621 | snd_array_init(&spec->verbs, sizeof(struct hda_verb *), 8); | ||
| 622 | v = snd_array_new(&spec->verbs); | 621 | v = snd_array_new(&spec->verbs); |
| 623 | if (!v) | 622 | if (!v) |
| 624 | return -ENOMEM; | 623 | return -ENOMEM; |
diff --git a/sound/pci/hda/hda_auto_parser.h b/sound/pci/hda/hda_auto_parser.h index 2a7889dfbd1b..632ad0ad3007 100644 --- a/sound/pci/hda/hda_auto_parser.h +++ b/sound/pci/hda/hda_auto_parser.h | |||
| @@ -157,4 +157,14 @@ void snd_hda_pick_fixup(struct hda_codec *codec, | |||
| 157 | const struct snd_pci_quirk *quirk, | 157 | const struct snd_pci_quirk *quirk, |
| 158 | const struct hda_fixup *fixlist); | 158 | const struct hda_fixup *fixlist); |
| 159 | 159 | ||
| 160 | static inline void snd_hda_gen_init(struct hda_gen_spec *spec) | ||
| 161 | { | ||
| 162 | snd_array_init(&spec->verbs, sizeof(struct hda_verb *), 8); | ||
| 163 | } | ||
| 164 | |||
| 165 | static inline void snd_hda_gen_free(struct hda_gen_spec *spec) | ||
| 166 | { | ||
| 167 | snd_array_free(&spec->verbs); | ||
| 168 | } | ||
| 169 | |||
| 160 | #endif /* __SOUND_HDA_AUTO_PARSER_H */ | 170 | #endif /* __SOUND_HDA_AUTO_PARSER_H */ |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 7504e62188d6..51cb2a2e4fce 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
| @@ -1184,6 +1184,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) | |||
| 1184 | { | 1184 | { |
| 1185 | if (!codec) | 1185 | if (!codec) |
| 1186 | return; | 1186 | return; |
| 1187 | snd_hda_jack_tbl_clear(codec); | ||
| 1187 | restore_init_pincfgs(codec); | 1188 | restore_init_pincfgs(codec); |
| 1188 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 1189 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
| 1189 | cancel_delayed_work(&codec->power_work); | 1190 | cancel_delayed_work(&codec->power_work); |
| @@ -1192,6 +1193,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) | |||
| 1192 | list_del(&codec->list); | 1193 | list_del(&codec->list); |
| 1193 | snd_array_free(&codec->mixers); | 1194 | snd_array_free(&codec->mixers); |
| 1194 | snd_array_free(&codec->nids); | 1195 | snd_array_free(&codec->nids); |
| 1196 | snd_array_free(&codec->cvt_setups); | ||
| 1195 | snd_array_free(&codec->conn_lists); | 1197 | snd_array_free(&codec->conn_lists); |
| 1196 | snd_array_free(&codec->spdif_out); | 1198 | snd_array_free(&codec->spdif_out); |
| 1197 | codec->bus->caddr_tbl[codec->addr] = NULL; | 1199 | codec->bus->caddr_tbl[codec->addr] = NULL; |
| @@ -2333,6 +2335,8 @@ int snd_hda_codec_reset(struct hda_codec *codec) | |||
| 2333 | /* free only driver_pins so that init_pins + user_pins are restored */ | 2335 | /* free only driver_pins so that init_pins + user_pins are restored */ |
| 2334 | snd_array_free(&codec->driver_pins); | 2336 | snd_array_free(&codec->driver_pins); |
| 2335 | restore_pincfgs(codec); | 2337 | restore_pincfgs(codec); |
| 2338 | snd_array_free(&codec->cvt_setups); | ||
| 2339 | snd_array_free(&codec->spdif_out); | ||
| 2336 | codec->num_pcms = 0; | 2340 | codec->num_pcms = 0; |
| 2337 | codec->pcm_info = NULL; | 2341 | codec->pcm_info = NULL; |
| 2338 | codec->preset = NULL; | 2342 | codec->preset = NULL; |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 172370b3793b..2bf99fc1cbf2 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
| @@ -445,8 +445,10 @@ static int conexant_init(struct hda_codec *codec) | |||
| 445 | 445 | ||
| 446 | static void conexant_free(struct hda_codec *codec) | 446 | static void conexant_free(struct hda_codec *codec) |
| 447 | { | 447 | { |
| 448 | struct conexant_spec *spec = codec->spec; | ||
| 449 | snd_hda_gen_free(&spec->gen); | ||
| 448 | snd_hda_detach_beep_device(codec); | 450 | snd_hda_detach_beep_device(codec); |
| 449 | kfree(codec->spec); | 451 | kfree(spec); |
| 450 | } | 452 | } |
| 451 | 453 | ||
| 452 | static const struct snd_kcontrol_new cxt_capture_mixers[] = { | 454 | static const struct snd_kcontrol_new cxt_capture_mixers[] = { |
| @@ -4466,6 +4468,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = { | |||
| 4466 | SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410), | 4468 | SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410), |
| 4467 | SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410), | 4469 | SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410), |
| 4468 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), | 4470 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), |
| 4471 | SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), | ||
| 4469 | {} | 4472 | {} |
| 4470 | }; | 4473 | }; |
| 4471 | 4474 | ||
| @@ -4497,6 +4500,7 @@ static int patch_conexant_auto(struct hda_codec *codec) | |||
| 4497 | if (!spec) | 4500 | if (!spec) |
| 4498 | return -ENOMEM; | 4501 | return -ENOMEM; |
| 4499 | codec->spec = spec; | 4502 | codec->spec = spec; |
| 4503 | snd_hda_gen_init(&spec->gen); | ||
| 4500 | 4504 | ||
| 4501 | switch (codec->vendor_id) { | 4505 | switch (codec->vendor_id) { |
| 4502 | case 0x14f15045: | 4506 | case 0x14f15045: |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f8f4906e498d..5ccf10a4d593 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -2289,6 +2289,7 @@ static void alc_free(struct hda_codec *codec) | |||
| 2289 | alc_shutup(codec); | 2289 | alc_shutup(codec); |
| 2290 | alc_free_kctls(codec); | 2290 | alc_free_kctls(codec); |
| 2291 | alc_free_bind_ctls(codec); | 2291 | alc_free_bind_ctls(codec); |
| 2292 | snd_hda_gen_free(&spec->gen); | ||
| 2292 | kfree(spec); | 2293 | kfree(spec); |
| 2293 | snd_hda_detach_beep_device(codec); | 2294 | snd_hda_detach_beep_device(codec); |
| 2294 | } | 2295 | } |
| @@ -4253,6 +4254,7 @@ static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid) | |||
| 4253 | return -ENOMEM; | 4254 | return -ENOMEM; |
| 4254 | codec->spec = spec; | 4255 | codec->spec = spec; |
| 4255 | spec->mixer_nid = mixer_nid; | 4256 | spec->mixer_nid = mixer_nid; |
| 4257 | snd_hda_gen_init(&spec->gen); | ||
| 4256 | 4258 | ||
| 4257 | err = alc_codec_rename_from_preset(codec); | 4259 | err = alc_codec_rename_from_preset(codec); |
| 4258 | if (err < 0) { | 4260 | if (err < 0) { |
| @@ -6705,6 +6707,12 @@ static int patch_alc662(struct hda_codec *codec) | |||
| 6705 | 6707 | ||
| 6706 | alc_fix_pll_init(codec, 0x20, 0x04, 15); | 6708 | alc_fix_pll_init(codec, 0x20, 0x04, 15); |
| 6707 | 6709 | ||
| 6710 | alc_pick_fixup(codec, alc662_fixup_models, | ||
| 6711 | alc662_fixup_tbl, alc662_fixups); | ||
| 6712 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); | ||
| 6713 | |||
| 6714 | alc_auto_parse_customize_define(codec); | ||
| 6715 | |||
| 6708 | if ((alc_get_coef0(codec) & (1 << 14)) && | 6716 | if ((alc_get_coef0(codec) & (1 << 14)) && |
| 6709 | codec->bus->pci->subsystem_vendor == 0x1025 && | 6717 | codec->bus->pci->subsystem_vendor == 0x1025 && |
| 6710 | spec->cdefine.platform_type == 1) { | 6718 | spec->cdefine.platform_type == 1) { |
| @@ -6712,12 +6720,6 @@ static int patch_alc662(struct hda_codec *codec) | |||
| 6712 | goto error; | 6720 | goto error; |
| 6713 | } | 6721 | } |
| 6714 | 6722 | ||
| 6715 | alc_pick_fixup(codec, alc662_fixup_models, | ||
| 6716 | alc662_fixup_tbl, alc662_fixups); | ||
| 6717 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); | ||
| 6718 | |||
| 6719 | alc_auto_parse_customize_define(codec); | ||
| 6720 | |||
| 6721 | /* automatic parse from the BIOS config */ | 6723 | /* automatic parse from the BIOS config */ |
| 6722 | err = alc662_parse_auto_config(codec); | 6724 | err = alc662_parse_auto_config(codec); |
| 6723 | if (err < 0) | 6725 | if (err < 0) |
| @@ -6800,6 +6802,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
| 6800 | { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 }, | 6802 | { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 }, |
| 6801 | { .id = 0x10ec0275, .name = "ALC275", .patch = patch_alc269 }, | 6803 | { .id = 0x10ec0275, .name = "ALC275", .patch = patch_alc269 }, |
| 6802 | { .id = 0x10ec0276, .name = "ALC276", .patch = patch_alc269 }, | 6804 | { .id = 0x10ec0276, .name = "ALC276", .patch = patch_alc269 }, |
| 6805 | { .id = 0x10ec0280, .name = "ALC280", .patch = patch_alc269 }, | ||
| 6803 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", | 6806 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", |
| 6804 | .patch = patch_alc861 }, | 6807 | .patch = patch_alc861 }, |
| 6805 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, | 6808 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 7db8228f1b88..07675282015a 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
| @@ -4367,7 +4367,7 @@ static int stac92xx_init(struct hda_codec *codec) | |||
| 4367 | AC_PINCTL_IN_EN); | 4367 | AC_PINCTL_IN_EN); |
| 4368 | for (i = 0; i < spec->num_pwrs; i++) { | 4368 | for (i = 0; i < spec->num_pwrs; i++) { |
| 4369 | hda_nid_t nid = spec->pwr_nids[i]; | 4369 | hda_nid_t nid = spec->pwr_nids[i]; |
| 4370 | int pinctl, def_conf; | 4370 | unsigned int pinctl, def_conf; |
| 4371 | 4371 | ||
| 4372 | def_conf = snd_hda_codec_get_pincfg(codec, nid); | 4372 | def_conf = snd_hda_codec_get_pincfg(codec, nid); |
| 4373 | def_conf = get_defcfg_connect(def_conf); | 4373 | def_conf = get_defcfg_connect(def_conf); |
| @@ -4376,6 +4376,11 @@ static int stac92xx_init(struct hda_codec *codec) | |||
| 4376 | stac_toggle_power_map(codec, nid, 0); | 4376 | stac_toggle_power_map(codec, nid, 0); |
| 4377 | continue; | 4377 | continue; |
| 4378 | } | 4378 | } |
| 4379 | if (def_conf == AC_JACK_PORT_FIXED) { | ||
| 4380 | /* no need for jack detection for fixed pins */ | ||
| 4381 | stac_toggle_power_map(codec, nid, 1); | ||
| 4382 | continue; | ||
| 4383 | } | ||
| 4379 | /* power on when no jack detection is available */ | 4384 | /* power on when no jack detection is available */ |
| 4380 | /* or when the VREF is used for controlling LED */ | 4385 | /* or when the VREF is used for controlling LED */ |
| 4381 | if (!spec->hp_detect || | 4386 | if (!spec->hp_detect || |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index aa8c98b628da..1436b6ce74d1 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
| @@ -727,9 +727,6 @@ static void wm1811_jackdet_set_mode(struct snd_soc_codec *codec, u16 mode) | |||
| 727 | if (!wm8994->jackdet || !wm8994->jack_cb) | 727 | if (!wm8994->jackdet || !wm8994->jack_cb) |
| 728 | return; | 728 | return; |
| 729 | 729 | ||
| 730 | if (!wm8994->jackdet || !wm8994->jack_cb) | ||
| 731 | return; | ||
| 732 | |||
| 733 | if (wm8994->active_refcount) | 730 | if (wm8994->active_refcount) |
| 734 | mode = WM1811_JACKDET_MODE_AUDIO; | 731 | mode = WM1811_JACKDET_MODE_AUDIO; |
| 735 | 732 | ||
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c index 41daaa24c25f..e71fe55cebef 100644 --- a/sound/usb/mixer_maps.c +++ b/sound/usb/mixer_maps.c | |||
| @@ -341,6 +341,14 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { | |||
| 341 | .map = audigy2nx_map, | 341 | .map = audigy2nx_map, |
| 342 | .selector_map = audigy2nx_selectors, | 342 | .selector_map = audigy2nx_selectors, |
| 343 | }, | 343 | }, |
| 344 | { /* Logitech, Inc. QuickCam Pro for Notebooks */ | ||
| 345 | .id = USB_ID(0x046d, 0x0991), | ||
| 346 | .ignore_ctl_error = 1, | ||
| 347 | }, | ||
| 348 | { /* Logitech, Inc. QuickCam E 3500 */ | ||
| 349 | .id = USB_ID(0x046d, 0x09a4), | ||
| 350 | .ignore_ctl_error = 1, | ||
| 351 | }, | ||
| 344 | { | 352 | { |
| 345 | /* Hercules DJ Console (Windows Edition) */ | 353 | /* Hercules DJ Console (Windows Edition) */ |
| 346 | .id = USB_ID(0x06f8, 0xb000), | 354 | .id = USB_ID(0x06f8, 0xb000), |
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index d89ab4c7d44b..79780fa57a43 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h | |||
| @@ -1831,6 +1831,36 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
| 1831 | } | 1831 | } |
| 1832 | } | 1832 | } |
| 1833 | }, | 1833 | }, |
| 1834 | { | ||
| 1835 | USB_DEVICE(0x0582, 0x014d), | ||
| 1836 | .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { | ||
| 1837 | /* .vendor_name = "BOSS", */ | ||
| 1838 | /* .product_name = "GT-100", */ | ||
| 1839 | .ifnum = QUIRK_ANY_INTERFACE, | ||
| 1840 | .type = QUIRK_COMPOSITE, | ||
| 1841 | .data = (const struct snd_usb_audio_quirk[]) { | ||
| 1842 | { | ||
| 1843 | .ifnum = 1, | ||
| 1844 | .type = QUIRK_AUDIO_STANDARD_INTERFACE | ||
| 1845 | }, | ||
| 1846 | { | ||
| 1847 | .ifnum = 2, | ||
| 1848 | .type = QUIRK_AUDIO_STANDARD_INTERFACE | ||
| 1849 | }, | ||
| 1850 | { | ||
| 1851 | .ifnum = 3, | ||
| 1852 | .type = QUIRK_MIDI_FIXED_ENDPOINT, | ||
| 1853 | .data = & (const struct snd_usb_midi_endpoint_info) { | ||
| 1854 | .out_cables = 0x0001, | ||
| 1855 | .in_cables = 0x0001 | ||
| 1856 | } | ||
| 1857 | }, | ||
| 1858 | { | ||
| 1859 | .ifnum = -1 | ||
| 1860 | } | ||
| 1861 | } | ||
| 1862 | } | ||
| 1863 | }, | ||
| 1834 | 1864 | ||
| 1835 | /* Guillemot devices */ | 1865 | /* Guillemot devices */ |
| 1836 | { | 1866 | { |
