Merge branch 'fix/hda' into topic/hda
This commit is contained in:
commit
b54f8abad6
|
@ -97,19 +97,6 @@ config SND_HDA_CODEC_REALTEK
|
||||||
snd-hda-codec-realtek.
|
snd-hda-codec-realtek.
|
||||||
This module is automatically loaded at probing.
|
This module is automatically loaded at probing.
|
||||||
|
|
||||||
config SND_HDA_ENABLE_REALTEK_QUIRKS
|
|
||||||
bool "Build static quirks for Realtek codecs"
|
|
||||||
depends on SND_HDA_CODEC_REALTEK
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Say Y here to build the static quirks codes for Realtek codecs.
|
|
||||||
If you need the "model" preset that the default BIOS auto-parser
|
|
||||||
can't handle, turn this option on.
|
|
||||||
|
|
||||||
If your device works with model=auto option, basically you don't
|
|
||||||
need the quirk code. By turning this off, you can reduce the
|
|
||||||
module size quite a lot.
|
|
||||||
|
|
||||||
config SND_HDA_CODEC_ANALOG
|
config SND_HDA_CODEC_ANALOG
|
||||||
bool "Build Analog Device HD-audio codec support"
|
bool "Build Analog Device HD-audio codec support"
|
||||||
default y
|
default y
|
||||||
|
|
|
@ -618,7 +618,6 @@ int snd_hda_gen_add_verbs(struct hda_gen_spec *spec,
|
||||||
const struct hda_verb *list)
|
const struct hda_verb *list)
|
||||||
{
|
{
|
||||||
const struct hda_verb **v;
|
const struct hda_verb **v;
|
||||||
snd_array_init(&spec->verbs, sizeof(struct hda_verb *), 8);
|
|
||||||
v = snd_array_new(&spec->verbs);
|
v = snd_array_new(&spec->verbs);
|
||||||
if (!v)
|
if (!v)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -157,4 +157,14 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
|
||||||
const struct snd_pci_quirk *quirk,
|
const struct snd_pci_quirk *quirk,
|
||||||
const struct hda_fixup *fixlist);
|
const struct hda_fixup *fixlist);
|
||||||
|
|
||||||
|
static inline void snd_hda_gen_init(struct hda_gen_spec *spec)
|
||||||
|
{
|
||||||
|
snd_array_init(&spec->verbs, sizeof(struct hda_verb *), 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void snd_hda_gen_free(struct hda_gen_spec *spec)
|
||||||
|
{
|
||||||
|
snd_array_free(&spec->verbs);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* __SOUND_HDA_AUTO_PARSER_H */
|
#endif /* __SOUND_HDA_AUTO_PARSER_H */
|
||||||
|
|
|
@ -1184,6 +1184,7 @@ static void snd_hda_codec_free(struct hda_codec *codec)
|
||||||
{
|
{
|
||||||
if (!codec)
|
if (!codec)
|
||||||
return;
|
return;
|
||||||
|
snd_hda_jack_tbl_clear(codec);
|
||||||
restore_init_pincfgs(codec);
|
restore_init_pincfgs(codec);
|
||||||
#ifdef CONFIG_SND_HDA_POWER_SAVE
|
#ifdef CONFIG_SND_HDA_POWER_SAVE
|
||||||
cancel_delayed_work(&codec->power_work);
|
cancel_delayed_work(&codec->power_work);
|
||||||
|
@ -1192,6 +1193,7 @@ static void snd_hda_codec_free(struct hda_codec *codec)
|
||||||
list_del(&codec->list);
|
list_del(&codec->list);
|
||||||
snd_array_free(&codec->mixers);
|
snd_array_free(&codec->mixers);
|
||||||
snd_array_free(&codec->nids);
|
snd_array_free(&codec->nids);
|
||||||
|
snd_array_free(&codec->cvt_setups);
|
||||||
snd_array_free(&codec->conn_lists);
|
snd_array_free(&codec->conn_lists);
|
||||||
snd_array_free(&codec->spdif_out);
|
snd_array_free(&codec->spdif_out);
|
||||||
codec->bus->caddr_tbl[codec->addr] = NULL;
|
codec->bus->caddr_tbl[codec->addr] = NULL;
|
||||||
|
@ -2333,6 +2335,8 @@ int snd_hda_codec_reset(struct hda_codec *codec)
|
||||||
/* free only driver_pins so that init_pins + user_pins are restored */
|
/* free only driver_pins so that init_pins + user_pins are restored */
|
||||||
snd_array_free(&codec->driver_pins);
|
snd_array_free(&codec->driver_pins);
|
||||||
restore_pincfgs(codec);
|
restore_pincfgs(codec);
|
||||||
|
snd_array_free(&codec->cvt_setups);
|
||||||
|
snd_array_free(&codec->spdif_out);
|
||||||
codec->num_pcms = 0;
|
codec->num_pcms = 0;
|
||||||
codec->pcm_info = NULL;
|
codec->pcm_info = NULL;
|
||||||
codec->preset = NULL;
|
codec->preset = NULL;
|
||||||
|
|
|
@ -445,8 +445,10 @@ static int conexant_init(struct hda_codec *codec)
|
||||||
|
|
||||||
static void conexant_free(struct hda_codec *codec)
|
static void conexant_free(struct hda_codec *codec)
|
||||||
{
|
{
|
||||||
|
struct conexant_spec *spec = codec->spec;
|
||||||
|
snd_hda_gen_free(&spec->gen);
|
||||||
snd_hda_detach_beep_device(codec);
|
snd_hda_detach_beep_device(codec);
|
||||||
kfree(codec->spec);
|
kfree(spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct snd_kcontrol_new cxt_capture_mixers[] = {
|
static const struct snd_kcontrol_new cxt_capture_mixers[] = {
|
||||||
|
@ -4466,6 +4468,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
|
||||||
SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410),
|
SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410),
|
SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC),
|
SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC),
|
||||||
|
SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC),
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4497,6 +4500,7 @@ static int patch_conexant_auto(struct hda_codec *codec)
|
||||||
if (!spec)
|
if (!spec)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
codec->spec = spec;
|
codec->spec = spec;
|
||||||
|
snd_hda_gen_init(&spec->gen);
|
||||||
|
|
||||||
switch (codec->vendor_id) {
|
switch (codec->vendor_id) {
|
||||||
case 0x14f15045:
|
case 0x14f15045:
|
||||||
|
|
|
@ -2406,6 +2406,7 @@ static void alc_free(struct hda_codec *codec)
|
||||||
alc_shutup(codec);
|
alc_shutup(codec);
|
||||||
alc_free_kctls(codec);
|
alc_free_kctls(codec);
|
||||||
alc_free_bind_ctls(codec);
|
alc_free_bind_ctls(codec);
|
||||||
|
snd_hda_gen_free(&spec->gen);
|
||||||
kfree(spec);
|
kfree(spec);
|
||||||
snd_hda_detach_beep_device(codec);
|
snd_hda_detach_beep_device(codec);
|
||||||
}
|
}
|
||||||
|
@ -4371,6 +4372,7 @@ static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
codec->spec = spec;
|
codec->spec = spec;
|
||||||
spec->mixer_nid = mixer_nid;
|
spec->mixer_nid = mixer_nid;
|
||||||
|
snd_hda_gen_init(&spec->gen);
|
||||||
|
|
||||||
err = alc_codec_rename_from_preset(codec);
|
err = alc_codec_rename_from_preset(codec);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
|
@ -6868,6 +6870,12 @@ static int patch_alc662(struct hda_codec *codec)
|
||||||
|
|
||||||
alc_fix_pll_init(codec, 0x20, 0x04, 15);
|
alc_fix_pll_init(codec, 0x20, 0x04, 15);
|
||||||
|
|
||||||
|
alc_pick_fixup(codec, alc662_fixup_models,
|
||||||
|
alc662_fixup_tbl, alc662_fixups);
|
||||||
|
alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
|
||||||
|
|
||||||
|
alc_auto_parse_customize_define(codec);
|
||||||
|
|
||||||
if ((alc_get_coef0(codec) & (1 << 14)) &&
|
if ((alc_get_coef0(codec) & (1 << 14)) &&
|
||||||
codec->bus->pci->subsystem_vendor == 0x1025 &&
|
codec->bus->pci->subsystem_vendor == 0x1025 &&
|
||||||
spec->cdefine.platform_type == 1) {
|
spec->cdefine.platform_type == 1) {
|
||||||
|
@ -6875,12 +6883,6 @@ static int patch_alc662(struct hda_codec *codec)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
alc_pick_fixup(codec, alc662_fixup_models,
|
|
||||||
alc662_fixup_tbl, alc662_fixups);
|
|
||||||
alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
|
|
||||||
|
|
||||||
alc_auto_parse_customize_define(codec);
|
|
||||||
|
|
||||||
/* automatic parse from the BIOS config */
|
/* automatic parse from the BIOS config */
|
||||||
err = alc662_parse_auto_config(codec);
|
err = alc662_parse_auto_config(codec);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
|
@ -6963,6 +6965,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = {
|
||||||
{ .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 },
|
{ .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 },
|
||||||
{ .id = 0x10ec0275, .name = "ALC275", .patch = patch_alc269 },
|
{ .id = 0x10ec0275, .name = "ALC275", .patch = patch_alc269 },
|
||||||
{ .id = 0x10ec0276, .name = "ALC276", .patch = patch_alc269 },
|
{ .id = 0x10ec0276, .name = "ALC276", .patch = patch_alc269 },
|
||||||
|
{ .id = 0x10ec0280, .name = "ALC280", .patch = patch_alc269 },
|
||||||
{ .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
|
{ .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
|
||||||
.patch = patch_alc861 },
|
.patch = patch_alc861 },
|
||||||
{ .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd },
|
{ .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd },
|
||||||
|
|
|
@ -4367,7 +4367,7 @@ static int stac92xx_init(struct hda_codec *codec)
|
||||||
AC_PINCTL_IN_EN);
|
AC_PINCTL_IN_EN);
|
||||||
for (i = 0; i < spec->num_pwrs; i++) {
|
for (i = 0; i < spec->num_pwrs; i++) {
|
||||||
hda_nid_t nid = spec->pwr_nids[i];
|
hda_nid_t nid = spec->pwr_nids[i];
|
||||||
int pinctl, def_conf;
|
unsigned int pinctl, def_conf;
|
||||||
|
|
||||||
def_conf = snd_hda_codec_get_pincfg(codec, nid);
|
def_conf = snd_hda_codec_get_pincfg(codec, nid);
|
||||||
def_conf = get_defcfg_connect(def_conf);
|
def_conf = get_defcfg_connect(def_conf);
|
||||||
|
@ -4376,6 +4376,11 @@ static int stac92xx_init(struct hda_codec *codec)
|
||||||
stac_toggle_power_map(codec, nid, 0);
|
stac_toggle_power_map(codec, nid, 0);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (def_conf == AC_JACK_PORT_FIXED) {
|
||||||
|
/* no need for jack detection for fixed pins */
|
||||||
|
stac_toggle_power_map(codec, nid, 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
/* power on when no jack detection is available */
|
/* power on when no jack detection is available */
|
||||||
/* or when the VREF is used for controlling LED */
|
/* or when the VREF is used for controlling LED */
|
||||||
if (!spec->hp_detect ||
|
if (!spec->hp_detect ||
|
||||||
|
|
|
@ -724,9 +724,6 @@ static void wm1811_jackdet_set_mode(struct snd_soc_codec *codec, u16 mode)
|
||||||
{
|
{
|
||||||
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
|
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
|
||||||
|
|
||||||
if (!wm8994->jackdet || !wm8994->jack_cb)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!wm8994->jackdet || !wm8994->jack_cb)
|
if (!wm8994->jackdet || !wm8994->jack_cb)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,7 @@ static int usb6fire_fw_ezusb_upload(
|
||||||
int ret;
|
int ret;
|
||||||
u8 data;
|
u8 data;
|
||||||
struct usb_device *device = interface_to_usbdev(intf);
|
struct usb_device *device = interface_to_usbdev(intf);
|
||||||
const struct firmware *fw = 0;
|
const struct firmware *fw = NULL;
|
||||||
struct ihex_record *rec = kmalloc(sizeof(struct ihex_record),
|
struct ihex_record *rec = kmalloc(sizeof(struct ihex_record),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
|
||||||
|
|
|
@ -341,6 +341,14 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
|
||||||
.map = audigy2nx_map,
|
.map = audigy2nx_map,
|
||||||
.selector_map = audigy2nx_selectors,
|
.selector_map = audigy2nx_selectors,
|
||||||
},
|
},
|
||||||
|
{ /* Logitech, Inc. QuickCam Pro for Notebooks */
|
||||||
|
.id = USB_ID(0x046d, 0x0991),
|
||||||
|
.ignore_ctl_error = 1,
|
||||||
|
},
|
||||||
|
{ /* Logitech, Inc. QuickCam E 3500 */
|
||||||
|
.id = USB_ID(0x046d, 0x09a4),
|
||||||
|
.ignore_ctl_error = 1,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
/* Hercules DJ Console (Windows Edition) */
|
/* Hercules DJ Console (Windows Edition) */
|
||||||
.id = USB_ID(0x06f8, 0xb000),
|
.id = USB_ID(0x06f8, 0xb000),
|
||||||
|
|
|
@ -1831,6 +1831,36 @@ YAMAHA_DEVICE(0x7010, "UB99"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
USB_DEVICE(0x0582, 0x014d),
|
||||||
|
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
||||||
|
/* .vendor_name = "BOSS", */
|
||||||
|
/* .product_name = "GT-100", */
|
||||||
|
.ifnum = QUIRK_ANY_INTERFACE,
|
||||||
|
.type = QUIRK_COMPOSITE,
|
||||||
|
.data = (const struct snd_usb_audio_quirk[]) {
|
||||||
|
{
|
||||||
|
.ifnum = 1,
|
||||||
|
.type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ifnum = 2,
|
||||||
|
.type = QUIRK_AUDIO_STANDARD_INTERFACE
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ifnum = 3,
|
||||||
|
.type = QUIRK_MIDI_FIXED_ENDPOINT,
|
||||||
|
.data = & (const struct snd_usb_midi_endpoint_info) {
|
||||||
|
.out_cables = 0x0001,
|
||||||
|
.in_cables = 0x0001
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ifnum = -1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/* Guillemot devices */
|
/* Guillemot devices */
|
||||||
{
|
{
|
||||||
|
|
Reference in New Issue