]> Git Repo - linux.git/commitdiff
Merge branch 'for-linus' into for-next
authorTakashi Iwai <[email protected]>
Sat, 11 Jan 2020 08:03:32 +0000 (09:03 +0100)
committerTakashi Iwai <[email protected]>
Sat, 11 Jan 2020 08:03:40 +0000 (09:03 +0100)
Sync 5.5-devel branch once again for applying the HD-audio fixes.

Signed-off-by: Takashi Iwai <[email protected]>
1  2 
sound/hda/hdac_regmap.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_realtek.c

diff --combined sound/hda/hdac_regmap.c
index d771d2cfdef75107756c1e4220f2c16d72a17c33,286361ecd6404dd5714ea1175a941ce732f890fc..0c8188a48a00fd2a1a2b69a6c22a43e04cc4f2ac
@@@ -363,7 -363,6 +363,6 @@@ static const struct regmap_config hda_r
        .reg_write = hda_reg_write,
        .use_single_read = true,
        .use_single_write = true,
-       .disable_locking = true,
  };
  
  /**
@@@ -509,7 -508,7 +508,7 @@@ int snd_hdac_regmap_read_raw_uncached(s
   * snd_hdac_regmap_update_raw - update a pseudo register with power mgmt
   * @codec: the codec object
   * @reg: pseudo register
 - * @mask: bit mask to udpate
 + * @mask: bit mask to update
   * @val: value to update
   *
   * Returns zero if successful or a negative error code.
index 617143a44a1073f4bdc8743513cba521f469cf2c,8ef223aa1e37ef245ca41c34b7dbe363ecca9a2c..d70052e4a2e135f6453805dc6cefcef086668688
@@@ -125,7 -125,7 +125,7 @@@ static char *patch[SNDRV_CARDS]
  static bool beep_mode[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] =
                                        CONFIG_SND_HDA_INPUT_BEEP_MODE};
  #endif
- static bool dsp_driver = 1;
+ static bool dmic_detect = 1;
  
  module_param_array(index, int, NULL, 0444);
  MODULE_PARM_DESC(index, "Index value for Intel HD audio interface.");
@@@ -160,9 -160,10 +160,10 @@@ module_param_array(beep_mode, bool, NUL
  MODULE_PARM_DESC(beep_mode, "Select HDA Beep registration mode "
                            "(0=off, 1=on) (default=1).");
  #endif
- module_param(dsp_driver, bool, 0444);
- MODULE_PARM_DESC(dsp_driver, "Allow DSP driver selection (bypass this driver) "
-                            "(0=off, 1=on) (default=1)");
+ module_param(dmic_detect, bool, 0444);
+ MODULE_PARM_DESC(dmic_detect, "Allow DSP driver selection (bypass this driver) "
+                            "(0=off, 1=on) (default=1); "
+                "deprecated, use snd-intel-dspcfg.dsp_driver option instead");
  
  #ifdef CONFIG_PM
  static int param_set_xint(const char *val, const struct kernel_param *kp);
@@@ -372,7 -373,7 +373,7 @@@ enum 
  
  #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
  
 -static char *driver_short_names[] = {
 +static const char * const driver_short_names[] = {
        [AZX_DRIVER_ICH] = "HDA Intel",
        [AZX_DRIVER_PCH] = "HDA Intel PCH",
        [AZX_DRIVER_SCH] = "HDA Intel MID",
@@@ -499,7 -500,7 +500,7 @@@ static void bxt_reduce_dma_latency(stru
  static int intel_get_lctl_scf(struct azx *chip)
  {
        struct hdac_bus *bus = azx_bus(chip);
 -      static int preferred_bits[] = { 2, 3, 1, 4, 5 };
 +      static const int preferred_bits[] = { 2, 3, 1, 4, 5 };
        u32 val, t;
        int i;
  
@@@ -791,7 -792,6 +792,7 @@@ static int azx_acquire_irq(struct azx *
                return -1;
        }
        bus->irq = chip->pci->irq;
 +      chip->card->sync_irq = bus->irq;
        pci_intx(chip->pci, !chip->msi);
        return 0;
  }
@@@ -1030,7 -1030,6 +1031,7 @@@ static int azx_suspend(struct device *d
        if (bus->irq >= 0) {
                free_irq(bus->irq, chip);
                bus->irq = -1;
 +              chip->card->sync_irq = -1;
        }
  
        if (chip->msi)
@@@ -1501,7 -1500,7 +1502,7 @@@ static bool check_hdmi_disabled(struct 
  /*
   * white/black-listing for position_fix
   */
 -static struct snd_pci_quirk position_fix_list[] = {
 +static const struct snd_pci_quirk position_fix_list[] = {
        SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB),
        SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB),
        SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
