Changeset 738


Ignore:
Timestamp:
Sep 18, 2022, 7:57:04 AM (3 years ago)
Author:
Paul Smedley
Message:

Initial commit of 5.18.19

Location:
GPL/branches/uniaud32-exp
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-exp/alsa-kernel/core/oss/pcm_oss.c

    r711 r738  
    852852}
    853853
     854static void snd_pcm_oss_release_buffers(struct snd_pcm_substream *substream)
     855{
     856        struct snd_pcm_runtime *runtime = substream->runtime;
     857
     858        kvfree(runtime->oss.buffer);
     859        runtime->oss.buffer = NULL;
     860#ifdef CONFIG_SND_PCM_OSS_PLUGINS
     861        snd_pcm_oss_plugin_clear(substream);
     862#endif
     863}
     864
    854865/* call with params_lock held */
    855866static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream)
     
    982993        if (!direct) {
    983994                /* add necessary plugins */
    984                 snd_pcm_oss_plugin_clear(substream);
    985995                err = snd_pcm_plug_format_plugins(substream, params, sparams);
    986996                if (err < 0) {
    987997                        pcm_dbg(substream->pcm,
    988998                                "snd_pcm_plug_format_plugins failed: %i\n", err);
    989                         snd_pcm_oss_plugin_clear(substream);
    990999                        goto failure;
    9911000                }
     
    9961005                                pcm_dbg(substream->pcm,
    9971006                                        "snd_pcm_plugin_build_io failed: %i\n", err);
    998                                 snd_pcm_oss_plugin_clear(substream);
    9991007                                goto failure;
    10001008                        }
     
    10041012                                err = snd_pcm_plugin_insert(plugin);
    10051013                        }
    1006                         if (err < 0) {
    1007                                 snd_pcm_oss_plugin_clear(substream);
     1014                        if (err < 0)
    10081015                                goto failure;
    1009                         }
    10101016                }
    10111017        }
     
    10961102        err = 0;
    10971103failure:
     1104        if (err)
     1105                snd_pcm_oss_release_buffers(substream);
    10981106        kfree(sw_params);
    10991107        kfree(params);
     
    23692377static void snd_pcm_oss_release_substream(struct snd_pcm_substream *substream)
    23702378{
    2371         struct snd_pcm_runtime *runtime;
    2372         runtime = substream->runtime;
    2373         kvfree(runtime->oss.buffer);
    2374         runtime->oss.buffer = NULL;
    2375 #ifdef CONFIG_SND_PCM_OSS_PLUGINS
    2376         snd_pcm_oss_plugin_clear(substream);
    2377 #endif
     2379        snd_pcm_oss_release_buffers(substream);
    23782380        substream->oss.oss = 0;
    23792381}
  • GPL/branches/uniaud32-exp/alsa-kernel/core/seq/oss/seq_oss_init.c

    r697 r738  
    6767        struct snd_seq_port_callback port_callback;
    6868
    69         port = kmalloc(sizeof(*port), GFP_KERNEL);
     69        port = kzalloc(sizeof(*port), GFP_KERNEL);
    7070        if (!port) {
    7171                rc = -ENOMEM;
     
    8181        system_client = rc;
    8282
    83         /* create annoucement receiver port */
    84         memset(port, 0, sizeof(*port));
     83        /* create announcement receiver port */
    8584        strcpy(port->name, "Receiver");
    8685        port->addr.client = system_client;
  • GPL/branches/uniaud32-exp/alsa-kernel/hda/ext/hdac_ext_controller.c

    r693 r738  
    134134
    135135/**
     136 * snd_hdac_ext_bus_link_at - get link at specified address
     137 * @bus: link's parent bus device
     138 * @addr: codec device address
     139 *
     140 * Returns link object or NULL if matching link is not found.
     141 */
     142struct hdac_ext_link *snd_hdac_ext_bus_link_at(struct hdac_bus *bus, int addr)
     143{
     144        struct hdac_ext_link *hlink;
     145        int i;
     146
     147        list_for_each_entry(hlink, &bus->hlink_list, list)
     148                for (i = 0; i < HDA_MAX_CODECS; i++)
     149                        if (hlink->lsdiid & (0x1 << addr))
     150                                return hlink;
     151        return NULL;
     152}
     153EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_link_at);
     154
     155/**
    136156 * snd_hdac_ext_bus_get_link - get link based on codec name
    137157 * @bus: the pointer to HDAC bus object
     
    141161                                                 const char *codec_name)
    142162{
    143         int i;
    144         struct hdac_ext_link *hlink = NULL;
    145163        int bus_idx, addr;
    146164
     
    152170                return NULL;
    153171
    154         list_for_each_entry(hlink, &bus->hlink_list, list) {
    155                 for (i = 0; i < HDA_MAX_CODECS; i++) {
    156                         if (hlink->lsdiid & (0x1 << addr))
    157                                 return hlink;
    158                 }
    159         }
    160 
    161         return NULL;
     172        return snd_hdac_ext_bus_link_at(bus, addr);
    162173}
    163174EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_get_link);
  • GPL/branches/uniaud32-exp/alsa-kernel/hda/hdac_device.c

    r736 r738  
    675675        { 0x17e8, "Chrontel" },
    676676        { 0x1854, "LG" },
     677        { 0x19e5, "Huawei" },
    677678        { 0x1aec, "Wolfson Microelectronics" },
    678679        { 0x1af4, "QEMU" },
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hda_codec.h

    r711 r738  
    307307 * constructors
    308308 */
     309#ifndef TARGET_OS2
     310__printf(3, 4)
     311#endif
     312struct hda_codec *
     313snd_hda_codec_device_init(struct hda_bus *bus, unsigned int codec_addr,
     314                          const char *fmt, ...);
    309315int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
    310316                      unsigned int codec_addr, struct hda_codec **codecp);
    311317int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card,
    312                       unsigned int codec_addr, struct hda_codec *codec);
     318                      unsigned int codec_addr, struct hda_codec *codec,
     319                      bool snddev_managed);
    313320int snd_hda_codec_configure(struct hda_codec *codec);
    314321int snd_hda_codec_update_widgets(struct hda_codec *codec);
     322void snd_hda_codec_register(struct hda_codec *codec);
     323void snd_hda_codec_unregister(struct hda_codec *codec);
     324void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec);
    315325
    316326/*
     
    493503#define snd_hda_power_down_pm(codec)    snd_hdac_power_down_pm(&(codec)->core)
    494504#ifdef CONFIG_PM
     505void snd_hda_codec_set_power_save(struct hda_codec *codec, int delay);
    495506void snd_hda_set_power_save(struct hda_bus *bus, int delay);
    496507void snd_hda_update_power_acct(struct hda_codec *codec);
    497508#else
     509static inline void snd_hda_codec_set_power_save(struct hda_codec *codec, int delay) {}
    498510static inline void snd_hda_set_power_save(struct hda_bus *bus, int delay) {}
    499511#endif
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hda_verbs.h

    r615 r738  
    462462#define AC_DE_IA                        (1<<2)
    463463
    464 /* device device types (0x0-0xf) */
     464/* device types (0x0-0xf) */
    465465enum {
    466466        AC_JACK_LINE_OUT,
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hdaudio.h

    r737 r738  
    1010#include <linux/interrupt.h>
    1111#include <linux/io.h>
     12#include <linux/io-64-nonatomic-lo-hi.h>
    1213#include <linux/pm_runtime.h>
    1314#include <linux/timecounter.h>
     
    460461#define snd_hdac_reg_writel(bus, addr, val)     writel(val, addr)
    461462#define snd_hdac_reg_readl(bus, addr)   readl(addr)
     463#define snd_hdac_reg_writeq(bus, addr, val)     writeq(val, addr)
     464#define snd_hdac_reg_readq(bus, addr)           readq(addr)
    462465
    463466/*
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hdaudio_ext.h

    r737 r738  
    33#define __SOUND_HDAUDIO_EXT_H
    44
     5#include <linux/io-64-nonatomic-lo-hi.h>
     6#include <linux/iopoll.h>
    57#include <sound/hdaudio.h>
    68
     
    2931
    3032int snd_hdac_ext_bus_get_ml_capabilities(struct hdac_bus *bus);
     33struct hdac_ext_link *snd_hdac_ext_bus_link_at(struct hdac_bus *bus, int addr);
    3134struct hdac_ext_link *snd_hdac_ext_bus_get_link(struct hdac_bus *bus,
    3235                                                const char *codec_name);
     
    144147                addr + reg)
    145148
     149#define snd_hdac_adsp_writeb(chip, reg, value) \
     150        snd_hdac_reg_writeb(chip, (chip)->dsp_ba + (reg), value)
     151#define snd_hdac_adsp_readb(chip, reg) \
     152        snd_hdac_reg_readb(chip, (chip)->dsp_ba + (reg))
     153#define snd_hdac_adsp_writew(chip, reg, value) \
     154        snd_hdac_reg_writew(chip, (chip)->dsp_ba + (reg), value)
     155#define snd_hdac_adsp_readw(chip, reg) \
     156        snd_hdac_reg_readw(chip, (chip)->dsp_ba + (reg))
     157#define snd_hdac_adsp_writel(chip, reg, value) \
     158        snd_hdac_reg_writel(chip, (chip)->dsp_ba + (reg), value)
     159#define snd_hdac_adsp_readl(chip, reg) \
     160        snd_hdac_reg_readl(chip, (chip)->dsp_ba + (reg))
     161#define snd_hdac_adsp_writeq(chip, reg, value) \
     162        snd_hdac_reg_writeq(chip, (chip)->dsp_ba + (reg), value)
     163#define snd_hdac_adsp_readq(chip, reg) \
     164        snd_hdac_reg_readq(chip, (chip)->dsp_ba + (reg))
     165
     166#define snd_hdac_adsp_updateb(chip, reg, mask, val) \
     167        snd_hdac_adsp_writeb(chip, reg, \
     168                        (snd_hdac_adsp_readb(chip, reg) & ~(mask)) | (val))
     169#define snd_hdac_adsp_updatew(chip, reg, mask, val) \
     170        snd_hdac_adsp_writew(chip, reg, \
     171                        (snd_hdac_adsp_readw(chip, reg) & ~(mask)) | (val))
     172#define snd_hdac_adsp_updatel(chip, reg, mask, val) \
     173        snd_hdac_adsp_writel(chip, reg, \
     174                        (snd_hdac_adsp_readl(chip, reg) & ~(mask)) | (val))
     175#define snd_hdac_adsp_updateq(chip, reg, mask, val) \
     176        snd_hdac_adsp_writeq(chip, reg, \
     177                        (snd_hdac_adsp_readq(chip, reg) & ~(mask)) | (val))
     178
     179#define snd_hdac_adsp_readb_poll(chip, reg, val, cond, delay_us, timeout_us) \
     180        readb_poll_timeout((chip)->dsp_ba + (reg), val, cond, \
     181                           delay_us, timeout_us)
     182#define snd_hdac_adsp_readw_poll(chip, reg, val, cond, delay_us, timeout_us) \
     183        readw_poll_timeout((chip)->dsp_ba + (reg), val, cond, \
     184                           delay_us, timeout_us)
     185#define snd_hdac_adsp_readl_poll(chip, reg, val, cond, delay_us, timeout_us) \
     186        readl_poll_timeout((chip)->dsp_ba + (reg), val, cond, \
     187                           delay_us, timeout_us)
     188#define snd_hdac_adsp_readq_poll(chip, reg, val, cond, delay_us, timeout_us) \
     189        readq_poll_timeout((chip)->dsp_ba + (reg), val, cond, \
     190                           delay_us, timeout_us)
     191#define snd_hdac_stream_readb_poll(strm, reg, val, cond, delay_us, timeout_us) \
     192        readb_poll_timeout((strm)->sd_addr + AZX_REG_ ## reg, val, cond, \
     193                           delay_us, timeout_us)
     194#define snd_hdac_stream_readl_poll(strm, reg, val, cond, delay_us, timeout_us) \
     195        readl_poll_timeout((strm)->sd_addr + AZX_REG_ ## reg, val, cond, \
     196                           delay_us, timeout_us)
    146197
    147198struct hdac_ext_device;
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/simple_card_utils.h

    r736 r738  
    1616#define asoc_simple_init_mic(card, sjack, prefix) \
    1717        asoc_simple_init_jack(card, sjack, 0, prefix, NULL)
     18
     19struct asoc_simple_tdm_width_map {
     20        u8 sample_bits;
     21        u8 slot_count;
     22        u16 slot_width;
     23};
    1824
    1925struct asoc_simple_dai {
     
    2632        unsigned int rx_slot_mask;
    2733        struct clk *clk;
     34        bool clk_fixed;
     35        struct asoc_simple_tdm_width_map *tdm_width_map;
     36        int n_tdm_widths;
    2837};
    2938
     
    132141                             char *prefix,
    133142                             unsigned int *retfmt);
     143int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np,
     144                                    struct asoc_simple_dai *dai);
     145
    134146__printf(3, 4)
    135147int asoc_simple_set_dailink_name(struct device *dev,
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-acpi.h

    r736 r738  
    6161 * @platform: string used for HDAudio codec support
    6262 * @codec_mask: used for HDAudio support
     63 * @dmic_num: number of SoC- or chipset-attached PDM digital microphones
    6364 * @common_hdmi_codec_drv: use commom HDAudio HDMI codec driver
    64  * @link_mask: links enabled on the board
    65  * @links: array of link _ADR descriptors, null terminated
     65 * @link_mask: SoundWire links enabled on the board
     66 * @links: array of SoundWire link _ADR descriptors, null terminated
     67 * @i2s_link_mask: I2S/TDM links enabled on the board
    6668 * @num_dai_drivers: number of elements in @dai_drivers
    6769 * @dai_drivers: pointer to dai_drivers, used e.g. in nocodec mode
     
    7577        u32 link_mask;
    7678        const struct snd_soc_acpi_link_adr *links;
     79        u32 i2s_link_mask;
    7780        u32 num_dai_drivers;
    7881        struct snd_soc_dai_driver *dai_drivers;
     
    122125        const struct snd_soc_acpi_adr_device *adr_d;
    123126};
     127
     128/*
     129 * when set the topology uses the -ssp<N> suffix, where N is determined based on
     130 * BIOS or DMI information
     131 */
     132#define SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER BIT(0)
     133
     134/*
     135 * when more than one SSP is reported in the link mask, use the most significant.
     136 * This choice was found to be valid on platforms with ES8336 codecs.
     137 */
     138#define SND_SOC_ACPI_TPLG_INTEL_SSP_MSB BIT(1)
     139
     140/*
     141 * when set the topology uses the -dmic<N>ch suffix, where N is determined based on
     142 * BIOS or DMI information
     143 */
     144#define SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER BIT(2)
    124145
    125146/**
     
    143164 * @pdata: intended for platform data or machine specific-ops. This structure
    144165 *  is not constant since this field may be updated at run-time
    145  * @sof_fw_filename: Sound Open Firmware file name, if enabled
    146166 * @sof_tplg_filename: Sound Open Firmware topology file name, if enabled
     167 * @tplg_quirk_mask: quirks to select different topology files dynamically
    147168 */
    148169/* Descriptor for SST ASoC machine driver */
     
    159180        void *pdata;
    160181        struct snd_soc_acpi_mach_params mach_params;
    161         const char *sof_fw_filename;
    162182        const char *sof_tplg_filename;
     183        const u32 tplg_quirk_mask;
    163184};
    164185
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-component.h

    r737 r738  
    180180        bool use_dai_pcm_id;    /* use DAI link PCM ID as PCM device number */
    181181        int be_pcm_base;        /* base device ID for all BE PCMs */
     182
     183#ifdef CONFIG_DEBUG_FS
     184        const char *debugfs_prefix;
     185#endif
    182186};
    183187
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-dapm.h

    r629 r738  
    430430int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
    431431                                 struct snd_soc_dai *dai);
     432void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w);
    432433int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card);
    433434void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card);
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/sof.h

    r737 r738  
    3838        SOF_FW_BOOT_COMPLETE,
    3939        SOF_FW_CRASHED,
     40};
     41
     42/* DSP power states */
     43enum sof_dsp_power_states {
     44        SOF_DSP_PM_D0,
     45        SOF_DSP_PM_D1,
     46        SOF_DSP_PM_D2,
     47        SOF_DSP_PM_D3,
    4048};
    4149
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/version.h

    r737 r738  
    11/* include/version.h */
    2 #define CONFIG_SND_VERSION "5.17.15"
     2#define CONFIG_SND_VERSION "5.18.19"
    33#define CONFIG_SND_DATE ""
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/ca0106/ca0106.h

    r710 r738  
    6060/************************************************************************************************/
    6161
    62 #define PTR                     0x00            /* Indexed register set pointer register        */
     62#define CA0106_PTR              0x00            /* Indexed register set pointer register        */
    6363                                                /* NOTE: The CHANNELNUM and ADDRESS words can   */
    6464                                                /* be modified independently of each other.     */
    6565                                                /* CNL[1:0], ADDR[27:16]                        */
    6666
    67 #define DATA                    0x04            /* Indexed register set data register           */
     67#define CA0106_DATA             0x04            /* Indexed register set data register           */
    6868                                                /* DATA[31:0]                                   */
    6969
    70 #define IPR                     0x08            /* Global interrupt pending register            */
     70#define CA0106_IPR              0x08            /* Global interrupt pending register            */
    7171                                                /* Clear pending interrupts by writing a 1 to   */
    7272                                                /* the relevant bits and zero to the other bits */
     
    8989#define IPR_PCI                 0x00000001      /* PCI Bus error                                */
    9090
    91 #define INTE                    0x0c            /* Interrupt enable register                    */
     91#define CA0106_INTE             0x0c            /* Interrupt enable register                    */
    9292
    9393#define INTE_MIDI_RX_B          0x00020000      /* MIDI UART-B Receive buffer non-empty         */
     
    109109#define INTE_PCI                0x00000001      /* PCI Bus error                                */
    110110
    111 #define UNKNOWN10               0x10            /* Unknown ??. Defaults to 0 */
    112 #define HCFG                    0x14            /* Hardware config register                     */
     111#define CA0106_UNKNOWN10        0x10            /* Unknown ??. Defaults to 0 */
     112#define CA0106_HCFG             0x14            /* Hardware config register                     */
    113113                                                /* 0x1000 causes AC3 to fails. It adds a dither bit. */
    114114
     
    134134                                                /* Should be set to 1 when the EMU10K1 is       */
    135135                                                /* completely initialized.                      */
    136 #define GPIO                    0x18            /* Defaults: 005f03a3-Analog, 005f02a2-SPDIF.   */
     136#define CA0106_GPIO             0x18            /* Defaults: 005f03a3-Analog, 005f02a2-SPDIF.   */
    137137                                                /* Here pins 0,1,2,3,4,,6 are output. 5,7 are input */
    138138                                                /* For the Audigy LS, pin 0 (or bit 8) controls the SPDIF/Analog jack. */
     
    153153                                                 * GPO Enable [23:16] Default 0x0f. Setting a bit to 1, causes the pin to be an output pin.
    154154                                                 */
    155 #define AC97DATA                0x1c            /* AC97 register set data register (16 bit)     */
    156 
    157 #define AC97ADDRESS             0x1e            /* AC97 register set address register (8 bit)   */
     155#define CA0106_AC97DATA         0x1c            /* AC97 register set data register (16 bit)     */
     156
     157#define CA0106_AC97ADDRESS      0x1e            /* AC97 register set address register (8 bit)   */
    158158
    159159/********************************************************************************************************/
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/ca0106/ca0106_main.c

    r737 r738  
    343343
    344344        spin_lock_irqsave(&emu->emu_lock, flags);
    345         outl(regptr, emu->port + PTR);
    346         val = inl(emu->port + DATA);
     345        outl(regptr, emu->port + CA0106_PTR);
     346        val = inl(emu->port + CA0106_DATA);
    347347        spin_unlock_irqrestore(&emu->emu_lock, flags);
    348348        return val;
     
    360360
    361361        spin_lock_irqsave(&emu->emu_lock, flags);
    362         outl(regptr, emu->port + PTR);
    363         outl(data, emu->port + DATA);
     362        outl(regptr, emu->port + CA0106_PTR);
     363        outl(data, emu->port + CA0106_DATA);
    364364        spin_unlock_irqrestore(&emu->emu_lock, flags);
    365365}
     
    460460
    461461        spin_lock_irqsave(&emu->emu_lock, flags);
    462         intr_enable = inl(emu->port + INTE) | intrenb;
    463         outl(intr_enable, emu->port + INTE);
     462        intr_enable = inl(emu->port + CA0106_INTE) | intrenb;
     463        outl(intr_enable, emu->port + CA0106_INTE);
    464464        spin_unlock_irqrestore(&emu->emu_lock, flags);
    465465}
     
    471471
    472472        spin_lock_irqsave(&emu->emu_lock, flags);
    473         intr_enable = inl(emu->port + INTE) & ~intrenb;
    474         outl(intr_enable, emu->port + INTE);
     473        intr_enable = inl(emu->port + CA0106_INTE) & ~intrenb;
     474        outl(intr_enable, emu->port + CA0106_INTE);
    475475        spin_unlock_irqrestore(&emu->emu_lock, flags);
    476476}
     
    791791                break;
    792792        }
    793         hcfg = inl(emu->port + HCFG) ;
     793        hcfg = inl(emu->port + CA0106_HCFG) ;
    794794        hcfg = (hcfg & ~hcfg_mask) | hcfg_set;
    795         outl(hcfg, emu->port + HCFG);
     795        outl(hcfg, emu->port + CA0106_HCFG);
    796796        reg40 = snd_ca0106_ptr_read(emu, 0x40, 0);
    797797        reg40 = (reg40 & ~reg40_mask) | reg40_set;
     
    893893                break;
    894894        }
    895         hcfg = inl(emu->port + HCFG) ;
     895        hcfg = inl(emu->port + CA0106_HCFG) ;
    896896        hcfg = (hcfg & ~hcfg_mask) | hcfg_set;
    897         outl(hcfg, emu->port + HCFG);
     897        outl(hcfg, emu->port + CA0106_HCFG);
    898898        reg71 = snd_ca0106_ptr_read(emu, 0x71, 0);
    899899        reg71 = (reg71 & ~reg71_mask) | reg71_set;
     
    11471147
    11481148        spin_lock_irqsave(&emu->emu_lock, flags);
    1149         outb(reg, emu->port + AC97ADDRESS);
    1150         val = inw(emu->port + AC97DATA);
     1149        outb(reg, emu->port + CA0106_AC97ADDRESS);
     1150        val = inw(emu->port + CA0106_AC97DATA);
    11511151        spin_unlock_irqrestore(&emu->emu_lock, flags);
    11521152        return val;
     
    11601160 
    11611161        spin_lock_irqsave(&emu->emu_lock, flags);
    1162         outb(reg, emu->port + AC97ADDRESS);
    1163         outw(val, emu->port + AC97DATA);
     1162        outb(reg, emu->port + CA0106_AC97ADDRESS);
     1163        outw(val, emu->port + CA0106_AC97DATA);
    11641164        spin_unlock_irqrestore(&emu->emu_lock, flags);
    11651165}
     
    12051205        struct snd_ca0106_channel *pchannel;
    12061206
    1207         status = inl(chip->port + IPR);
     1207        status = inl(chip->port + CA0106_IPR);
    12081208        if (! status)
    12091209                return IRQ_NONE;
     
    12601260
    12611261        // acknowledge the interrupt if necessary
    1262         outl(status, chip->port+IPR);
     1262        outl(status, chip->port + CA0106_IPR);
    12631263
    12641264        return IRQ_HANDLED;
     
    13881388        unsigned int def_bits;
    13891389
    1390         outl(0, chip->port + INTE);
     1390        outl(0, chip->port + CA0106_INTE);
    13911391
    13921392        /*
     
    14251425
    14261426        /* Write 0x8000 to AC97_REC_GAIN to mute it. */
    1427         outb(AC97_REC_GAIN, chip->port + AC97ADDRESS);
    1428         outw(0x8000, chip->port + AC97DATA);
     1427        outb(AC97_REC_GAIN, chip->port + CA0106_AC97ADDRESS);
     1428        outw(0x8000, chip->port + CA0106_AC97DATA);
    14291429#if 0 /* FIXME: what are these? */
    14301430        snd_ca0106_ptr_write(chip, SPCS0, 0, 0x2108006);
     
    15001500                 * E.g. For digital spdif out.
    15011501                 */
    1502                 outl(0x0, chip->port+GPIO);
    1503                 /* outl(0x00f0e000, chip->port+GPIO); */ /* Analog */
    1504                 outl(0x005f5301, chip->port+GPIO); /* Analog */
     1502                outl(0x0, chip->port + CA0106_GPIO);
     1503                /* outl(0x00f0e000, chip->port + CA0106_GPIO); */ /* Analog */
     1504                outl(0x005f5301, chip->port + CA0106_GPIO); /* Analog */
    15051505        } else if (chip->details->gpio_type == 1) {
    15061506                /* The SB0410 and SB0413 use GPIO differently. */
     
    15081508                 * E.g. For digital spdif out.
    15091509                 */
    1510                 outl(0x0, chip->port+GPIO);
    1511                 /* outl(0x00f0e000, chip->port+GPIO); */ /* Analog */
    1512                 outl(0x005f5301, chip->port+GPIO); /* Analog */
     1510                outl(0x0, chip->port + CA0106_GPIO);
     1511                /* outl(0x00f0e000, chip->port + CA0106_GPIO); */ /* Analog */
     1512                outl(0x005f5301, chip->port + CA0106_GPIO); /* Analog */
    15131513        } else {
    1514                 outl(0x0, chip->port+GPIO);
    1515                 outl(0x005f03a3, chip->port+GPIO); /* Analog */
    1516                 /* outl(0x005f02a2, chip->port+GPIO); */ /* SPDIF */
     1514                outl(0x0, chip->port + CA0106_GPIO);
     1515                outl(0x005f03a3, chip->port + CA0106_GPIO); /* Analog */
     1516                /* outl(0x005f02a2, chip->port + CA0106_GPIO); */ /* SPDIF */
    15171517        }
    15181518        snd_ca0106_intr_enable(chip, 0x105); /* Win2000 uses 0x1e0 */
     
    15201520        /* outl(HCFG_LOCKSOUNDCACHE|HCFG_AUDIOENABLE, chip->port+HCFG); */
    15211521        /* 0x1000 causes AC3 to fails. Maybe it effects 24 bit output. */
    1522         /* outl(0x00001409, chip->port+HCFG); */
    1523         /* outl(0x00000009, chip->port+HCFG); */
     1522        /* outl(0x00001409, chip->port + CA0106_HCFG); */
     1523        /* outl(0x00000009, chip->port + CA0106_HCFG); */
    15241524        /* AC97 2.0, Enable outputs. */
    1525         outl(HCFG_AC97 | HCFG_AUDIOENABLE, chip->port+HCFG);
     1525        outl(HCFG_AC97 | HCFG_AUDIOENABLE, chip->port + CA0106_HCFG);
    15261526
    15271527        if (chip->details->i2c_adc == 1) {
     
    15651565        /* disable interrupts */
    15661566        snd_ca0106_ptr_write(chip, BASIC_INTERRUPT, 0, 0);
    1567         outl(0, chip->port + INTE);
     1567        outl(0, chip->port + CA0106_INTE);
    15681568        snd_ca0106_ptr_write(chip, EXTENDED_INT_MASK, 0, 0);
    15691569        udelay(1000);
    15701570        /* disable audio */
    15711571        /* outl(HCFG_LOCKSOUNDCACHE, chip->port + HCFG); */
    1572         outl(0, chip->port + HCFG);
     1572        outl(0, chip->port + CA0106_HCFG);
    15731573        /* FIXME: We need to stop and DMA transfers here.
    15741574         *        But as I am not sure how yet, we cannot from the dma pages.
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/ca0106/ca0106_mixer.c

    r629 r738  
    7171                val = snd_ca0106_ptr_read(emu, CAPTURE_CONTROL, 0) & ~0x1000;
    7272                snd_ca0106_ptr_write(emu, CAPTURE_CONTROL, 0, val);
    73                 val = inl(emu->port + GPIO) & ~0x101;
    74                 outl(val, emu->port + GPIO);
     73                val = inl(emu->port + CA0106_GPIO) & ~0x101;
     74                outl(val, emu->port + CA0106_GPIO);
    7575
    7676        } else {
     
    8080                val = snd_ca0106_ptr_read(emu, CAPTURE_CONTROL, 0) | 0x1000;
    8181                snd_ca0106_ptr_write(emu, CAPTURE_CONTROL, 0, val);
    82                 val = inl(emu->port + GPIO) | 0x101;
    83                 outl(val, emu->port + GPIO);
     82                val = inl(emu->port + CA0106_GPIO) | 0x101;
     83                outl(val, emu->port + CA0106_GPIO);
    8484        }
    8585}
     
    120120        if (emu->capture_mic_line_in) {
    121121                /* snd_ca0106_i2c_write(emu, ADC_MUX, 0); */ /* Mute input */
    122                 tmp = inl(emu->port+GPIO) & ~0x400;
     122                tmp = inl(emu->port + CA0106_GPIO) & ~0x400;
    123123                tmp = tmp | 0x400;
    124                 outl(tmp, emu->port+GPIO);
     124                outl(tmp, emu->port + CA0106_GPIO);
    125125                /* snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_MIC); */
    126126        } else {
    127127                /* snd_ca0106_i2c_write(emu, ADC_MUX, 0); */ /* Mute input */
    128                 tmp = inl(emu->port+GPIO) & ~0x400;
    129                 outl(tmp, emu->port+GPIO);
     128                tmp = inl(emu->port + CA0106_GPIO) & ~0x400;
     129                outl(tmp, emu->port + CA0106_GPIO);
    130130                /* snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_LINEIN); */
    131131        }
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/cs46xx/cs46xx.c

    r736 r738  
    8282                                external_amp[dev], thinkpad[dev]);
    8383        if (err < 0)
    84                 return err;
     84                goto error;
    8585        card->private_data = chip;
    8686        chip->accept_valid = mmap_valid[dev];
    8787        err = snd_cs46xx_pcm(chip, 0);
    8888        if (err < 0)
    89                 return err;
     89                goto error;
    9090#ifdef CONFIG_SND_CS46XX_NEW_DSP
    9191        err = snd_cs46xx_pcm_rear(chip, 1);
    9292        if (err < 0)
    93                 return err;
     93                goto error;
    9494        err = snd_cs46xx_pcm_iec958(chip, 2);
    9595        if (err < 0)
    96                 return err;
     96                goto error;
    9797#endif
    9898        err = snd_cs46xx_mixer(chip, 2);
    9999        if (err < 0)
    100                 return err;
     100                goto error;
    101101#ifdef CONFIG_SND_CS46XX_NEW_DSP
    102102        if (chip->nr_ac97_codecs ==2) {
    103103                err = snd_cs46xx_pcm_center_lfe(chip, 3);
    104104                if (err < 0)
    105                         return err;
     105                        goto error;
    106106        }
    107107#endif
    108108        err = snd_cs46xx_midi(chip, 0);
    109109        if (err < 0)
    110                 return err;
     110                goto error;
    111111        err = snd_cs46xx_start_dsp(chip);
    112112        if (err < 0)
    113                 return err;
     113                goto error;
    114114
    115115        snd_cs46xx_gameport(chip);
     
    125125        err = snd_card_register(card);
    126126        if (err < 0)
    127                 return err;
     127                goto error;
    128128
    129129        pci_set_drvdata(pci, card);
    130130        dev++;
    131131        return 0;
     132
     133 error:
     134        snd_card_free(card);
     135        return err;
    132136}
    133137
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_auto_parser.c

    r737 r738  
    833833}
    834834
    835 static void apply_fixup(struct hda_codec *codec, int id, int action, int depth)
     835void __snd_hda_apply_fixup(struct hda_codec *codec, int id, int action, int depth)
    836836{
    837837        const char *modelname = codec->fixup_name;
     
    843843                        break;
    844844                if (fix->chained_before)
    845                         apply_fixup(codec, fix->chain_id, action, depth + 1);
     845                        __snd_hda_apply_fixup(codec, fix->chain_id, action, depth + 1);
    846846
    847847                switch (fix->type) {
     
    884884        }
    885885}
     886EXPORT_SYMBOL_GPL(__snd_hda_apply_fixup);
    886887
    887888/**
     
    893894{
    894895        if (codec->fixup_list)
    895                 apply_fixup(codec, codec->fixup_id, action, 0);
     896                __snd_hda_apply_fixup(codec, codec->fixup_id, action, 0);
    896897}
    897898EXPORT_SYMBOL_GPL(snd_hda_apply_fixup);
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_codec.c

    r713 r738  
    779779}
    780780
     781/**
     782 * snd_hda_codec_cleanup_for_unbind - Prepare codec for removal
     783 * @codec: codec device to cleanup
     784 */
    781785void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec)
    782786{
     
    826830}
    827831
    828 /* also called from hda_bind.c */
     832/**
     833 * snd_hda_codec_register - Finalize codec initialization
     834 * @codec: codec device to register
     835 *
     836 * Also called from hda_bind.c
     837 */
    829838void snd_hda_codec_register(struct hda_codec *codec)
    830839{
     
    839848        }
    840849}
     850EXPORT_SYMBOL_GPL(snd_hda_codec_register);
    841851
    842852static int snd_hda_codec_dev_register(struct snd_device *device)
     
    846856}
    847857
    848 static int snd_hda_codec_dev_free(struct snd_device *device)
    849 {
    850         struct hda_codec *codec = device->device_data;
    851 
     858/**
     859 * snd_hda_codec_unregister - Unregister specified codec device
     860 * @codec: codec device to unregister
     861 */
     862void snd_hda_codec_unregister(struct hda_codec *codec)
     863{
    852864        codec->in_freeing = 1;
    853865        /*
     
    866878        if (codec->core.type == HDA_DEV_LEGACY)
    867879                put_device(hda_codec_dev(codec));
    868 
     880}
     881EXPORT_SYMBOL_GPL(snd_hda_codec_unregister);
     882
     883static int snd_hda_codec_dev_free(struct snd_device *device)
     884{
     885        snd_hda_codec_unregister(device->device_data);
    869886        return 0;
    870887}
     
    890907#define DEV_NAME_LEN 31
    891908
    892 static int snd_hda_codec_device_init(struct hda_bus *bus, struct snd_card *card,
    893                         unsigned int codec_addr, struct hda_codec **codecp)
    894 {
     909/**
     910 * snd_hda_codec_device_init - allocate HDA codec device
     911 * @bus: codec's parent bus
     912 * @codec_addr: the codec address on the parent bus
     913 * @fmt: format string for the device's name
     914 *
     915 * Returns newly allocated codec device or ERR_PTR() on failure.
     916 */
     917struct hda_codec *
     918snd_hda_codec_device_init(struct hda_bus *bus, unsigned int codec_addr,
     919                          const char *fmt, ...)
     920{
     921        va_list vargs;
    895922        char name[DEV_NAME_LEN];
    896923        struct hda_codec *codec;
    897924        int err;
    898925
    899         dev_dbg(card->dev, "%s: entry\n", __func__);
    900 
    901926        if (snd_BUG_ON(!bus))
    902                 return -EINVAL;
     927                return ERR_PTR(-EINVAL);
    903928        if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS))
    904                 return -EINVAL;
     929                return ERR_PTR(-EINVAL);
    905930
    906931        codec = kzalloc(sizeof(*codec), GFP_KERNEL);
    907932        if (!codec)
    908                 return -ENOMEM;
    909 
    910         sprintf(name, "hdaudioC%dD%d", card->number, codec_addr);
     933                return ERR_PTR(-ENOMEM);
     934
     935        va_start(vargs, fmt);
     936        vsprintf(name, fmt, vargs);
     937        va_end(vargs);
     938
    911939        err = snd_hdac_device_init(&codec->core, &bus->core, name, codec_addr);
    912940        if (err < 0) {
    913941                kfree(codec);
    914                 return err;
    915         }
    916 
     942                return ERR_PTR(err);
     943        }
     944
     945        codec->bus = bus;
    917946        codec->core.type = HDA_DEV_LEGACY;
    918         *codecp = codec;
    919 
    920         return err;
    921 }
     947
     948        return codec;
     949}
     950EXPORT_SYMBOL_GPL(snd_hda_codec_device_init);
    922951
    923952/**
     
    933962                      unsigned int codec_addr, struct hda_codec **codecp)
    934963{
    935         int ret;
    936 
    937         ret = snd_hda_codec_device_init(bus, card, codec_addr, codecp);
    938         if (ret < 0)
    939                 return ret;
    940 
    941         return snd_hda_codec_device_new(bus, card, codec_addr, *codecp);
     964        struct hda_codec *codec;
     965
     966        codec = snd_hda_codec_device_init(bus, codec_addr, "hdaudioC%dD%d",
     967                                          card->number, codec_addr);
     968        if (IS_ERR(codec))
     969                return PTR_ERR(codec);
     970        *codecp = codec;
     971
     972        return snd_hda_codec_device_new(bus, card, codec_addr, *codecp, true);
    942973}
    943974EXPORT_SYMBOL_GPL(snd_hda_codec_new);
    944975
    945976int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card,
    946                         unsigned int codec_addr, struct hda_codec *codec)
     977                        unsigned int codec_addr, struct hda_codec *codec,
     978                        bool snddev_managed)
    947979{
    948980        char component[31];
     
    964996        codec->core.exec_verb = codec_exec_verb;
    965997
    966         codec->bus = bus;
    967998        codec->card = card;
    968999        codec->addr = codec_addr;
     
    10201051        snd_component_add(card, component);
    10211052
    1022         err = snd_device_new(card, SNDRV_DEV_CODEC, codec, &dev_ops);
    1023         if (err < 0)
    1024                 goto error;
     1053        if (snddev_managed) {
     1054                /* ASoC features component management instead */
     1055                err = snd_device_new(card, SNDRV_DEV_CODEC, codec, &dev_ops);
     1056                if (err < 0)
     1057                        goto error;
     1058        }
    10251059
    10261060        /* PM runtime needs to be enabled later after binding codec */
     
    33913425
    33923426#ifdef CONFIG_PM
    3393 static void codec_set_power_save(struct hda_codec *codec, int delay)
     3427/**
     3428 * snd_hda_codec_set_power_save - Configure codec's runtime PM
     3429 * @codec: codec device to configure
     3430 * @delay: autosuspend delay
     3431 */
     3432void snd_hda_codec_set_power_save(struct hda_codec *codec, int delay)
    33943433{
    33953434        struct device *dev = hda_codec_dev(codec);
     
    34093448        }
    34103449}
     3450EXPORT_SYMBOL_GPL(snd_hda_codec_set_power_save);
    34113451
    34123452/**
     
    34223462
    34233463        list_for_each_codec(c, bus)
    3424                 codec_set_power_save(c, delay);
     3464                snd_hda_codec_set_power_save(c, delay);
    34253465}
    34263466EXPORT_SYMBOL_GPL(snd_hda_set_power_save);
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_intel.c

    r737 r738  
    25482548        { PCI_DEVICE(0x8086, 0x51c8),
    25492549          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
     2550        { PCI_DEVICE(0x8086, 0x51c9),
     2551          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
    25502552        { PCI_DEVICE(0x8086, 0x51cd),
    25512553          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
     
    25602562          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
    25612563        { PCI_DEVICE(0x8086, 0x4b58),
     2564          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
     2565        /* Raptor Lake */
     2566        { PCI_DEVICE(0x8086, 0x7a50),
     2567          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
     2568        { PCI_DEVICE(0x8086, 0x51ca),
     2569          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
     2570        { PCI_DEVICE(0x8086, 0x51cb),
     2571          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
     2572        { PCI_DEVICE(0x8086, 0x51ce),
     2573          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
     2574        { PCI_DEVICE(0x8086, 0x51cf),
     2575          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
     2576        /* Meteorlake-P */
     2577        { PCI_DEVICE(0x8086, 0x7e28),
    25622578          .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
    25632579        /* Broxton-P(Apollolake) */
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_local.h

    r736 r738  
    136136        __snd_hda_add_vmaster(codec, name, tlv, followers, suffix, true, access, NULL)
    137137int snd_hda_codec_reset(struct hda_codec *codec);
    138 void snd_hda_codec_register(struct hda_codec *codec);
    139 void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec);
    140138void snd_hda_codec_disconnect_pcms(struct hda_codec *codec);
    141139
     
    365363                           const struct hda_pintbl *cfg);
    366364void snd_hda_apply_fixup(struct hda_codec *codec, int action);
     365void __snd_hda_apply_fixup(struct hda_codec *codec, int id, int action, int depth);
    367366void snd_hda_pick_fixup(struct hda_codec *codec,
    368367                        const struct hda_model_fixup *models,
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_cirrus.c

    r736 r738  
    400400        /* codec SSID */
    401401        SND_PCI_QUIRK(0x106b, 0x0600, "iMac 14,1", CS420X_IMAC27_122),
     402        SND_PCI_QUIRK(0x106b, 0x0900, "iMac 12,1", CS420X_IMAC27_122),
    402403        SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81),
    403404        SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122),
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_conexant.c

    r737 r738  
    229229        CXT_PINCFG_COMPAQ_CQ60,
    230230        CXT_FIXUP_STEREO_DMIC,
     231        CXT_PINCFG_LENOVO_NOTEBOOK,
    231232        CXT_FIXUP_INC_MIC_BOOST,
    232233        CXT_FIXUP_HEADPHONE_MIC_PIN,
     
    813814                .v.func = cxt_fixup_stereo_dmic,
    814815        },
     816#ifdef TARGET_OS2xxx
     817        [CXT_PINCFG_LENOVO_NOTEBOOK] = {
     818                .type = HDA_FIXUP_PINS,
     819                .v.pins = (const struct hda_pintbl[]) {
     820                        { 0x1a, 0x05d71030 },
     821                        { }
     822                },
     823                .chain_id = CXT_FIXUP_STEREO_DMIC,
     824        },
     825#endif
    815826        [CXT_FIXUP_INC_MIC_BOOST] = {
    816827                .type = HDA_FIXUP_FUNC,
     
    10051016        SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
    10061017        SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
     1018        SND_PCI_QUIRK(0x103c, 0x82b4, "HP ProDesk 600 G3", CXT_FIXUP_HP_MIC_NO_PRESENCE),
    10071019        SND_PCI_QUIRK(0x103c, 0x836e, "HP ProBook 455 G5", CXT_FIXUP_MUTE_LED_GPIO),
    10081020        SND_PCI_QUIRK(0x103c, 0x837f, "HP ProBook 470 G5", CXT_FIXUP_MUTE_LED_GPIO),
     
    10311043        SND_PCI_QUIRK(0x17aa, 0x390b, "Lenovo G50-80", CXT_FIXUP_STEREO_DMIC),
    10321044        SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC),
    1033         SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC),
     1045        SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_PINCFG_LENOVO_NOTEBOOK),
    10341046        SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC),
    10351047        SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC),
     
    11401152                goto error;
    11411153
    1142         err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);
     1154        err = cx_auto_parse_beep(codec);
    11431155        if (err < 0)
    11441156                goto error;
    11451157
    1146         err = cx_auto_parse_beep(codec);
     1158        err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);
    11471159        if (err < 0)
    11481160                goto error;
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_hdmi.c

    r737 r738  
    131131        struct snd_jack *jack;
    132132        struct snd_kcontrol *eld_ctl;
     133};
     134
     135enum {
     136        SILENT_STREAM_OFF = 0,
     137        SILENT_STREAM_KAE,      /* use standard HDA Keep-Alive */
     138        SILENT_STREAM_I915,     /* Intel i915 extension */
    133139};
    134140
     
    175181        bool dyn_pcm_assign;
    176182        bool dyn_pcm_no_legacy;
     183        /* hdmi interrupt trigger control flag for Nvidia codec */
     184        bool hdmi_intr_trig_ctrl;
    177185        bool intel_hsw_fixup;   /* apply Intel platform-specific fixups */
    178186        /*
     
    192200        const int *port_map;
    193201        int port_num;
    194         bool send_silent_stream; /* Flag to enable silent stream feature */
     202        int silent_stream_type;
    195203};
    196204
     
    16841692#define I915_SILENT_FMT_MASK            0xf
    16851693
    1686 static void silent_stream_enable(struct hda_codec *codec,
    1687                                  struct hdmi_spec_per_pin *per_pin)
    1688 {
    1689         struct hdmi_spec *spec = codec->spec;
    1690         struct hdmi_spec_per_cvt *per_cvt;
    1691         int cvt_idx, pin_idx, err;
     1694static void silent_stream_enable_i915(struct hda_codec *codec,
     1695                                      struct hdmi_spec_per_pin *per_pin)
     1696{
    16921697        unsigned int format;
    1693 
    1694         mutex_lock(&per_pin->lock);
    1695 
    1696         if (per_pin->setup) {
    1697                 codec_dbg(codec, "hdmi: PCM already open, no silent stream\n");
    1698                 goto unlock_out;
    1699         }
    1700 
    1701         pin_idx = pin_id_to_pin_index(codec, per_pin->pin_nid, per_pin->dev_id);
    1702         err = hdmi_choose_cvt(codec, pin_idx, &cvt_idx);
    1703         if (err) {
    1704                 codec_err(codec, "hdmi: no free converter to enable silent mode\n");
    1705                 goto unlock_out;
    1706         }
    1707 
    1708         per_cvt = get_cvt(spec, cvt_idx);
    1709         per_cvt->assigned = 1;
    1710         per_pin->cvt_nid = per_cvt->cvt_nid;
    1711         per_pin->silent_stream = true;
    1712 
    1713         codec_dbg(codec, "hdmi: enabling silent stream pin-NID=0x%x cvt-NID=0x%x\n",
    1714                   per_pin->pin_nid, per_cvt->cvt_nid);
    1715 
    1716         snd_hda_set_dev_select(codec, per_pin->pin_nid, per_pin->dev_id);
    1717         snd_hda_codec_write_cache(codec, per_pin->pin_nid, 0,
    1718                                   AC_VERB_SET_CONNECT_SEL,
    1719                                   per_pin->mux_idx);
    1720 
    1721         /* configure unused pins to choose other converters */
    1722         pin_cvt_fixup(codec, per_pin, 0);
    17231698
    17241699        snd_hdac_sync_audio_rate(&codec->core, per_pin->pin_nid,
     
    17351710        per_pin->channels = I915_SILENT_CHANNELS;
    17361711        hdmi_setup_audio_infoframe(codec, per_pin, per_pin->non_pcm);
     1712}
     1713
     1714static void silent_stream_set_kae(struct hda_codec *codec,
     1715                                  struct hdmi_spec_per_pin *per_pin,
     1716                                  bool enable)
     1717{
     1718        unsigned int param;
     1719
     1720        codec_dbg(codec, "HDMI: KAE %d cvt-NID=0x%x\n", enable, per_pin->cvt_nid);
     1721
     1722        param = snd_hda_codec_read(codec, per_pin->cvt_nid, 0, AC_VERB_GET_DIGI_CONVERT_1, 0);
     1723        param = (param >> 16) & 0xff;
     1724
     1725        if (enable)
     1726                param |= AC_DIG3_KAE;
     1727        else
     1728                param &= ~AC_DIG3_KAE;
     1729
     1730        snd_hda_codec_write(codec, per_pin->cvt_nid, 0, AC_VERB_SET_DIGI_CONVERT_3, param);
     1731}
     1732
     1733static void silent_stream_enable(struct hda_codec *codec,
     1734                                 struct hdmi_spec_per_pin *per_pin)
     1735{
     1736        struct hdmi_spec *spec = codec->spec;
     1737        struct hdmi_spec_per_cvt *per_cvt;
     1738        int cvt_idx, pin_idx, err;
     1739        int keep_power = 0;
     1740
     1741        /*
     1742         * Power-up will call hdmi_present_sense, so the PM calls
     1743         * have to be done without mutex held.
     1744         */
     1745
     1746        err = snd_hda_power_up_pm(codec);
     1747        if (err < 0 && err != -EACCES) {
     1748                codec_err(codec,
     1749                          "Failed to power up codec for silent stream enable ret=[%d]\n", err);
     1750                snd_hda_power_down_pm(codec);
     1751                return;
     1752        }
     1753
     1754        mutex_lock(&per_pin->lock);
     1755
     1756        if (per_pin->setup) {
     1757                codec_dbg(codec, "hdmi: PCM already open, no silent stream\n");
     1758                err = -EBUSY;
     1759                goto unlock_out;
     1760        }
     1761
     1762        pin_idx = pin_id_to_pin_index(codec, per_pin->pin_nid, per_pin->dev_id);
     1763        err = hdmi_choose_cvt(codec, pin_idx, &cvt_idx);
     1764        if (err) {
     1765                codec_err(codec, "hdmi: no free converter to enable silent mode\n");
     1766                goto unlock_out;
     1767        }
     1768
     1769        per_cvt = get_cvt(spec, cvt_idx);
     1770        per_cvt->assigned = 1;
     1771        per_pin->cvt_nid = per_cvt->cvt_nid;
     1772        per_pin->silent_stream = true;
     1773
     1774        codec_dbg(codec, "hdmi: enabling silent stream pin-NID=0x%x cvt-NID=0x%x\n",
     1775                  per_pin->pin_nid, per_cvt->cvt_nid);
     1776
     1777        snd_hda_set_dev_select(codec, per_pin->pin_nid, per_pin->dev_id);
     1778        snd_hda_codec_write_cache(codec, per_pin->pin_nid, 0,
     1779                                  AC_VERB_SET_CONNECT_SEL,
     1780                                  per_pin->mux_idx);
     1781
     1782        /* configure unused pins to choose other converters */
     1783        pin_cvt_fixup(codec, per_pin, 0);
     1784
     1785        switch (spec->silent_stream_type) {
     1786        case SILENT_STREAM_KAE:
     1787                silent_stream_set_kae(codec, per_pin, true);
     1788                break;
     1789        case SILENT_STREAM_I915:
     1790                silent_stream_enable_i915(codec, per_pin);
     1791                keep_power = 1;
     1792                break;
     1793        default:
     1794                break;
     1795        }
    17371796
    17381797 unlock_out:
    17391798        mutex_unlock(&per_pin->lock);
     1799
     1800        if (err || !keep_power)
     1801                snd_hda_power_down_pm(codec);
    17401802}
    17411803
     
    17451807        struct hdmi_spec *spec = codec->spec;
    17461808        struct hdmi_spec_per_cvt *per_cvt;
    1747         int cvt_idx;
     1809        int cvt_idx, err;
     1810
     1811        err = snd_hda_power_up_pm(codec);
     1812        if (err < 0 && err != -EACCES) {
     1813                codec_err(codec,
     1814                          "Failed to power up codec for silent stream disable ret=[%d]\n",
     1815                          err);
     1816                snd_hda_power_down_pm(codec);
     1817                return;
     1818        }
    17481819
    17491820        mutex_lock(&per_pin->lock);
     
    17601831        }
    17611832
     1833        if (spec->silent_stream_type == SILENT_STREAM_I915) {
     1834                /* release ref taken in silent_stream_enable() */
     1835                snd_hda_power_down_pm(codec);
     1836        } else if (spec->silent_stream_type == SILENT_STREAM_KAE) {
     1837                silent_stream_set_kae(codec, per_pin, false);
     1838        }
     1839
    17621840        per_pin->cvt_nid = 0;
    17631841        per_pin->silent_stream = false;
     
    17651843 unlock_out:
    17661844        mutex_unlock(&per_pin->lock);
     1845
     1846        snd_hda_power_down_pm(codec);
    17671847}
    17681848
     
    17861866        mutex_unlock(&per_pin->lock);
    17871867
    1788         /*
    1789          * Power-up will call hdmi_present_sense, so the PM calls
    1790          * have to be done without mutex held.
    1791          */
    1792 
    1793         if (spec->send_silent_stream) {
    1794                 int pm_ret;
    1795 
    1796                 if (!monitor_prev && monitor_next) {
    1797                         pm_ret = snd_hda_power_up_pm(codec);
    1798                         if (pm_ret < 0)
    1799                                 codec_err(codec,
    1800                                 "Monitor plugged-in, Failed to power up codec ret=[%d]\n",
    1801                                 pm_ret);
     1868        if (spec->silent_stream_type) {
     1869                if (!monitor_prev && monitor_next)
    18021870                        silent_stream_enable(codec, per_pin);
    1803                 } else if (monitor_prev && !monitor_next) {
     1871                else if (monitor_prev && !monitor_next)
    18041872                        silent_stream_disable(codec, per_pin);
    1805                         pm_ret = snd_hda_power_down_pm(codec);
    1806                         if (pm_ret < 0)
    1807                                 codec_err(codec,
    1808                                 "Monitor plugged-out, Failed to power down codec ret=[%d]\n",
    1809                                 pm_ret);
    1810                 }
    18111873        }
    18121874}
     
    30073069         */
    30083070        if (send_silent_stream)
    3009                 spec->send_silent_stream = true;
     3071                spec->silent_stream_type = SILENT_STREAM_I915;
    30103072
    30113073        return parse_intel_hdmi(codec);
     
    30583120
    30593121        return ret;
     3122}
     3123
     3124static int patch_i915_adlp_hdmi(struct hda_codec *codec)
     3125{
     3126        struct hdmi_spec *spec;
     3127        int res;
     3128
     3129        res = patch_i915_tgl_hdmi(codec);
     3130        if (!res) {
     3131                spec = codec->spec;
     3132
     3133                if (spec->silent_stream_type)
     3134                        spec->silent_stream_type = SILENT_STREAM_KAE;
     3135        }
     3136
     3137        return res;
    30603138}
    30613139
     
    37463824 *
    37473825 * Note that for the trigger bit to take effect it needs to change value
    3748  * (i.e. it needs to be toggled).
     3826 * (i.e. it needs to be toggled). The trigger bit is not applicable from
     3827 * TEGRA234 chip onwards, as new verb id 0xf80 will be used for interrupt
     3828 * trigger to hdmi.
    37493829 */
     3830#define NVIDIA_SET_HOST_INTR            0xf80
    37503831#define NVIDIA_GET_SCRATCH0             0xfa6
    37513832#define NVIDIA_SET_SCRATCH0_BYTE0       0xfa7
     
    37663847 * the format is invalidated so that the HDMI codec can be disabled.
    37673848 */
    3768 static void tegra_hdmi_set_format(struct hda_codec *codec, unsigned int format)
     3849static void tegra_hdmi_set_format(struct hda_codec *codec,
     3850                                  hda_nid_t cvt_nid,
     3851                                  unsigned int format)
    37693852{
    37703853        unsigned int value;
     3854        unsigned int nid = NVIDIA_AFG_NID;
     3855        struct hdmi_spec *spec = codec->spec;
     3856
     3857        /*
     3858         * Tegra HDA codec design from TEGRA234 chip onwards support DP MST.
     3859         * This resulted in moving scratch registers from audio function
     3860         * group to converter widget context. So CVT NID should be used for
     3861         * scratch register read/write for DP MST supported Tegra HDA codec.
     3862         */
     3863        if (codec->dp_mst)
     3864                nid = cvt_nid;
    37713865
    37723866        /* bits [31:30] contain the trigger and valid bits */
    3773         value = snd_hda_codec_read(codec, NVIDIA_AFG_NID, 0,
     3867        value = snd_hda_codec_read(codec, nid, 0,
    37743868                                   NVIDIA_GET_SCRATCH0, 0);
    37753869        value = (value >> 24) & 0xff;
    37763870
    37773871        /* bits [15:0] are used to store the HDA format */
    3778         snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0,
     3872        snd_hda_codec_write(codec, nid, 0,
    37793873                            NVIDIA_SET_SCRATCH0_BYTE0,
    37803874                            (format >> 0) & 0xff);
    3781         snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0,
     3875        snd_hda_codec_write(codec, nid, 0,
    37823876                            NVIDIA_SET_SCRATCH0_BYTE1,
    37833877                            (format >> 8) & 0xff);
    37843878
    37853879        /* bits [16:24] are unused */
    3786         snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0,
     3880        snd_hda_codec_write(codec, nid, 0,
    37873881                            NVIDIA_SET_SCRATCH0_BYTE2, 0);
    37883882
     
    37963890                value |= NVIDIA_SCRATCH_VALID;
    37973891
    3798         /*
    3799          * Whenever the trigger bit is toggled, an interrupt is raised in the
    3800          * HDMI codec. The HDMI driver will use that as trigger to update its
    3801          * configuration.
    3802          */
    3803         value ^= NVIDIA_SCRATCH_TRIGGER;
    3804 
    3805         snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0,
    3806                             NVIDIA_SET_SCRATCH0_BYTE3, value);
     3892        if (spec->hdmi_intr_trig_ctrl) {
     3893                /*
     3894                 * For Tegra HDA Codec design from TEGRA234 onwards, the
     3895                 * Interrupt to hdmi driver is triggered by writing
     3896                 * non-zero values to verb 0xF80 instead of 31st bit of
     3897                 * scratch register.
     3898                 */
     3899                snd_hda_codec_write(codec, nid, 0,
     3900                                NVIDIA_SET_SCRATCH0_BYTE3, value);
     3901                snd_hda_codec_write(codec, nid, 0,
     3902                                NVIDIA_SET_HOST_INTR, 0x1);
     3903        } else {
     3904                /*
     3905                 * Whenever the 31st trigger bit is toggled, an interrupt is raised
     3906                 * in the HDMI codec. The HDMI driver will use that as trigger
     3907                 * to update its configuration.
     3908                 */
     3909                value ^= NVIDIA_SCRATCH_TRIGGER;
     3910
     3911                snd_hda_codec_write(codec, nid, 0,
     3912                                NVIDIA_SET_SCRATCH0_BYTE3, value);
     3913        }
    38073914}
    38083915
     
    38213928
    38223929        /* notify the HDMI codec of the format change */
    3823         tegra_hdmi_set_format(codec, format);
     3930        tegra_hdmi_set_format(codec, hinfo->nid, format);
    38243931
    38253932        return 0;
     
    38313938{
    38323939        /* invalidate the format in the HDMI codec */
    3833         tegra_hdmi_set_format(codec, 0);
     3940        tegra_hdmi_set_format(codec, hinfo->nid, 0);
    38343941
    38353942        return generic_hdmi_playback_pcm_cleanup(hinfo, codec, substream);
     
    38763983}
    38773984
    3878 static int patch_tegra_hdmi(struct hda_codec *codec)
    3879 {
    3880         struct hdmi_spec *spec;
    3881         int err;
    3882 
    3883         err = patch_generic_hdmi(codec);
    3884         if (err)
     3985static int tegra_hdmi_init(struct hda_codec *codec)
     3986{
     3987        struct hdmi_spec *spec = codec->spec;
     3988        int i, err;
     3989
     3990        err = hdmi_parse_codec(codec);
     3991        if (err < 0) {
     3992                generic_spec_free(codec);
    38853993                return err;
     3994        }
     3995
     3996        for (i = 0; i < spec->num_cvts; i++)
     3997                snd_hda_codec_write(codec, spec->cvt_nids[i], 0,
     3998                                        AC_VERB_SET_DIGI_CONVERT_1,
     3999                                        AC_DIG1_ENABLE);
     4000
     4001        generic_hdmi_init_per_pins(codec);
    38864002
    38874003        codec->patch_ops.build_pcms = tegra_hdmi_build_pcms;
    3888         spec = codec->spec;
    38894004        spec->chmap.ops.chmap_cea_alloc_validate_get_type =
    38904005                nvhdmi_chmap_cea_alloc_validate_get_type;
    38914006        spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate;
    38924007
     4008        spec->chmap.ops.chmap_cea_alloc_validate_get_type =
     4009                nvhdmi_chmap_cea_alloc_validate_get_type;
     4010        spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate;
     4011
    38934012        return 0;
     4013}
     4014
     4015static int patch_tegra_hdmi(struct hda_codec *codec)
     4016{
     4017        int err;
     4018
     4019        err = alloc_generic_hdmi(codec);
     4020        if (err < 0)
     4021                return err;
     4022
     4023        return tegra_hdmi_init(codec);
     4024}
     4025
     4026static int patch_tegra234_hdmi(struct hda_codec *codec)
     4027{
     4028        struct hdmi_spec *spec;
     4029        int err;
     4030
     4031        err = alloc_generic_hdmi(codec);
     4032        if (err < 0)
     4033                return err;
     4034
     4035        codec->dp_mst = true;
     4036        codec->mst_no_extra_pcms = true;
     4037        spec = codec->spec;
     4038        spec->dyn_pin_out = true;
     4039        spec->dyn_pcm_assign = true;
     4040        spec->hdmi_intr_trig_ctrl = true;
     4041
     4042        return tegra_hdmi_init(codec);
    38944043}
    38954044
     
    43474496HDA_CODEC_ENTRY(0x10de002f, "Tegra194 HDMI/DP2", patch_tegra_hdmi),
    43484497HDA_CODEC_ENTRY(0x10de0030, "Tegra194 HDMI/DP3", patch_tegra_hdmi),
     4498HDA_CODEC_ENTRY(0x10de0031, "Tegra234 HDMI/DP", patch_tegra234_hdmi),
    43494499HDA_CODEC_ENTRY(0x10de0040, "GPU 40 HDMI/DP",   patch_nvhdmi),
    43504500HDA_CODEC_ENTRY(0x10de0041, "GPU 41 HDMI/DP",   patch_nvhdmi),
     
    44154565HDA_CODEC_ENTRY(0x80862815, "Alderlake HDMI",   patch_i915_tgl_hdmi),
    44164566HDA_CODEC_ENTRY(0x80862816, "Rocketlake HDMI",  patch_i915_tgl_hdmi),
    4417 HDA_CODEC_ENTRY(0x80862819, "DG2 HDMI", patch_i915_tgl_hdmi),
     4567HDA_CODEC_ENTRY(0x80862818, "Raptorlake HDMI",  patch_i915_tgl_hdmi),
     4568HDA_CODEC_ENTRY(0x80862819, "DG2 HDMI", patch_i915_adlp_hdmi),
    44184569HDA_CODEC_ENTRY(0x8086281a, "Jasperlake HDMI",  patch_i915_icl_hdmi),
    44194570HDA_CODEC_ENTRY(0x8086281b, "Elkhartlake HDMI", patch_i915_icl_hdmi),
    4420 HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_tgl_hdmi),
     4571HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_adlp_hdmi),
     4572HDA_CODEC_ENTRY(0x8086281f, "Raptorlake-P HDMI",        patch_i915_adlp_hdmi),
     4573HDA_CODEC_ENTRY(0x8086281d, "Meteorlake HDMI",  patch_i915_adlp_hdmi),
    44214574HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI",  patch_generic_hdmi),
    44224575HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi),
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_realtek.c

    r737 r738  
    455455        case 0x10ec0255:
    456456        case 0x10ec0256:
     457        case 0x19e58326:
    457458        case 0x10ec0257:
    458459        case 0x10ec0282:
     
    592593        case 0x10ec0236:
    593594        case 0x10ec0256:
     595        case 0x19e58326:
    594596        case 0x10ec0283:
    595597        case 0x10ec0286:
     
    31873189        SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
    31883190        SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
     3191        SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
    31893192        SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
    31903193        SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
     
    38973900        case 0x10ec0236:
    38983901        case 0x10ec0256:
     3902        case 0x19e58326:
    38993903                alc_write_coef_idx(codec, 0x48, 0x0);
    39003904                alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
     
    39253929        case 0x10ec0236:
    39263930        case 0x10ec0256:
     3931        case 0x19e58326:
    39273932                alc_write_coef_idx(codec, 0x48, 0xd011);
    39283933                alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
     
    56075612        case 0x10ec0236:
    56085613        case 0x10ec0256:
     5614        case 0x19e58326:
    56095615                alc_process_coef_fw(codec, coef0256);
    56105616                break;
     
    57225728        case 0x10ec0236:
    57235729        case 0x10ec0256:
     5730        case 0x19e58326:
    57245731                alc_write_coef_idx(codec, 0x45, 0xc489);
    57255732                snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
     
    58725879        case 0x10ec0236:
    58735880        case 0x10ec0256:
     5881        case 0x19e58326:
    58745882                alc_write_coef_idx(codec, 0x1b, 0x0e4b);
    58755883                alc_write_coef_idx(codec, 0x45, 0xc089);
     
    59715979        case 0x10ec0236:
    59725980        case 0x10ec0256:
     5981        case 0x19e58326:
    59735982                alc_process_coef_fw(codec, coef0256);
    59745983                break;
     
    60856094        case 0x10ec0236:
    60866095        case 0x10ec0256:
     6096        case 0x19e58326:
    60876097                alc_process_coef_fw(codec, coef0256);
    60886098                break;
     
    61866196        case 0x10ec0236:
    61876197        case 0x10ec0256:
     6198        case 0x19e58326:
    61886199                alc_write_coef_idx(codec, 0x1b, 0x0e4b);
    61896200                alc_write_coef_idx(codec, 0x06, 0x6104);
     
    64826493        case 0x10ec0236:
    64836494        case 0x10ec0256:
     6495        case 0x19e58326:
    64846496                alc_process_coef_fw(codec, alc256fw);
    64856497                break;
     
    70857097        case 0x10ec0255:
    70867098        case 0x10ec0256:
     7099        case 0x19e58326:
    70877100                alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
    70887101                alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
     
    72957308}
    72967309
    7297 static int comp_match_dev_name(struct device *dev, void *data)
    7298 {
    7299         return strcmp(dev_name(dev), data) == 0;
    7300 }
    7301 
    73027310static int find_comp_by_dev_name(struct alc_spec *spec, const char *name)
    73037311{
     
    73607368                        if (!name)
    73617369                                return;
    7362                         component_match_add(dev, &spec->match, comp_match_dev_name, name);
     7370                        component_match_add(dev, &spec->match, component_compare_dev_name, name);
    73637371                }
    73647372                ret = component_master_add_with_match(dev, &comp_master_ops, spec->match);
     
    73767384}
    73777385
     7386static void cs35l41_fixup_spi_two(struct hda_codec *codec, const struct hda_fixup *fix, int action)
     7387{
     7388        cs35l41_generic_fixup(codec, action, "spi0", "CSC3551", 2);
     7389}
     7390
     7391static void cs35l41_fixup_spi_four(struct hda_codec *codec, const struct hda_fixup *fix, int action)
     7392{
     7393        cs35l41_generic_fixup(codec, action, "spi0", "CSC3551", 4);
     7394}
     7395
    73787396static void alc287_legion_16achg6_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc,
    73797397                                                struct snd_pcm_substream *sub, int action)
     
    74097427        switch (action) {
    74107428        case HDA_FIXUP_ACT_PRE_PROBE:
    7411                 component_match_add(dev, &spec->match, comp_match_dev_name,
     7429                component_match_add(dev, &spec->match, component_compare_dev_name,
    74127430                                    "i2c-CLSA0100:00-cs35l41-hda.0");
    7413                 component_match_add(dev, &spec->match, comp_match_dev_name,
     7431                component_match_add(dev, &spec->match, component_compare_dev_name,
    74147432                                    "i2c-CLSA0100:00-cs35l41-hda.1");
    74157433                ret = component_master_add_with_match(dev, &comp_master_ops, spec->match);
     
    75197537                        }
    75207538                }
     7539                break;
     7540        }
     7541}
     7542
     7543static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec,
     7544                                          const struct hda_fixup *fix, int action)
     7545{
     7546        /*
     7547         * The Pin Complex 0x17 for the bass speakers is wrongly reported as
     7548         * unconnected.
     7549         */
     7550        static const struct hda_pintbl pincfgs[] = {
     7551                { 0x17, 0x90170121 },
     7552                {0}
     7553        };
     7554        /*
     7555         * Avoid DAC 0x06 and 0x08, as they have no volume controls.
     7556         * DAC 0x02 and 0x03 would be fine.
     7557         */
     7558        static const hda_nid_t conn[] = { 0x02, 0x03 };
     7559        /*
     7560         * Prefer both speakerbar (0x14) and bass speakers (0x17) connected to DAC 0x02.
     7561         * Headphones (0x21) are connected to DAC 0x03.
     7562         */
     7563        static const hda_nid_t preferred_pairs[] = {
     7564                0x14, 0x02,
     7565                0x17, 0x02,
     7566                0x21, 0x03,
     7567                0
     7568        };
     7569        struct alc_spec *spec = codec->spec;
     7570
     7571        switch (action) {
     7572        case HDA_FIXUP_ACT_PRE_PROBE:
     7573                snd_hda_apply_pincfgs(codec, pincfgs);
     7574                snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
     7575                spec->gen.preferred_dacs = preferred_pairs;
    75217576                break;
    75227577        }
     
    75787633        ALC269VB_FIXUP_ASUS_ZENBOOK,
    75797634        ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A,
     7635        ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE,
    75807636        ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED,
    75817637        ALC269VB_FIXUP_ORDISSIMO_EVE2,
     
    76377693        ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER,
    76387694        ALC269_FIXUP_ATIV_BOOK_8,
     7695        ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE,
    76397696        ALC221_FIXUP_HP_MIC_NO_PRESENCE,
    76407697        ALC256_FIXUP_ASUS_HEADSET_MODE,
     
    77417798        ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
    77427799        ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
     7800        ALC298_FIXUP_LENOVO_C940_DUET7,
    77437801        ALC287_FIXUP_13S_GEN2_SPEAKERS,
    77447802        ALC256_FIXUP_SET_COEF_DEFAULTS,
     
    77507808        ALC287_FIXUP_LEGION_16ACHG6,
    77517809        ALC287_FIXUP_CS35L41_I2C_2,
     7810        ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED,
     7811        ALC245_FIXUP_CS35L41_SPI_2,
     7812        ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED,
     7813        ALC245_FIXUP_CS35L41_SPI_4,
     7814        ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED,
    77527815        ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED,
    77537816        ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE,
    7754 };
     7817        ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
     7818        ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN,
     7819};
     7820
     7821/* A special fixup for Lenovo C940 and Yoga Duet 7;
     7822 * both have the very same PCI SSID, and we need to apply different fixups
     7823 * depending on the codec ID
     7824 */
     7825static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
     7826                                           const struct hda_fixup *fix,
     7827                                           int action)
     7828{
     7829        int id;
     7830
     7831        if (codec->core.vendor_id == 0x10ec0298)
     7832                id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */
     7833        else
     7834                id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */
     7835        __snd_hda_apply_fixup(codec, id, action, 0);
     7836}
    77557837
    77567838#ifdef TARGET_OS2
     
    83928474                .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK,
    83938475        },
     8476#ifdef TARGET_OS2xxxx
     8477        [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = {
     8478                .type = HDA_FIXUP_PINS,
     8479                .v.pins = (const struct hda_pintbl[]) {
     8480                        { 0x18, 0x01a110f0 },  /* use as headset mic */
     8481                        { }
     8482                },
     8483                .chained = true,
     8484                .chain_id = ALC269_FIXUP_HEADSET_MIC
     8485        },
     8486#endif
    83948487        [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
    83958488                .type = HDA_FIXUP_FUNC,
     
    88488941        },
    88498942#ifdef TARGET_OS2xxx
     8943        [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = {
     8944                .type = HDA_FIXUP_PINS,
     8945                .v.pins = (const struct hda_pintbl[]) {
     8946                        { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
     8947                        { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
     8948                        { }
     8949                },
     8950                .chained = true,
     8951                .chain_id = ALC269_FIXUP_HEADSET_MODE
     8952        },
    88508953        [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = {
    88518954                .type = HDA_FIXUP_PINS,
     
    97669869                .chained = true,
    97679870                .chain_id = ALC269_FIXUP_HEADSET_MODE,
     9871        },
     9872        [ALC298_FIXUP_LENOVO_C940_DUET7] = {
     9873                .type = HDA_FIXUP_FUNC,
     9874                .v.func = alc298_fixup_lenovo_c940_duet7,
    97689875        },
    97699876        [ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
     
    98299936                .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
    98309937        },
     9938        [ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED] = {
     9939                .type = HDA_FIXUP_FUNC,
     9940                .v.func = cs35l41_fixup_i2c_two,
     9941                .chained = true,
     9942                .chain_id = ALC285_FIXUP_HP_MUTE_LED,
     9943        },
     9944        [ALC245_FIXUP_CS35L41_SPI_2] = {
     9945                .type = HDA_FIXUP_FUNC,
     9946                .v.func = cs35l41_fixup_spi_two,
     9947        },
     9948        [ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED] = {
     9949                .type = HDA_FIXUP_FUNC,
     9950                .v.func = cs35l41_fixup_spi_two,
     9951                .chained = true,
     9952                .chain_id = ALC285_FIXUP_HP_GPIO_LED,
     9953        },
     9954        [ALC245_FIXUP_CS35L41_SPI_4] = {
     9955                .type = HDA_FIXUP_FUNC,
     9956                .v.func = cs35l41_fixup_spi_four,
     9957        },
     9958        [ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED] = {
     9959                .type = HDA_FIXUP_FUNC,
     9960                .v.func = cs35l41_fixup_spi_four,
     9961                .chained = true,
     9962                .chain_id = ALC285_FIXUP_HP_GPIO_LED,
     9963        },
    98319964#ifdef TARGET_OS2xxx
    98329965        [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = {
     
    98579990                .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
    98589991        },
    9859 #endif
     9992        [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK] = {
     9993                .type = HDA_FIXUP_VERBS,
     9994                .v.verbs = (const struct hda_verb[]) {
     9995                        // enable left speaker
     9996                        { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
     9997                        { 0x20, AC_VERB_SET_PROC_COEF, 0x41 },
     9998
     9999                        { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
     10000                        { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
     10001                        { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
     10002                        { 0x20, AC_VERB_SET_PROC_COEF, 0x1a },
     10003                        { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
     10004
     10005                        { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
     10006                        { 0x20, AC_VERB_SET_PROC_COEF, 0xf },
     10007                        { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
     10008                        { 0x20, AC_VERB_SET_PROC_COEF, 0x42 },
     10009                        { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
     10010
     10011                        { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
     10012                        { 0x20, AC_VERB_SET_PROC_COEF, 0x10 },
     10013                        { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
     10014                        { 0x20, AC_VERB_SET_PROC_COEF, 0x40 },
     10015                        { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
     10016
     10017                        { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
     10018                        { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
     10019                        { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
     10020                        { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
     10021                        { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
     10022
     10023                        // enable right speaker
     10024                        { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 },
     10025                        { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
     10026
     10027                        { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
     10028                        { 0x20, AC_VERB_SET_PROC_COEF, 0xc },
     10029                        { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
     10030                        { 0x20, AC_VERB_SET_PROC_COEF, 0x2a },
     10031                        { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
     10032
     10033                        { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
     10034                        { 0x20, AC_VERB_SET_PROC_COEF, 0xf },
     10035                        { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
     10036                        { 0x20, AC_VERB_SET_PROC_COEF, 0x46 },
     10037                        { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
     10038
     10039                        { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
     10040                        { 0x20, AC_VERB_SET_PROC_COEF, 0x10 },
     10041                        { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
     10042                        { 0x20, AC_VERB_SET_PROC_COEF, 0x44 },
     10043                        { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
     10044
     10045                        { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 },
     10046                        { 0x20, AC_VERB_SET_PROC_COEF, 0x2 },
     10047                        { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
     10048                        { 0x20, AC_VERB_SET_PROC_COEF, 0x0 },
     10049                        { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 },
     10050
     10051                        { },
     10052                },
     10053        },
     10054#endif
     10055        [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN] = {
     10056                .type = HDA_FIXUP_FUNC,
     10057                .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
     10058                .chained = true,
     10059                .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
     10060        },
    986010061};
    986110062
     
    989010091        SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
    989110092        SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
     10093        SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
    989210094        SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
    989310095        SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
     
    989910101        SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
    990010102        SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
     10103        SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
    990110104        SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
    990210105        SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
     
    1001410217        SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
    1001510218        SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
     10219        SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE),
    1001610220        SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
    1001710221        SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
     
    1003410238        SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
    1003510239        SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
     10240        SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
     10241        SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
    1003610242        SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
    1003710243        SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
     
    1004910255        SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
    1005010256                      ALC285_FIXUP_HP_GPIO_AMP_INIT),
     10257        SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
     10258        SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
    1005110259        SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
    1005210260        SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
     
    1007710285        SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
    1007810286        SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
    10079         SND_PCI_QUIRK(0x103c, 0x89c3, "HP", ALC285_FIXUP_HP_GPIO_LED),
     10287        SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
     10288        SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
     10289        SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
     10290        SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
     10291        SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
     10292        SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
     10293        SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4),
     10294        SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
     10295        SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
     10296        SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
     10297        SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2),
     10298        SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
     10299        SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2),
     10300        SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED),
     10301        SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED),
     10302        SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED),
     10303        SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED),
     10304        SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED),
     10305        SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
     10306        SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
    1008010307        SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
    1008110308        SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
     10309        SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED),
     10310        SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED),
     10311        SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED),
     10312        SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED),
    1008210313        SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
    1008310314        SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
     
    1009410325        SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC),
    1009510326        SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC),
     10327        SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
    1009610328        SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC),
    1009710329        SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
     
    1016910401        SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
    1017010402        SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
     10403        SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
    1017110404        SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
    1017210405        SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
     
    1019510428        SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
    1019610429        SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
     10430        SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
     10431        SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
    1019710432        SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
    1019810433        SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
     
    1027910514        SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
    1028010515        SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
     10516        SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
    1028110517        SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
    1028210518        SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
    10283         SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
     10519        SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
    1028410520        SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
    1028510521        SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
     
    1033710573        SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
    1033810574        SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
     10575        SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
    1033910576        SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
    1034010577        SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
     
    1052310760        {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
    1052410761        {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
     10762        {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
    1052510763        {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
    1052610764        {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
     
    1112111359        case 0x10ec0236:
    1112211360        case 0x10ec0256:
     11361        case 0x19e58326:
    1112311362                spec->codec_variant = ALC269_TYPE_ALC256;
    1112411363                spec->shutup = alc256_shutup;
     
    1178712026        ALC897_FIXUP_LENOVO_HEADSET_MIC,
    1178812027        ALC897_FIXUP_HEADSET_MIC_PIN,
     12028        ALC897_FIXUP_HP_HSMIC_VERB,
    1178912029};
    1179012030
     
    1239312633                .chained = true,
    1239412634                .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC
     12635        },
     12636        [ALC897_FIXUP_HP_HSMIC_VERB] = {
     12637                .type = HDA_FIXUP_PINS,
     12638                .v.pins = (const struct hda_pintbl[]) {
     12639                        { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
     12640                        { }
     12641                },
    1239512642        },
    1239612643#endif
     
    1242012667        SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
    1242112668        SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
     12669        SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
    1242212670        SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2),
     12671        SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2),
    1242312672        SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2),
    1242412673        SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE),
     
    1280213051        HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
    1280313052        HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
     13053        HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
    1280413054        {0} /* terminator */
    1280513055};
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_via.c

    r736 r738  
    529529                return err;
    530530
     531        err = auto_parse_beep(codec);
     532        if (err < 0)
     533                return err;
     534
    531535        err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);
    532         if (err < 0)
    533                 return err;
    534 
    535         err = auto_parse_beep(codec);
    536536        if (err < 0)
    537537                return err;
  • GPL/branches/uniaud32-exp/include/linux/component.h

    r737 r738  
    8383};
    8484
     85int component_compare_dev_name(struct device *dev, void *data);
     86
    8587void component_master_del(struct device *,
    8688        const struct component_master_ops *);
  • GPL/branches/uniaud32-exp/include/linux/device.h

    r737 r738  
    348348int device_match_of_node(struct device *dev, const void *np);
    349349
     350char *devm_kasprintf(struct device *dev, gfp_t gfp,
     351                                    const char *fmt, ...);
     352
    350353#endif /* _LINUX_DEVICE_H */
    351354
Note: See TracChangeset for help on using the changeset viewer.