提交 f822dcc6 编写于 作者: L Linus Torvalds

Merge tag 'sound-fix-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are a bunch of small fixes, mostly for HD-audio quirks, in
  addition to a few regression fixes and trivial cleanups"

* tag 'sound-fix-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: Fix uninintialized error return
  ALSA: hda: Delete an unnecessary check before the function call "snd_info_free_entry"
  ALSA: hda - Add a fixup for Dell E7450
  ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780
  ALSA: hda - Add headset support to Acer Aspire V5
  ALSA: hda - restore the MIC FIXUP for some Dell machines
  ALSA: jack: Fix endless loop at unique index detection
  ALSA: hda - set proper caps for newer AMD hda audio in KB/KV
  ALSA: hda - Disable widget power-save for VIA codecs
  ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out
...@@ -41,8 +41,11 @@ static int get_available_index(struct snd_card *card, const char *name) ...@@ -41,8 +41,11 @@ static int get_available_index(struct snd_card *card, const char *name)
sid.iface = SNDRV_CTL_ELEM_IFACE_CARD; sid.iface = SNDRV_CTL_ELEM_IFACE_CARD;
strlcpy(sid.name, name, sizeof(sid.name)); strlcpy(sid.name, name, sizeof(sid.name));
while (snd_ctl_find_id(card, &sid)) while (snd_ctl_find_id(card, &sid)) {
sid.index++; sid.index++;
/* reset numid; otherwise snd_ctl_find_id() hits this again */
sid.numid = 0;
}
return sid.index; return sid.index;
} }
......
...@@ -109,13 +109,12 @@ static void snd_card_id_read(struct snd_info_entry *entry, ...@@ -109,13 +109,12 @@ static void snd_card_id_read(struct snd_info_entry *entry,
static int init_info_for_card(struct snd_card *card) static int init_info_for_card(struct snd_card *card)
{ {
int err;
struct snd_info_entry *entry; struct snd_info_entry *entry;
entry = snd_info_create_card_entry(card, "id", card->proc_root); entry = snd_info_create_card_entry(card, "id", card->proc_root);
if (!entry) { if (!entry) {
dev_dbg(card->dev, "unable to create card entry\n"); dev_dbg(card->dev, "unable to create card entry\n");
return err; return -ENOMEM;
} }
entry->c.text.read = snd_card_id_read; entry->c.text.read = snd_card_id_read;
card->proc_id = entry; card->proc_id = entry;
......
...@@ -2180,6 +2180,8 @@ static const struct pci_device_id azx_ids[] = { ...@@ -2180,6 +2180,8 @@ static const struct pci_device_id azx_ids[] = {
{ PCI_DEVICE(0x1022, 0x780d), { PCI_DEVICE(0x1022, 0x780d),
.driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB }, .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB },
/* ATI HDMI */ /* ATI HDMI */
{ PCI_DEVICE(0x1002, 0x1308),
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
{ PCI_DEVICE(0x1002, 0x793b), { PCI_DEVICE(0x1002, 0x793b),
.driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
{ PCI_DEVICE(0x1002, 0x7919), { PCI_DEVICE(0x1002, 0x7919),
...@@ -2188,6 +2190,8 @@ static const struct pci_device_id azx_ids[] = { ...@@ -2188,6 +2190,8 @@ static const struct pci_device_id azx_ids[] = {
.driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
{ PCI_DEVICE(0x1002, 0x970f), { PCI_DEVICE(0x1002, 0x970f),
.driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
{ PCI_DEVICE(0x1002, 0x9840),
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
{ PCI_DEVICE(0x1002, 0xaa00), { PCI_DEVICE(0x1002, 0xaa00),
.driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
{ PCI_DEVICE(0x1002, 0xaa08), { PCI_DEVICE(0x1002, 0xaa08),
......
...@@ -591,7 +591,7 @@ static int eld_proc_new(struct hdmi_spec_per_pin *per_pin, int index) ...@@ -591,7 +591,7 @@ static int eld_proc_new(struct hdmi_spec_per_pin *per_pin, int index)
static void eld_proc_free(struct hdmi_spec_per_pin *per_pin) static void eld_proc_free(struct hdmi_spec_per_pin *per_pin)
{ {
if (!per_pin->codec->bus->shutdown && per_pin->proc_entry) { if (!per_pin->codec->bus->shutdown) {
snd_info_free_entry(per_pin->proc_entry); snd_info_free_entry(per_pin->proc_entry);
per_pin->proc_entry = NULL; per_pin->proc_entry = NULL;
} }
......
...@@ -4464,6 +4464,7 @@ enum { ...@@ -4464,6 +4464,7 @@ enum {
ALC269_FIXUP_LIFEBOOK, ALC269_FIXUP_LIFEBOOK,
ALC269_FIXUP_LIFEBOOK_EXTMIC, ALC269_FIXUP_LIFEBOOK_EXTMIC,
ALC269_FIXUP_LIFEBOOK_HP_PIN, ALC269_FIXUP_LIFEBOOK_HP_PIN,
ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT,
ALC269_FIXUP_AMIC, ALC269_FIXUP_AMIC,
ALC269_FIXUP_DMIC, ALC269_FIXUP_DMIC,
ALC269VB_FIXUP_AMIC, ALC269VB_FIXUP_AMIC,
...@@ -4484,6 +4485,7 @@ enum { ...@@ -4484,6 +4485,7 @@ enum {
ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
ALC269_FIXUP_HEADSET_MODE, ALC269_FIXUP_HEADSET_MODE,
ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
ALC269_FIXUP_ASPIRE_HEADSET_MIC,
ALC269_FIXUP_ASUS_X101_FUNC, ALC269_FIXUP_ASUS_X101_FUNC,
ALC269_FIXUP_ASUS_X101_VERB, ALC269_FIXUP_ASUS_X101_VERB,
ALC269_FIXUP_ASUS_X101, ALC269_FIXUP_ASUS_X101,
...@@ -4511,6 +4513,7 @@ enum { ...@@ -4511,6 +4513,7 @@ enum {
ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC, ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
ALC292_FIXUP_TPT440_DOCK, ALC292_FIXUP_TPT440_DOCK,
ALC292_FIXUP_TPT440_DOCK2,
ALC283_FIXUP_BXBT2807_MIC, ALC283_FIXUP_BXBT2807_MIC,
ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED,
ALC282_FIXUP_ASPIRE_V5_PINS, ALC282_FIXUP_ASPIRE_V5_PINS,
...@@ -4521,6 +4524,8 @@ enum { ...@@ -4521,6 +4524,8 @@ enum {
ALC288_FIXUP_DELL_HEADSET_MODE, ALC288_FIXUP_DELL_HEADSET_MODE,
ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
ALC288_FIXUP_DELL_XPS_13_GPIO6, ALC288_FIXUP_DELL_XPS_13_GPIO6,
ALC288_FIXUP_DELL_XPS_13,
ALC288_FIXUP_DISABLE_AAMIX,
ALC292_FIXUP_DELL_E7X, ALC292_FIXUP_DELL_E7X,
ALC292_FIXUP_DISABLE_AAMIX, ALC292_FIXUP_DISABLE_AAMIX,
ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
...@@ -4630,6 +4635,10 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -4630,6 +4635,10 @@ static const struct hda_fixup alc269_fixups[] = {
{ } { }
}, },
}, },
[ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc269_fixup_pincfg_no_hp_to_lineout,
},
[ALC269_FIXUP_AMIC] = { [ALC269_FIXUP_AMIC] = {
.type = HDA_FIXUP_PINS, .type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) { .v.pins = (const struct hda_pintbl[]) {
...@@ -4758,6 +4767,15 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -4758,6 +4767,15 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC, .type = HDA_FIXUP_FUNC,
.v.func = alc_fixup_headset_mode_no_hp_mic, .v.func = alc_fixup_headset_mode_no_hp_mic,
}, },
[ALC269_FIXUP_ASPIRE_HEADSET_MIC] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
{ 0x19, 0x01a1913c }, /* headset mic w/o jack detect */
{ }
},
.chained = true,
.chain_id = ALC269_FIXUP_HEADSET_MODE,
},
[ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = { [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = {
.type = HDA_FIXUP_PINS, .type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) { .v.pins = (const struct hda_pintbl[]) {
...@@ -4960,6 +4978,12 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -4960,6 +4978,12 @@ static const struct hda_fixup alc269_fixups[] = {
.chain_id = ALC269_FIXUP_HEADSET_MODE .chain_id = ALC269_FIXUP_HEADSET_MODE
}, },
[ALC292_FIXUP_TPT440_DOCK] = { [ALC292_FIXUP_TPT440_DOCK] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc269_fixup_pincfg_no_hp_to_lineout,
.chained = true,
.chain_id = ALC292_FIXUP_TPT440_DOCK2
},
[ALC292_FIXUP_TPT440_DOCK2] = {
.type = HDA_FIXUP_PINS, .type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) { .v.pins = (const struct hda_pintbl[]) {
{ 0x16, 0x21211010 }, /* dock headphone */ { 0x16, 0x21211010 }, /* dock headphone */
...@@ -5046,9 +5070,23 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -5046,9 +5070,23 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true, .chained = true,
.chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE .chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE
}, },
[ALC288_FIXUP_DISABLE_AAMIX] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc_fixup_disable_aamix,
.chained = true,
.chain_id = ALC288_FIXUP_DELL_XPS_13_GPIO6
},
[ALC288_FIXUP_DELL_XPS_13] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc_fixup_dell_xps13,
.chained = true,
.chain_id = ALC288_FIXUP_DISABLE_AAMIX
},
[ALC292_FIXUP_DISABLE_AAMIX] = { [ALC292_FIXUP_DISABLE_AAMIX] = {
.type = HDA_FIXUP_FUNC, .type = HDA_FIXUP_FUNC,
.v.func = alc_fixup_disable_aamix, .v.func = alc_fixup_disable_aamix,
.chained = true,
.chain_id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE
}, },
[ALC292_FIXUP_DELL_E7X] = { [ALC292_FIXUP_DELL_E7X] = {
.type = HDA_FIXUP_FUNC, .type = HDA_FIXUP_FUNC,
...@@ -5073,6 +5111,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -5073,6 +5111,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC), SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700), SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700),
SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
...@@ -5086,10 +5126,11 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -5086,10 +5126,11 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
SND_PCI_QUIRK(0x1028, 0x062e, "Dell Latitude E7450", ALC292_FIXUP_DELL_E7X),
SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK), SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK),
SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC292_FIXUP_DELL_E7X), SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13),
SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
...@@ -5173,6 +5214,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -5173,6 +5214,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX), SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX),
SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK), SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN), SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
......
...@@ -241,7 +241,9 @@ static int via_pin_power_ctl_get(struct snd_kcontrol *kcontrol, ...@@ -241,7 +241,9 @@ static int via_pin_power_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
ucontrol->value.enumerated.item[0] = codec->power_save_node; struct via_spec *spec = codec->spec;
ucontrol->value.enumerated.item[0] = spec->gen.power_down_unused;
return 0; return 0;
} }
...@@ -252,9 +254,9 @@ static int via_pin_power_ctl_put(struct snd_kcontrol *kcontrol, ...@@ -252,9 +254,9 @@ static int via_pin_power_ctl_put(struct snd_kcontrol *kcontrol,
struct via_spec *spec = codec->spec; struct via_spec *spec = codec->spec;
bool val = !!ucontrol->value.enumerated.item[0]; bool val = !!ucontrol->value.enumerated.item[0];
if (val == codec->power_save_node) if (val == spec->gen.power_down_unused)
return 0; return 0;
codec->power_save_node = val; /* codec->power_save_node = val; */ /* widget PM seems yet broken */
spec->gen.power_down_unused = val; spec->gen.power_down_unused = val;
analog_low_current_mode(codec); analog_low_current_mode(codec);
return 1; return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册