]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - sound/pci/hda/patch_realtek.c
ALSA: hda - Add standard channel maps
[karo-tx-linux.git] / sound / pci / hda / patch_realtek.c
index b9a5c45033367429a532e55ae14e6888bd53eb62..1907ddad38406b2c8054a499511efce0f3191703 100644 (file)
@@ -174,7 +174,7 @@ struct alc_spec {
 
        /* hooks */
        void (*init_hook)(struct hda_codec *codec);
-#ifdef CONFIG_SND_HDA_POWER_SAVE
+#ifdef CONFIG_PM
        void (*power_hook)(struct hda_codec *codec);
 #endif
        void (*shutup)(struct hda_codec *codec);
@@ -215,7 +215,7 @@ struct alc_spec {
        /* for virtual master */
        hda_nid_t vmaster_nid;
        struct hda_vmaster_mute_hook vmaster_mute;
-#ifdef CONFIG_SND_HDA_POWER_SAVE
+#ifdef CONFIG_PM
        struct hda_loopback_check loopback;
        int num_loopbacks;
        struct hda_amp_list loopback_list[8];
@@ -2053,13 +2053,11 @@ static int alc_init(struct hda_codec *codec)
 
        alc_apply_fixup(codec, ALC_FIXUP_ACT_INIT);
 
-       snd_hda_jack_report_sync(codec);
-
        hda_call_check_power_status(codec, 0x01);
        return 0;
 }
 
-#ifdef CONFIG_SND_HDA_POWER_SAVE
+#ifdef CONFIG_PM
 static int alc_check_power_status(struct hda_codec *codec, hda_nid_t nid)
 {
        struct alc_spec *spec = codec->spec;
@@ -2289,6 +2287,8 @@ static int alc_build_pcms(struct hda_codec *codec)
                        p = &alc_pcm_analog_playback;
                info->stream[SNDRV_PCM_STREAM_PLAYBACK] = *p;
                info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->multiout.dac_nids[0];
+               info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max =
+                       spec->multiout.max_channels;
        }
        if (spec->adc_nids) {
                p = spec->stream_analog_capture;
@@ -2437,7 +2437,7 @@ static void alc_free(struct hda_codec *codec)
        snd_hda_detach_beep_device(codec);
 }
 
-#ifdef CONFIG_SND_HDA_POWER_SAVE
+#ifdef CONFIG_PM
 static void alc_power_eapd(struct hda_codec *codec)
 {
        alc_auto_setup_eapd(codec, false);
@@ -2477,7 +2477,7 @@ static const struct hda_codec_ops alc_patch_ops = {
 #ifdef CONFIG_PM
        .resume = alc_resume,
 #endif
-#ifdef CONFIG_SND_HDA_POWER_SAVE
+#ifdef CONFIG_PM
        .suspend = alc_suspend,
        .check_power_status = alc_check_power_status,
 #endif
@@ -2633,7 +2633,7 @@ static const char *alc_get_line_out_pfx(struct alc_spec *spec, int ch,
        return channel_name[ch];
 }
 
-#ifdef CONFIG_SND_HDA_POWER_SAVE
+#ifdef CONFIG_PM
 /* add the powersave loopback-list entry */
 static void add_loopback_list(struct alc_spec *spec, hda_nid_t mix, int idx)
 {
@@ -6099,6 +6099,8 @@ static const struct alc_fixup alc269_fixups[] = {
        [ALC269_FIXUP_PCM_44K] = {
                .type = ALC_FIXUP_FUNC,
                .v.func = alc269_fixup_pcm_44k,
+               .chained = true,
+               .chain_id = ALC269_FIXUP_QUANTA_MUTE
        },
        [ALC269_FIXUP_STEREO_DMIC] = {
                .type = ALC_FIXUP_FUNC,
@@ -6207,9 +6209,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
        SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE),
        SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
        SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK),
+       SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
+       SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
        SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
-       SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_QUANTA_MUTE),
-       SND_PCI_QUIRK(0x17aa, 0x3bf8, "Lenovo Ideapd", ALC269_FIXUP_PCM_44K),
+       SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
        SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
 
 #if 0
@@ -6500,7 +6503,7 @@ static int patch_alc861(struct hda_codec *codec)
        }
 
        codec->patch_ops = alc_patch_ops;
-#ifdef CONFIG_SND_HDA_POWER_SAVE
+#ifdef CONFIG_PM
        spec->power_hook = alc_power_eapd;
 #endif