@@@ -1564,7 -1563,7 +1565,7 @@@ static int check_position_fix(struct az
  
  static void assign_position_fix(struct azx *chip, int fix)
  {
 -      static azx_get_pos_callback_t callbacks[] = {
 +      static const azx_get_pos_callback_t callbacks[] = {
                [POS_FIX_AUTO] = NULL,
                [POS_FIX_LPIB] = azx_get_pos_lpib,
                [POS_FIX_POSBUF] = azx_get_pos_posbuf,
  /*
   * black-lists for probe_mask
   */
 -static struct snd_pci_quirk probe_mask_list[] = {
 +static const struct snd_pci_quirk probe_mask_list[] = {
        /* Thinkpad often breaks the controller communication when accessing
         * to the non-working (or non-existing) modem codec slot.
         */
@@@ -1642,7 -1641,7 +1643,7 @@@ static void check_probe_mask(struct az
  /*
   * white/black-list for enable_msi
   */
 -static struct snd_pci_quirk msi_black_list[] = {
 +static const struct snd_pci_quirk msi_black_list[] = {
        SND_PCI_QUIRK(0x103c, 0x2191, "HP", 0), /* AMD Hudson */
        SND_PCI_QUIRK(0x103c, 0x2192, "HP", 0), /* AMD Hudson */
        SND_PCI_QUIRK(0x103c, 0x21f7, "HP", 0), /* AMD Hudson */
@@@ -1754,7 -1753,7 +1755,7 @@@ static int azx_create(struct snd_card *
                      int dev, unsigned int driver_caps,
                      struct azx **rchip)
  {
 -      static struct snd_device_ops ops = {
 +      static const struct snd_device_ops ops = {
                .dev_disconnect = azx_dev_disconnect,
                .dev_free = azx_dev_free,
        };
  
        if (chip->driver_type == AZX_DRIVER_NVIDIA) {
                dev_dbg(chip->card->dev, "Enable delay in RIRB handling\n");
 -              chip->bus.needs_damn_long_delay = 1;
 +              chip->bus.core.needs_damn_long_delay = 1;
        }
  
        err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
@@@ -1896,6 -1895,7 +1897,6 @@@ static int azx_first_init(struct azx *c
        }
  
        pci_set_master(pci);
 -      synchronize_irq(bus->irq);
  
        gcap = azx_readw(chip, GCAP);
        dev_dbg(card->dev, "chipset global capabilities = 0x%x\n", gcap);
@@@ -2054,7 -2054,6 +2055,7 @@@ static int disable_msi_reset_irq(struc
  
        free_irq(bus->irq, chip);
        bus->irq = -1;
 +      chip->card->sync_irq = -1;
        pci_disable_msi(chip->pci);
        chip->msi = 0;
        err = azx_acquire_irq(chip, 1);
@@@ -2101,11 -2100,13 +2102,13 @@@ static int azx_probe(struct pci_dev *pc
        /*
         * stop probe if another Intel's DSP driver should be activated
         */
-       if (dsp_driver) {
+       if (dmic_detect) {
                err = snd_intel_dsp_driver_probe(pci);
                if (err != SND_INTEL_DSP_DRIVER_ANY &&
                    err != SND_INTEL_DSP_DRIVER_LEGACY)
                        return -ENODEV;
+       } else {
+               dev_warn(&pci->dev, "dmic_detect option is deprecated, pass snd-intel-dspcfg.dsp_driver=1 option instead\n");
        }
  
        err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
@@@ -2175,7 -2176,7 +2178,7 @@@ out_free
   * So we keep a list of devices where we disable powersaving as its known
   * to causes problems on these devices.
   */
 -static struct snd_pci_quirk power_save_blacklist[] = {
 +static const struct snd_pci_quirk power_save_blacklist[] = {
        /* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
        SND_PCI_QUIRK(0x1849, 0xc892, "Asrock B85M-ITX", 0),
        /* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
@@@ -2231,7 -2232,7 +2234,7 @@@ static void set_default_power_save(stru
  }
  
  /* number of codec slots for each chipset: 0 = default slots (i.e. 4) */
 -static unsigned int azx_max_codecs[AZX_NUM_DRIVERS] = {
 +static const unsigned int azx_max_codecs[AZX_NUM_DRIVERS] = {
        [AZX_DRIVER_NVIDIA] = 8,
        [AZX_DRIVER_TERA] = 1,
  };
index 73407b25a7774d75d31542b08c845660be3b9819,f2ea3528bfb1d3eb91227aa8cb8b2cc393b50c81..181e15072692bd2709405b224098f69a66f9fbfb
@@@ -412,6 -412,7 +412,7 @@@ static void alc_fill_eapd_coef(struct h
        case 0x10ec0672:
                alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */
                break;
+       case 0x10ec0222:
        case 0x10ec0623:
                alc_update_coef_idx(codec, 0x19, 1<<13, 0);
                break;
@@@ -465,10 -466,10 +466,10 @@@ static void set_eapd(struct hda_codec *
  static void alc_auto_setup_eapd(struct hda_codec *codec, bool on)
  {
        /* We currently only handle front, HP */
 -      static hda_nid_t pins[] = {
 +      static const hda_nid_t pins[] = {
                0x0f, 0x10, 0x14, 0x15, 0x17, 0
        };
 -      hda_nid_t *p;
 +      const hda_nid_t *p;
        for (p = pins; *p; p++)
                set_eapd(codec, *p, on);
  }
@@@ -948,7 -949,7 +949,7 @@@ struct alc_codec_rename_pci_table 
        const char *name;
  };
  
 -static struct alc_codec_rename_table rename_tbl[] = {
 +static const struct alc_codec_rename_table rename_tbl[] = {
        { 0x10ec0221, 0xf00f, 0x1003, "ALC231" },
        { 0x10ec0269, 0xfff0, 0x3010, "ALC277" },
        { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" },
        { } /* terminator */
  };
  
 -static struct alc_codec_rename_pci_table rename_pci_tbl[] = {
 +static const struct alc_codec_rename_pci_table rename_pci_tbl[] = {
        { 0x10ec0280, 0x1028, 0, "ALC3220" },
        { 0x10ec0282, 0x1028, 0, "ALC3221" },
        { 0x10ec0283, 0x1028, 0, "ALC3223" },
@@@ -1937,19 -1938,19 +1938,19 @@@ static void alc889_fixup_dac_route(stru
  {
        if (action == HDA_FIXUP_ACT_PRE_PROBE) {
                /* fake the connections during parsing the tree */
 -              hda_nid_t conn1[2] = { 0x0c, 0x0d };
 -              hda_nid_t conn2[2] = { 0x0e, 0x0f };
 -              snd_hda_override_conn_list(codec, 0x14, 2, conn1);
 -              snd_hda_override_conn_list(codec, 0x15, 2, conn1);
 -              snd_hda_override_conn_list(codec, 0x18, 2, conn2);
 -              snd_hda_override_conn_list(codec, 0x1a, 2, conn2);
 +              static const hda_nid_t conn1[] = { 0x0c, 0x0d };
 +              static const hda_nid_t conn2[] = { 0x0e, 0x0f };
 +              snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
 +              snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1);
 +              snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn2), conn2);
 +              snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn2), conn2);
        } else if (action == HDA_FIXUP_ACT_PROBE) {
                /* restore the connections */
 -              hda_nid_t conn[5] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
 -              snd_hda_override_conn_list(codec, 0x14, 5, conn);
 -              snd_hda_override_conn_list(codec, 0x15, 5, conn);
 -              snd_hda_override_conn_list(codec, 0x18, 5, conn);
 -              snd_hda_override_conn_list(codec, 0x1a, 5, conn);
 +              static const hda_nid_t conn[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
 +              snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
 +              snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn);
 +              snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn), conn);
 +              snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn), conn);
        }
  }
  
  static void alc889_fixup_mbp_vref(struct hda_codec *codec,
                                  const struct hda_fixup *fix, int action)
  {
 +      static const hda_nid_t nids[] = { 0x14, 0x15, 0x19 };
        struct alc_spec *spec = codec->spec;
 -      static hda_nid_t nids[3] = { 0x14, 0x15, 0x19 };
        int i;
  
        if (action != HDA_FIXUP_ACT_INIT)
@@@ -1994,7 -1995,7 +1995,7 @@@ static void alc889_fixup_mac_pins(struc
  static void alc889_fixup_imac91_vref(struct hda_codec *codec,
                                     const struct hda_fixup *fix, int action)
  {
 -      static hda_nid_t nids[2] = { 0x18, 0x1a };
 +      static const hda_nid_t nids[] = { 0x18, 0x1a };
  
        if (action == HDA_FIXUP_ACT_INIT)
                alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
  static void alc889_fixup_mba11_vref(struct hda_codec *codec,
                                    const struct hda_fixup *fix, int action)
  {
 -      static hda_nid_t nids[1] = { 0x18 };
 +      static const hda_nid_t nids[] = { 0x18 };
  
        if (action == HDA_FIXUP_ACT_INIT)
                alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
  static void alc889_fixup_mba21_vref(struct hda_codec *codec,
                                    const struct hda_fixup *fix, int action)
  {
 -      static hda_nid_t nids[2] = { 0x18, 0x19 };
 +      static const hda_nid_t nids[] = { 0x18, 0x19 };
  
        if (action == HDA_FIXUP_ACT_INIT)
                alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
@@@ -2096,7 -2097,7 +2097,7 @@@ static void alc1220_fixup_clevo_p950(st
                                     const struct hda_fixup *fix,
                                     int action)
  {
 -      hda_nid_t conn1[1] = { 0x0c };
 +      static const hda_nid_t conn1[] = { 0x0c };
  
        if (action != HDA_FIXUP_ACT_PRE_PROBE)
                return;
        /* We therefore want to make sure 0x14 (front headphone) and
         * 0x1b (speakers) use the stereo DAC 0x02
         */
 -      snd_hda_override_conn_list(codec, 0x14, 1, conn1);
 -      snd_hda_override_conn_list(codec, 0x1b, 1, conn1);
 +      snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
 +      snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1);
  }
  
  static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
@@@ -2995,7 -2996,7 +2996,7 @@@ static void alc269_shutup(struct hda_co
        alc_shutup_pins(codec);
  }
  
 -static struct coef_fw alc282_coefs[] = {
 +static const struct coef_fw alc282_coefs[] = {
        WRITE_COEF(0x03, 0x0002), /* Power Down Control */
        UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
        WRITE_COEF(0x07, 0x0200), /* DMIC control */
@@@ -3107,7 -3108,7 +3108,7 @@@ static void alc282_shutup(struct hda_co
        alc_write_coef_idx(codec, 0x78, coef78);
  }
  
 -static struct coef_fw alc283_coefs[] = {
 +static const struct coef_fw alc283_coefs[] = {
        WRITE_COEF(0x03, 0x0002), /* Power Down Control */
        UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */
        WRITE_COEF(0x07, 0x0200), /* DMIC control */
@@@ -4183,7 -4184,7 +4184,7 @@@ static void alc269_fixup_hp_line1_mic1_
        }
  }
  
 -static struct coef_fw alc225_pre_hsmode[] = {
 +static const struct coef_fw alc225_pre_hsmode[] = {
        UPDATE_COEF(0x4a, 1<<8, 0),
        UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
        UPDATE_COEF(0x63, 3<<14, 3<<14),
  
  static void alc_headset_mode_unplugged(struct hda_codec *codec)
  {
 -      static struct coef_fw coef0255[] = {
 +      static const struct coef_fw coef0255[] = {
                WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
                WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
                UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
                WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
                {}
        };
 -      static struct coef_fw coef0256[] = {
 +      static const struct coef_fw coef0256[] = {
                WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
                WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
                WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
                UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
                {}
        };
 -      static struct coef_fw coef0233[] = {
 +      static const struct coef_fw coef0233[] = {
                WRITE_COEF(0x1b, 0x0c0b),
                WRITE_COEF(0x45, 0xc429),
                UPDATE_COEF(0x35, 0x4000, 0),
                WRITE_COEF(0x32, 0x42a3),
                {}
        };
 -      static struct coef_fw coef0288[] = {
 +      static const struct coef_fw coef0288[] = {
                UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
                UPDATE_COEF(0x50, 0x2000, 0x2000),
                UPDATE_COEF(0x56, 0x0006, 0x0006),
                UPDATE_COEF(0x67, 0x2000, 0),
                {}
        };
 -      static struct coef_fw coef0298[] = {
 +      static const struct coef_fw coef0298[] = {
                UPDATE_COEF(0x19, 0x1300, 0x0300),
                {}
        };
 -      static struct coef_fw coef0292[] = {
 +      static const struct coef_fw coef0292[] = {
                WRITE_COEF(0x76, 0x000e),
                WRITE_COEF(0x6c, 0x2400),
                WRITE_COEF(0x18, 0x7308),
                WRITE_COEF(0x6b, 0xc429),
                {}
        };
 -      static struct coef_fw coef0293[] = {
 +      static const struct coef_fw coef0293[] = {
                UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */
                UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */
                UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */
                UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
                {}
        };
 -      static struct coef_fw coef0668[] = {
 +      static const struct coef_fw coef0668[] = {
                WRITE_COEF(0x15, 0x0d40),
                WRITE_COEF(0xb7, 0x802b),
                {}
        };
 -      static struct coef_fw coef0225[] = {
 +      static const struct coef_fw coef0225[] = {
                UPDATE_COEF(0x63, 3<<14, 0),
                {}
        };
 -      static struct coef_fw coef0274[] = {
 +      static const struct coef_fw coef0274[] = {
                UPDATE_COEF(0x4a, 0x0100, 0),
                UPDATE_COEFEX(0x57, 0x05, 0x4000, 0),
                UPDATE_COEF(0x6b, 0xf000, 0x5000),
  static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
                                    hda_nid_t mic_pin)
  {
 -      static struct coef_fw coef0255[] = {
 +      static const struct coef_fw coef0255[] = {
                WRITE_COEFEX(0x57, 0x03, 0x8aa6),
                WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
                {}
        };
 -      static struct coef_fw coef0256[] = {
 +      static const struct coef_fw coef0256[] = {
                UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/
                WRITE_COEFEX(0x57, 0x03, 0x09a3),
                WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */
                {}
        };
 -      static struct coef_fw coef0233[] = {
 +      static const struct coef_fw coef0233[] = {
                UPDATE_COEF(0x35, 0, 1<<14),
                WRITE_COEF(0x06, 0x2100),
                WRITE_COEF(0x1a, 0x0021),
                WRITE_COEF(0x26, 0x008c),
                {}
        };
 -      static struct coef_fw coef0288[] = {
 +      static const struct coef_fw coef0288[] = {
                UPDATE_COEF(0x4f, 0x00c0, 0),
                UPDATE_COEF(0x50, 0x2000, 0),
                UPDATE_COEF(0x56, 0x0006, 0),
                UPDATE_COEF(0x67, 0x2000, 0x2000),
                {}
        };
 -      static struct coef_fw coef0292[] = {
 +      static const struct coef_fw coef0292[] = {
                WRITE_COEF(0x19, 0xa208),
                WRITE_COEF(0x2e, 0xacf0),
                {}
        };
 -      static struct coef_fw coef0293[] = {
 +      static const struct coef_fw coef0293[] = {
                UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */
                UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */
                UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
                {}
        };
 -      static struct coef_fw coef0688[] = {
 +      static const struct coef_fw coef0688[] = {
                WRITE_COEF(0xb7, 0x802b),
                WRITE_COEF(0xb5, 0x1040),
                UPDATE_COEF(0xc3, 0, 1<<12),
                {}
        };
 -      static struct coef_fw coef0225[] = {
 +      static const struct coef_fw coef0225[] = {
                UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14),
                UPDATE_COEF(0x4a, 3<<4, 2<<4),
                UPDATE_COEF(0x63, 3<<14, 0),
                {}
        };
 -      static struct coef_fw coef0274[] = {
 +      static const struct coef_fw coef0274[] = {
                UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000),
                UPDATE_COEF(0x4a, 0x0010, 0),
                UPDATE_COEF(0x6b, 0xf000, 0),
  
  static void alc_headset_mode_default(struct hda_codec *codec)
  {
 -      static struct coef_fw coef0225[] = {
 +      static const struct coef_fw coef0225[] = {
                UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10),
                UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10),
                UPDATE_COEF(0x49, 3<<8, 0<<8),
                UPDATE_COEF(0x67, 0xf000, 0x3000),
                {}
        };
 -      static struct coef_fw coef0255[] = {
 +      static const struct coef_fw coef0255[] = {
                WRITE_COEF(0x45, 0xc089),
                WRITE_COEF(0x45, 0xc489),
                WRITE_COEFEX(0x57, 0x03, 0x8ea6),
                WRITE_COEF(0x49, 0x0049),
                {}
        };
 -      static struct coef_fw coef0256[] = {
 +      static const struct coef_fw coef0256[] = {
                WRITE_COEF(0x45, 0xc489),
                WRITE_COEFEX(0x57, 0x03, 0x0da3),
                WRITE_COEF(0x49, 0x0049),
                WRITE_COEF(0x06, 0x6100),
                {}
        };
 -      static struct coef_fw coef0233[] = {
 +      static const struct coef_fw coef0233[] = {
                WRITE_COEF(0x06, 0x2100),
                WRITE_COEF(0x32, 0x4ea3),
                {}
        };
 -      static struct coef_fw coef0288[] = {
 +      static const struct coef_fw coef0288[] = {
                UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */
                UPDATE_COEF(0x50, 0x2000, 0x2000),
                UPDATE_COEF(0x56, 0x0006, 0x0006),
                UPDATE_COEF(0x67, 0x2000, 0),
                {}
        };
 -      static struct coef_fw coef0292[] = {
 +      static const struct coef_fw coef0292[] = {
                WRITE_COEF(0x76, 0x000e),
                WRITE_COEF(0x6c, 0x2400),
                WRITE_COEF(0x6b, 0xc429),
                WRITE_COEF(0x18, 0x7308),
                {}
        };
 -      static struct coef_fw coef0293[] = {
 +      static const struct coef_fw coef0293[] = {
                UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */
                WRITE_COEF(0x45, 0xC429), /* Set to TRS type */
                UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */
                {}
        };
 -      static struct coef_fw coef0688[] = {
 +      static const struct coef_fw coef0688[] = {
                WRITE_COEF(0x11, 0x0041),
                WRITE_COEF(0x15, 0x0d40),
                WRITE_COEF(0xb7, 0x802b),
                {}
        };
 -      static struct coef_fw coef0274[] = {
 +      static const struct coef_fw coef0274[] = {
                WRITE_COEF(0x45, 0x4289),
                UPDATE_COEF(0x4a, 0x0010, 0x0010),
                UPDATE_COEF(0x6b, 0x0f00, 0),
@@@ -4579,53 -4580,53 +4580,53 @@@ static void alc_headset_mode_ctia(struc
  {
        int val;
  
 -      static struct coef_fw coef0255[] = {
 +      static const struct coef_fw coef0255[] = {
                WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
                WRITE_COEF(0x1b, 0x0c2b),
                WRITE_COEFEX(0x57, 0x03, 0x8ea6),
                {}
        };
 -      static struct coef_fw coef0256[] = {
 +      static const struct coef_fw coef0256[] = {
                WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
                WRITE_COEF(0x1b, 0x0e6b),
                {}
        };
 -      static struct coef_fw coef0233[] = {
 +      static const struct coef_fw coef0233[] = {
                WRITE_COEF(0x45, 0xd429),
                WRITE_COEF(0x1b, 0x0c2b),
                WRITE_COEF(0x32, 0x4ea3),
                {}
        };
 -      static struct coef_fw coef0288[] = {
 +      static const struct coef_fw coef0288[] = {
                UPDATE_COEF(0x50, 0x2000, 0x2000),
                UPDATE_COEF(0x56, 0x0006, 0x0006),
                UPDATE_COEF(0x66, 0x0008, 0),
                UPDATE_COEF(0x67, 0x2000, 0),
                {}
        };
 -      static struct coef_fw coef0292[] = {
 +      static const struct coef_fw coef0292[] = {
                WRITE_COEF(0x6b, 0xd429),
                WRITE_COEF(0x76, 0x0008),
                WRITE_COEF(0x18, 0x7388),
                {}
        };
 -      static struct coef_fw coef0293[] = {
 +      static const struct coef_fw coef0293[] = {
                WRITE_COEF(0x45, 0xd429), /* Set to ctia type */
                UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
                {}
        };
 -      static struct coef_fw coef0688[] = {
 +      static const struct coef_fw coef0688[] = {
                WRITE_COEF(0x11, 0x0001),
                WRITE_COEF(0x15, 0x0d60),
                WRITE_COEF(0xc3, 0x0000),
                {}
        };
 -      static struct coef_fw coef0225_1[] = {
 +      static const struct coef_fw coef0225_1[] = {
                UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
                UPDATE_COEF(0x63, 3<<14, 2<<14),
                {}
        };
 -      static struct coef_fw coef0225_2[] = {
 +      static const struct coef_fw coef0225_2[] = {
                UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
                UPDATE_COEF(0x63, 3<<14, 1<<14),
                {}
  /* Nokia type */
  static void alc_headset_mode_omtp(struct hda_codec *codec)
  {
 -      static struct coef_fw coef0255[] = {
 +      static const struct coef_fw coef0255[] = {
                WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
                WRITE_COEF(0x1b, 0x0c2b),
                WRITE_COEFEX(0x57, 0x03, 0x8ea6),
                {}
        };
 -      static struct coef_fw coef0256[] = {
 +      static const struct coef_fw coef0256[] = {
                WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
                WRITE_COEF(0x1b, 0x0e6b),
                {}
        };
 -      static struct coef_fw coef0233[] = {
 +      static const struct coef_fw coef0233[] = {
                WRITE_COEF(0x45, 0xe429),
                WRITE_COEF(0x1b, 0x0c2b),
                WRITE_COEF(0x32, 0x4ea3),
                {}
        };
 -      static struct coef_fw coef0288[] = {
 +      static const struct coef_fw coef0288[] = {
                UPDATE_COEF(0x50, 0x2000, 0x2000),
                UPDATE_COEF(0x56, 0x0006, 0x0006),
                UPDATE_COEF(0x66, 0x0008, 0),
                UPDATE_COEF(0x67, 0x2000, 0),
                {}
        };
 -      static struct coef_fw coef0292[] = {
 +      static const struct coef_fw coef0292[] = {
                WRITE_COEF(0x6b, 0xe429),
                WRITE_COEF(0x76, 0x0008),
                WRITE_COEF(0x18, 0x7388),
                {}
        };
 -      static struct coef_fw coef0293[] = {
 +      static const struct coef_fw coef0293[] = {
                WRITE_COEF(0x45, 0xe429), /* Set to omtp type */
                UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */
                {}
        };
 -      static struct coef_fw coef0688[] = {
 +      static const struct coef_fw coef0688[] = {
                WRITE_COEF(0x11, 0x0001),
                WRITE_COEF(0x15, 0x0d50),
                WRITE_COEF(0xc3, 0x0000),
                {}
        };
 -      static struct coef_fw coef0225[] = {
 +      static const struct coef_fw coef0225[] = {
                UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10),
                UPDATE_COEF(0x63, 3<<14, 2<<14),
                {}
@@@ -4798,17 -4799,17 +4799,17 @@@ static void alc_determine_headset_type(
        int val;
        bool is_ctia = false;
        struct alc_spec *spec = codec->spec;
 -      static struct coef_fw coef0255[] = {
 +      static const struct coef_fw coef0255[] = {
                WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/
                WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref
   conteol) */
                {}
        };
 -      static struct coef_fw coef0288[] = {
 +      static const struct coef_fw coef0288[] = {
                UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */
                {}
        };
 -      static struct coef_fw coef0298[] = {
 +      static const struct coef_fw coef0298[] = {
                UPDATE_COEF(0x50, 0x2000, 0x2000),
                UPDATE_COEF(0x56, 0x0006, 0x0006),
                UPDATE_COEF(0x66, 0x0008, 0),
                UPDATE_COEF(0x19, 0x1300, 0x1300),
                {}
        };
 -      static struct coef_fw coef0293[] = {
 +      static const struct coef_fw coef0293[] = {
                UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */
                WRITE_COEF(0x45, 0xD429), /* Set to ctia type */
                {}
        };
 -      static struct coef_fw coef0688[] = {
 +      static const struct coef_fw coef0688[] = {
                WRITE_COEF(0x11, 0x0001),
                WRITE_COEF(0xb7, 0x802b),
                WRITE_COEF(0x15, 0x0d60),
                WRITE_COEF(0xc3, 0x0c00),
                {}
        };
 -      static struct coef_fw coef0274[] = {
 +      static const struct coef_fw coef0274[] = {
                UPDATE_COEF(0x4a, 0x0010, 0),
                UPDATE_COEF(0x4a, 0x8000, 0),
                WRITE_COEF(0x45, 0xd289),
@@@ -5115,7 -5116,7 +5116,7 @@@ static void alc_fixup_headset_mode_no_h
  static void alc255_set_default_jack_type(struct hda_codec *codec)
  {
        /* Set to iphone type */
 -      static struct coef_fw alc255fw[] = {
 +      static const struct coef_fw alc255fw[] = {
                WRITE_COEF(0x1b, 0x880b),
                WRITE_COEF(0x45, 0xd089),
                WRITE_COEF(0x1b, 0x080b),
                WRITE_COEF(0x1b, 0x0c0b),
                {}
        };
 -      static struct coef_fw alc256fw[] = {
 +      static const struct coef_fw alc256fw[] = {
                WRITE_COEF(0x1b, 0x884b),
                WRITE_COEF(0x45, 0xd089),
                WRITE_COEF(0x1b, 0x084b),
@@@ -5246,7 -5247,7 +5247,7 @@@ static void alc_fixup_tpt470_dock(struc
         * the speaker output becomes too low by some reason on Thinkpads with
         * ALC298 codec
         */
 -      static hda_nid_t preferred_pairs[] = {
 +      static const hda_nid_t preferred_pairs[] = {
                0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
                0
        };
@@@ -5518,9 -5519,9 +5519,9 @@@ static void alc290_fixup_mono_speakers(
                /* DAC node 0x03 is giving mono output. We therefore want to
                   make sure 0x14 (front speaker) and 0x15 (headphones) use the
                   stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */
 -              hda_nid_t conn1[2] = { 0x0c };
 -              snd_hda_override_conn_list(codec, 0x14, 1, conn1);
 -              snd_hda_override_conn_list(codec, 0x15, 1, conn1);
 +              static const hda_nid_t conn1[] = { 0x0c };
 +              snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
 +              snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1);
        }
  }
  
@@@ -5535,8 -5536,8 +5536,8 @@@ static void alc298_fixup_speaker_volume
                   Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
                   speaker's volume now. */
  
 -              hda_nid_t conn1[1] = { 0x0c };
 -              snd_hda_override_conn_list(codec, 0x17, 1, conn1);
 +              static const hda_nid_t conn1[] = { 0x0c };
 +              snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1);
        }
  }
  
@@@ -5545,8 -5546,8 +5546,8 @@@ static void alc295_fixup_disable_dac3(s
                                      const struct hda_fixup *fix, int action)
  {
        if (action == HDA_FIXUP_ACT_PRE_PROBE) {
 -              hda_nid_t conn[2] = { 0x02, 0x03 };
 -              snd_hda_override_conn_list(codec, 0x17, 2, conn);
 +              static const hda_nid_t conn[] = { 0x02, 0x03 };
 +              snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
        }
  }
  
@@@ -5555,8 -5556,8 +5556,8 @@@ static void alc285_fixup_speaker2_to_da
                                          const struct hda_fixup *fix, int action)
  {
        if (action == HDA_FIXUP_ACT_PRE_PROBE) {
 -              hda_nid_t conn[1] = { 0x02 };
 -              snd_hda_override_conn_list(codec, 0x17, 1, conn);
 +              static const hda_nid_t conn[] = { 0x02 };
 +              snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
        }
  }
  
@@@ -5634,7 -5635,7 +5635,7 @@@ static void alc274_fixup_bind_dacs(stru
                                    const struct hda_fixup *fix, int action)
  {
        struct alc_spec *spec = codec->spec;
 -      static hda_nid_t preferred_pairs[] = {
 +      static const hda_nid_t preferred_pairs[] = {
                0x21, 0x03, 0x1b, 0x03, 0x16, 0x02,
                0
        };
@@@ -5847,7 -5848,6 +5848,7 @@@ enum 
        ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
        ALC288_FIXUP_DELL_XPS_13,
        ALC288_FIXUP_DISABLE_AAMIX,
 +      ALC292_FIXUP_DELL_E7X_AAMIX,
        ALC292_FIXUP_DELL_E7X,
        ALC292_FIXUP_DISABLE_AAMIX,
        ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK,
@@@ -6543,19 -6543,12 +6544,19 @@@ static const struct hda_fixup alc269_fi
                .chained = true,
                .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE
        },
 -      [ALC292_FIXUP_DELL_E7X] = {
 +      [ALC292_FIXUP_DELL_E7X_AAMIX] = {
                .type = HDA_FIXUP_FUNC,
                .v.func = alc_fixup_dell_xps13,
                .chained = true,
                .chain_id = ALC292_FIXUP_DISABLE_AAMIX
        },
 +      [ALC292_FIXUP_DELL_E7X] = {
 +              .type = HDA_FIXUP_FUNC,
 +              .v.func = snd_hda_gen_fixup_micmute_led,
 +              /* micmute fixup must be applied at last */
 +              .chained_before = true,
 +              .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX,
 +      },
        [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = {
                .type = HDA_FIXUP_PINS,
                .v.pins = (const struct hda_pintbl[]) {
@@@ -7267,6 -7260,7 +7268,7 @@@ static const struct snd_pci_quirk alc26
        SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
        SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
        SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
+       SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Yoga 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1),
        SND_PCI_QUIRK(0x17aa, 0x2293, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1),
        SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
        SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
@@@ -8482,7 -8476,7 +8484,7 @@@ static void alc662_fixup_aspire_ethos_h
        }
  }
  
 -static struct coef_fw alc668_coefs[] = {
 +static const struct coef_fw alc668_coefs[] = {
        WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03,    0x0),
        WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06,    0x0), WRITE_COEF(0x07, 0x0f80),
        WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b,    0x0),
This page took 0.120813 seconds and 4 git commands to generate.