Changeset 738
- Timestamp:
- Sep 18, 2022, 7:57:04 AM (3 years ago)
- Location:
- GPL/branches/uniaud32-exp
- Files:
-
- 29 edited
-
alsa-kernel/core/oss/pcm_oss.c (modified) (6 diffs)
-
alsa-kernel/core/seq/oss/seq_oss_init.c (modified) (2 diffs)
-
alsa-kernel/hda/ext/hdac_ext_controller.c (modified) (3 diffs)
-
alsa-kernel/hda/hdac_device.c (modified) (1 diff)
-
alsa-kernel/include/sound/hda_codec.h (modified) (2 diffs)
-
alsa-kernel/include/sound/hda_verbs.h (modified) (1 diff)
-
alsa-kernel/include/sound/hdaudio.h (modified) (2 diffs)
-
alsa-kernel/include/sound/hdaudio_ext.h (modified) (3 diffs)
-
alsa-kernel/include/sound/simple_card_utils.h (modified) (3 diffs)
-
alsa-kernel/include/sound/soc-acpi.h (modified) (5 diffs)
-
alsa-kernel/include/sound/soc-component.h (modified) (1 diff)
-
alsa-kernel/include/sound/soc-dapm.h (modified) (1 diff)
-
alsa-kernel/include/sound/sof.h (modified) (1 diff)
-
alsa-kernel/include/sound/version.h (modified) (1 diff)
-
alsa-kernel/pci/ca0106/ca0106.h (modified) (5 diffs)
-
alsa-kernel/pci/ca0106/ca0106_main.c (modified) (16 diffs)
-
alsa-kernel/pci/ca0106/ca0106_mixer.c (modified) (3 diffs)
-
alsa-kernel/pci/cs46xx/cs46xx.c (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_auto_parser.c (modified) (4 diffs)
-
alsa-kernel/pci/hda/hda_codec.c (modified) (12 diffs)
-
alsa-kernel/pci/hda/hda_intel.c (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_local.h (modified) (2 diffs)
-
alsa-kernel/pci/hda/patch_cirrus.c (modified) (1 diff)
-
alsa-kernel/pci/hda/patch_conexant.c (modified) (5 diffs)
-
alsa-kernel/pci/hda/patch_hdmi.c (modified) (19 diffs)
-
alsa-kernel/pci/hda/patch_realtek.c (modified) (44 diffs)
-
alsa-kernel/pci/hda/patch_via.c (modified) (1 diff)
-
include/linux/component.h (modified) (1 diff)
-
include/linux/device.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-exp/alsa-kernel/core/oss/pcm_oss.c
r711 r738 852 852 } 853 853 854 static 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 854 865 /* call with params_lock held */ 855 866 static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream) … … 982 993 if (!direct) { 983 994 /* add necessary plugins */ 984 snd_pcm_oss_plugin_clear(substream);985 995 err = snd_pcm_plug_format_plugins(substream, params, sparams); 986 996 if (err < 0) { 987 997 pcm_dbg(substream->pcm, 988 998 "snd_pcm_plug_format_plugins failed: %i\n", err); 989 snd_pcm_oss_plugin_clear(substream);990 999 goto failure; 991 1000 } … … 996 1005 pcm_dbg(substream->pcm, 997 1006 "snd_pcm_plugin_build_io failed: %i\n", err); 998 snd_pcm_oss_plugin_clear(substream);999 1007 goto failure; 1000 1008 } … … 1004 1012 err = snd_pcm_plugin_insert(plugin); 1005 1013 } 1006 if (err < 0) { 1007 snd_pcm_oss_plugin_clear(substream); 1014 if (err < 0) 1008 1015 goto failure; 1009 }1010 1016 } 1011 1017 } … … 1096 1102 err = 0; 1097 1103 failure: 1104 if (err) 1105 snd_pcm_oss_release_buffers(substream); 1098 1106 kfree(sw_params); 1099 1107 kfree(params); … … 2369 2377 static void snd_pcm_oss_release_substream(struct snd_pcm_substream *substream) 2370 2378 { 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); 2378 2380 substream->oss.oss = 0; 2379 2381 } -
GPL/branches/uniaud32-exp/alsa-kernel/core/seq/oss/seq_oss_init.c
r697 r738 67 67 struct snd_seq_port_callback port_callback; 68 68 69 port = k malloc(sizeof(*port), GFP_KERNEL);69 port = kzalloc(sizeof(*port), GFP_KERNEL); 70 70 if (!port) { 71 71 rc = -ENOMEM; … … 81 81 system_client = rc; 82 82 83 /* create annoucement receiver port */ 84 memset(port, 0, sizeof(*port)); 83 /* create announcement receiver port */ 85 84 strcpy(port->name, "Receiver"); 86 85 port->addr.client = system_client; -
GPL/branches/uniaud32-exp/alsa-kernel/hda/ext/hdac_ext_controller.c
r693 r738 134 134 135 135 /** 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 */ 142 struct 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 } 153 EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_link_at); 154 155 /** 136 156 * snd_hdac_ext_bus_get_link - get link based on codec name 137 157 * @bus: the pointer to HDAC bus object … … 141 161 const char *codec_name) 142 162 { 143 int i;144 struct hdac_ext_link *hlink = NULL;145 163 int bus_idx, addr; 146 164 … … 152 170 return NULL; 153 171 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); 162 173 } 163 174 EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_get_link); -
GPL/branches/uniaud32-exp/alsa-kernel/hda/hdac_device.c
r736 r738 675 675 { 0x17e8, "Chrontel" }, 676 676 { 0x1854, "LG" }, 677 { 0x19e5, "Huawei" }, 677 678 { 0x1aec, "Wolfson Microelectronics" }, 678 679 { 0x1af4, "QEMU" }, -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hda_codec.h
r711 r738 307 307 * constructors 308 308 */ 309 #ifndef TARGET_OS2 310 __printf(3, 4) 311 #endif 312 struct hda_codec * 313 snd_hda_codec_device_init(struct hda_bus *bus, unsigned int codec_addr, 314 const char *fmt, ...); 309 315 int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card, 310 316 unsigned int codec_addr, struct hda_codec **codecp); 311 317 int 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); 313 320 int snd_hda_codec_configure(struct hda_codec *codec); 314 321 int snd_hda_codec_update_widgets(struct hda_codec *codec); 322 void snd_hda_codec_register(struct hda_codec *codec); 323 void snd_hda_codec_unregister(struct hda_codec *codec); 324 void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec); 315 325 316 326 /* … … 493 503 #define snd_hda_power_down_pm(codec) snd_hdac_power_down_pm(&(codec)->core) 494 504 #ifdef CONFIG_PM 505 void snd_hda_codec_set_power_save(struct hda_codec *codec, int delay); 495 506 void snd_hda_set_power_save(struct hda_bus *bus, int delay); 496 507 void snd_hda_update_power_acct(struct hda_codec *codec); 497 508 #else 509 static inline void snd_hda_codec_set_power_save(struct hda_codec *codec, int delay) {} 498 510 static inline void snd_hda_set_power_save(struct hda_bus *bus, int delay) {} 499 511 #endif -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hda_verbs.h
r615 r738 462 462 #define AC_DE_IA (1<<2) 463 463 464 /* device devicetypes (0x0-0xf) */464 /* device types (0x0-0xf) */ 465 465 enum { 466 466 AC_JACK_LINE_OUT, -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hdaudio.h
r737 r738 10 10 #include <linux/interrupt.h> 11 11 #include <linux/io.h> 12 #include <linux/io-64-nonatomic-lo-hi.h> 12 13 #include <linux/pm_runtime.h> 13 14 #include <linux/timecounter.h> … … 460 461 #define snd_hdac_reg_writel(bus, addr, val) writel(val, addr) 461 462 #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) 462 465 463 466 /* -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hdaudio_ext.h
r737 r738 3 3 #define __SOUND_HDAUDIO_EXT_H 4 4 5 #include <linux/io-64-nonatomic-lo-hi.h> 6 #include <linux/iopoll.h> 5 7 #include <sound/hdaudio.h> 6 8 … … 29 31 30 32 int snd_hdac_ext_bus_get_ml_capabilities(struct hdac_bus *bus); 33 struct hdac_ext_link *snd_hdac_ext_bus_link_at(struct hdac_bus *bus, int addr); 31 34 struct hdac_ext_link *snd_hdac_ext_bus_get_link(struct hdac_bus *bus, 32 35 const char *codec_name); … … 144 147 addr + reg) 145 148 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) 146 197 147 198 struct hdac_ext_device; -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/simple_card_utils.h
r736 r738 16 16 #define asoc_simple_init_mic(card, sjack, prefix) \ 17 17 asoc_simple_init_jack(card, sjack, 0, prefix, NULL) 18 19 struct asoc_simple_tdm_width_map { 20 u8 sample_bits; 21 u8 slot_count; 22 u16 slot_width; 23 }; 18 24 19 25 struct asoc_simple_dai { … … 26 32 unsigned int rx_slot_mask; 27 33 struct clk *clk; 34 bool clk_fixed; 35 struct asoc_simple_tdm_width_map *tdm_width_map; 36 int n_tdm_widths; 28 37 }; 29 38 … … 132 141 char *prefix, 133 142 unsigned int *retfmt); 143 int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np, 144 struct asoc_simple_dai *dai); 145 134 146 __printf(3, 4) 135 147 int asoc_simple_set_dailink_name(struct device *dev, -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-acpi.h
r736 r738 61 61 * @platform: string used for HDAudio codec support 62 62 * @codec_mask: used for HDAudio support 63 * @dmic_num: number of SoC- or chipset-attached PDM digital microphones 63 64 * @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 66 68 * @num_dai_drivers: number of elements in @dai_drivers 67 69 * @dai_drivers: pointer to dai_drivers, used e.g. in nocodec mode … … 75 77 u32 link_mask; 76 78 const struct snd_soc_acpi_link_adr *links; 79 u32 i2s_link_mask; 77 80 u32 num_dai_drivers; 78 81 struct snd_soc_dai_driver *dai_drivers; … … 122 125 const struct snd_soc_acpi_adr_device *adr_d; 123 126 }; 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) 124 145 125 146 /** … … 143 164 * @pdata: intended for platform data or machine specific-ops. This structure 144 165 * is not constant since this field may be updated at run-time 145 * @sof_fw_filename: Sound Open Firmware file name, if enabled146 166 * @sof_tplg_filename: Sound Open Firmware topology file name, if enabled 167 * @tplg_quirk_mask: quirks to select different topology files dynamically 147 168 */ 148 169 /* Descriptor for SST ASoC machine driver */ … … 159 180 void *pdata; 160 181 struct snd_soc_acpi_mach_params mach_params; 161 const char *sof_fw_filename;162 182 const char *sof_tplg_filename; 183 const u32 tplg_quirk_mask; 163 184 }; 164 185 -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-component.h
r737 r738 180 180 bool use_dai_pcm_id; /* use DAI link PCM ID as PCM device number */ 181 181 int be_pcm_base; /* base device ID for all BE PCMs */ 182 183 #ifdef CONFIG_DEBUG_FS 184 const char *debugfs_prefix; 185 #endif 182 186 }; 183 187 -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-dapm.h
r629 r738 430 430 int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, 431 431 struct snd_soc_dai *dai); 432 void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w); 432 433 int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card); 433 434 void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card); -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/sof.h
r737 r738 38 38 SOF_FW_BOOT_COMPLETE, 39 39 SOF_FW_CRASHED, 40 }; 41 42 /* DSP power states */ 43 enum sof_dsp_power_states { 44 SOF_DSP_PM_D0, 45 SOF_DSP_PM_D1, 46 SOF_DSP_PM_D2, 47 SOF_DSP_PM_D3, 40 48 }; 41 49 -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/version.h
r737 r738 1 1 /* include/version.h */ 2 #define CONFIG_SND_VERSION "5.1 7.15"2 #define CONFIG_SND_VERSION "5.18.19" 3 3 #define CONFIG_SND_DATE "" -
GPL/branches/uniaud32-exp/alsa-kernel/pci/ca0106/ca0106.h
r710 r738 60 60 /************************************************************************************************/ 61 61 62 #define PTR0x00 /* Indexed register set pointer register */62 #define CA0106_PTR 0x00 /* Indexed register set pointer register */ 63 63 /* NOTE: The CHANNELNUM and ADDRESS words can */ 64 64 /* be modified independently of each other. */ 65 65 /* CNL[1:0], ADDR[27:16] */ 66 66 67 #define DATA0x04 /* Indexed register set data register */67 #define CA0106_DATA 0x04 /* Indexed register set data register */ 68 68 /* DATA[31:0] */ 69 69 70 #define IPR0x08 /* Global interrupt pending register */70 #define CA0106_IPR 0x08 /* Global interrupt pending register */ 71 71 /* Clear pending interrupts by writing a 1 to */ 72 72 /* the relevant bits and zero to the other bits */ … … 89 89 #define IPR_PCI 0x00000001 /* PCI Bus error */ 90 90 91 #define INTE0x0c /* Interrupt enable register */91 #define CA0106_INTE 0x0c /* Interrupt enable register */ 92 92 93 93 #define INTE_MIDI_RX_B 0x00020000 /* MIDI UART-B Receive buffer non-empty */ … … 109 109 #define INTE_PCI 0x00000001 /* PCI Bus error */ 110 110 111 #define UNKNOWN100x10 /* Unknown ??. Defaults to 0 */112 #define HCFG0x14 /* Hardware config register */111 #define CA0106_UNKNOWN10 0x10 /* Unknown ??. Defaults to 0 */ 112 #define CA0106_HCFG 0x14 /* Hardware config register */ 113 113 /* 0x1000 causes AC3 to fails. It adds a dither bit. */ 114 114 … … 134 134 /* Should be set to 1 when the EMU10K1 is */ 135 135 /* completely initialized. */ 136 #define GPIO0x18 /* Defaults: 005f03a3-Analog, 005f02a2-SPDIF. */136 #define CA0106_GPIO 0x18 /* Defaults: 005f03a3-Analog, 005f02a2-SPDIF. */ 137 137 /* Here pins 0,1,2,3,4,,6 are output. 5,7 are input */ 138 138 /* For the Audigy LS, pin 0 (or bit 8) controls the SPDIF/Analog jack. */ … … 153 153 * GPO Enable [23:16] Default 0x0f. Setting a bit to 1, causes the pin to be an output pin. 154 154 */ 155 #define AC97DATA 0x1c /* AC97 register set data register (16 bit) */156 157 #define AC97ADDRESS0x1e /* 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) */ 158 158 159 159 /********************************************************************************************************/ -
GPL/branches/uniaud32-exp/alsa-kernel/pci/ca0106/ca0106_main.c
r737 r738 343 343 344 344 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); 347 347 spin_unlock_irqrestore(&emu->emu_lock, flags); 348 348 return val; … … 360 360 361 361 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); 364 364 spin_unlock_irqrestore(&emu->emu_lock, flags); 365 365 } … … 460 460 461 461 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); 464 464 spin_unlock_irqrestore(&emu->emu_lock, flags); 465 465 } … … 471 471 472 472 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); 475 475 spin_unlock_irqrestore(&emu->emu_lock, flags); 476 476 } … … 791 791 break; 792 792 } 793 hcfg = inl(emu->port + HCFG) ;793 hcfg = inl(emu->port + CA0106_HCFG) ; 794 794 hcfg = (hcfg & ~hcfg_mask) | hcfg_set; 795 outl(hcfg, emu->port + HCFG);795 outl(hcfg, emu->port + CA0106_HCFG); 796 796 reg40 = snd_ca0106_ptr_read(emu, 0x40, 0); 797 797 reg40 = (reg40 & ~reg40_mask) | reg40_set; … … 893 893 break; 894 894 } 895 hcfg = inl(emu->port + HCFG) ;895 hcfg = inl(emu->port + CA0106_HCFG) ; 896 896 hcfg = (hcfg & ~hcfg_mask) | hcfg_set; 897 outl(hcfg, emu->port + HCFG);897 outl(hcfg, emu->port + CA0106_HCFG); 898 898 reg71 = snd_ca0106_ptr_read(emu, 0x71, 0); 899 899 reg71 = (reg71 & ~reg71_mask) | reg71_set; … … 1147 1147 1148 1148 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); 1151 1151 spin_unlock_irqrestore(&emu->emu_lock, flags); 1152 1152 return val; … … 1160 1160 1161 1161 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); 1164 1164 spin_unlock_irqrestore(&emu->emu_lock, flags); 1165 1165 } … … 1205 1205 struct snd_ca0106_channel *pchannel; 1206 1206 1207 status = inl(chip->port + IPR);1207 status = inl(chip->port + CA0106_IPR); 1208 1208 if (! status) 1209 1209 return IRQ_NONE; … … 1260 1260 1261 1261 // acknowledge the interrupt if necessary 1262 outl(status, chip->port +IPR);1262 outl(status, chip->port + CA0106_IPR); 1263 1263 1264 1264 return IRQ_HANDLED; … … 1388 1388 unsigned int def_bits; 1389 1389 1390 outl(0, chip->port + INTE);1390 outl(0, chip->port + CA0106_INTE); 1391 1391 1392 1392 /* … … 1425 1425 1426 1426 /* 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); 1429 1429 #if 0 /* FIXME: what are these? */ 1430 1430 snd_ca0106_ptr_write(chip, SPCS0, 0, 0x2108006); … … 1500 1500 * E.g. For digital spdif out. 1501 1501 */ 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 */ 1505 1505 } else if (chip->details->gpio_type == 1) { 1506 1506 /* The SB0410 and SB0413 use GPIO differently. */ … … 1508 1508 * E.g. For digital spdif out. 1509 1509 */ 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 */ 1513 1513 } 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 */ 1517 1517 } 1518 1518 snd_ca0106_intr_enable(chip, 0x105); /* Win2000 uses 0x1e0 */ … … 1520 1520 /* outl(HCFG_LOCKSOUNDCACHE|HCFG_AUDIOENABLE, chip->port+HCFG); */ 1521 1521 /* 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); */ 1524 1524 /* AC97 2.0, Enable outputs. */ 1525 outl(HCFG_AC97 | HCFG_AUDIOENABLE, chip->port +HCFG);1525 outl(HCFG_AC97 | HCFG_AUDIOENABLE, chip->port + CA0106_HCFG); 1526 1526 1527 1527 if (chip->details->i2c_adc == 1) { … … 1565 1565 /* disable interrupts */ 1566 1566 snd_ca0106_ptr_write(chip, BASIC_INTERRUPT, 0, 0); 1567 outl(0, chip->port + INTE);1567 outl(0, chip->port + CA0106_INTE); 1568 1568 snd_ca0106_ptr_write(chip, EXTENDED_INT_MASK, 0, 0); 1569 1569 udelay(1000); 1570 1570 /* disable audio */ 1571 1571 /* outl(HCFG_LOCKSOUNDCACHE, chip->port + HCFG); */ 1572 outl(0, chip->port + HCFG);1572 outl(0, chip->port + CA0106_HCFG); 1573 1573 /* FIXME: We need to stop and DMA transfers here. 1574 1574 * 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 71 71 val = snd_ca0106_ptr_read(emu, CAPTURE_CONTROL, 0) & ~0x1000; 72 72 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); 75 75 76 76 } else { … … 80 80 val = snd_ca0106_ptr_read(emu, CAPTURE_CONTROL, 0) | 0x1000; 81 81 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); 84 84 } 85 85 } … … 120 120 if (emu->capture_mic_line_in) { 121 121 /* 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; 123 123 tmp = tmp | 0x400; 124 outl(tmp, emu->port +GPIO);124 outl(tmp, emu->port + CA0106_GPIO); 125 125 /* snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_MIC); */ 126 126 } else { 127 127 /* 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); 130 130 /* snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_LINEIN); */ 131 131 } -
GPL/branches/uniaud32-exp/alsa-kernel/pci/cs46xx/cs46xx.c
r736 r738 82 82 external_amp[dev], thinkpad[dev]); 83 83 if (err < 0) 84 return err;84 goto error; 85 85 card->private_data = chip; 86 86 chip->accept_valid = mmap_valid[dev]; 87 87 err = snd_cs46xx_pcm(chip, 0); 88 88 if (err < 0) 89 return err;89 goto error; 90 90 #ifdef CONFIG_SND_CS46XX_NEW_DSP 91 91 err = snd_cs46xx_pcm_rear(chip, 1); 92 92 if (err < 0) 93 return err;93 goto error; 94 94 err = snd_cs46xx_pcm_iec958(chip, 2); 95 95 if (err < 0) 96 return err;96 goto error; 97 97 #endif 98 98 err = snd_cs46xx_mixer(chip, 2); 99 99 if (err < 0) 100 return err;100 goto error; 101 101 #ifdef CONFIG_SND_CS46XX_NEW_DSP 102 102 if (chip->nr_ac97_codecs ==2) { 103 103 err = snd_cs46xx_pcm_center_lfe(chip, 3); 104 104 if (err < 0) 105 return err;105 goto error; 106 106 } 107 107 #endif 108 108 err = snd_cs46xx_midi(chip, 0); 109 109 if (err < 0) 110 return err;110 goto error; 111 111 err = snd_cs46xx_start_dsp(chip); 112 112 if (err < 0) 113 return err;113 goto error; 114 114 115 115 snd_cs46xx_gameport(chip); … … 125 125 err = snd_card_register(card); 126 126 if (err < 0) 127 return err;127 goto error; 128 128 129 129 pci_set_drvdata(pci, card); 130 130 dev++; 131 131 return 0; 132 133 error: 134 snd_card_free(card); 135 return err; 132 136 } 133 137 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_auto_parser.c
r737 r738 833 833 } 834 834 835 static voidapply_fixup(struct hda_codec *codec, int id, int action, int depth)835 void __snd_hda_apply_fixup(struct hda_codec *codec, int id, int action, int depth) 836 836 { 837 837 const char *modelname = codec->fixup_name; … … 843 843 break; 844 844 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); 846 846 847 847 switch (fix->type) { … … 884 884 } 885 885 } 886 EXPORT_SYMBOL_GPL(__snd_hda_apply_fixup); 886 887 887 888 /** … … 893 894 { 894 895 if (codec->fixup_list) 895 apply_fixup(codec, codec->fixup_id, action, 0);896 __snd_hda_apply_fixup(codec, codec->fixup_id, action, 0); 896 897 } 897 898 EXPORT_SYMBOL_GPL(snd_hda_apply_fixup); -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_codec.c
r713 r738 779 779 } 780 780 781 /** 782 * snd_hda_codec_cleanup_for_unbind - Prepare codec for removal 783 * @codec: codec device to cleanup 784 */ 781 785 void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec) 782 786 { … … 826 830 } 827 831 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 */ 829 838 void snd_hda_codec_register(struct hda_codec *codec) 830 839 { … … 839 848 } 840 849 } 850 EXPORT_SYMBOL_GPL(snd_hda_codec_register); 841 851 842 852 static int snd_hda_codec_dev_register(struct snd_device *device) … … 846 856 } 847 857 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 */ 862 void snd_hda_codec_unregister(struct hda_codec *codec) 863 { 852 864 codec->in_freeing = 1; 853 865 /* … … 866 878 if (codec->core.type == HDA_DEV_LEGACY) 867 879 put_device(hda_codec_dev(codec)); 868 880 } 881 EXPORT_SYMBOL_GPL(snd_hda_codec_unregister); 882 883 static int snd_hda_codec_dev_free(struct snd_device *device) 884 { 885 snd_hda_codec_unregister(device->device_data); 869 886 return 0; 870 887 } … … 890 907 #define DEV_NAME_LEN 31 891 908 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 */ 917 struct hda_codec * 918 snd_hda_codec_device_init(struct hda_bus *bus, unsigned int codec_addr, 919 const char *fmt, ...) 920 { 921 va_list vargs; 895 922 char name[DEV_NAME_LEN]; 896 923 struct hda_codec *codec; 897 924 int err; 898 925 899 dev_dbg(card->dev, "%s: entry\n", __func__);900 901 926 if (snd_BUG_ON(!bus)) 902 return -EINVAL;927 return ERR_PTR(-EINVAL); 903 928 if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS)) 904 return -EINVAL;929 return ERR_PTR(-EINVAL); 905 930 906 931 codec = kzalloc(sizeof(*codec), GFP_KERNEL); 907 932 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 911 939 err = snd_hdac_device_init(&codec->core, &bus->core, name, codec_addr); 912 940 if (err < 0) { 913 941 kfree(codec); 914 return err; 915 } 916 942 return ERR_PTR(err); 943 } 944 945 codec->bus = bus; 917 946 codec->core.type = HDA_DEV_LEGACY; 918 *codecp = codec; 919 920 return err; 921 } 947 948 return codec; 949 } 950 EXPORT_SYMBOL_GPL(snd_hda_codec_device_init); 922 951 923 952 /** … … 933 962 unsigned int codec_addr, struct hda_codec **codecp) 934 963 { 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); 942 973 } 943 974 EXPORT_SYMBOL_GPL(snd_hda_codec_new); 944 975 945 976 int 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) 947 979 { 948 980 char component[31]; … … 964 996 codec->core.exec_verb = codec_exec_verb; 965 997 966 codec->bus = bus;967 998 codec->card = card; 968 999 codec->addr = codec_addr; … … 1020 1051 snd_component_add(card, component); 1021 1052 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 } 1025 1059 1026 1060 /* PM runtime needs to be enabled later after binding codec */ … … 3391 3425 3392 3426 #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 */ 3432 void snd_hda_codec_set_power_save(struct hda_codec *codec, int delay) 3394 3433 { 3395 3434 struct device *dev = hda_codec_dev(codec); … … 3409 3448 } 3410 3449 } 3450 EXPORT_SYMBOL_GPL(snd_hda_codec_set_power_save); 3411 3451 3412 3452 /** … … 3422 3462 3423 3463 list_for_each_codec(c, bus) 3424 codec_set_power_save(c, delay);3464 snd_hda_codec_set_power_save(c, delay); 3425 3465 } 3426 3466 EXPORT_SYMBOL_GPL(snd_hda_set_power_save); -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_intel.c
r737 r738 2548 2548 { PCI_DEVICE(0x8086, 0x51c8), 2549 2549 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2550 { PCI_DEVICE(0x8086, 0x51c9), 2551 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2550 2552 { PCI_DEVICE(0x8086, 0x51cd), 2551 2553 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, … … 2560 2562 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2561 2563 { 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), 2562 2578 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2563 2579 /* Broxton-P(Apollolake) */ -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_local.h
r736 r738 136 136 __snd_hda_add_vmaster(codec, name, tlv, followers, suffix, true, access, NULL) 137 137 int 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);140 138 void snd_hda_codec_disconnect_pcms(struct hda_codec *codec); 141 139 … … 365 363 const struct hda_pintbl *cfg); 366 364 void snd_hda_apply_fixup(struct hda_codec *codec, int action); 365 void __snd_hda_apply_fixup(struct hda_codec *codec, int id, int action, int depth); 367 366 void snd_hda_pick_fixup(struct hda_codec *codec, 368 367 const struct hda_model_fixup *models, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_cirrus.c
r736 r738 400 400 /* codec SSID */ 401 401 SND_PCI_QUIRK(0x106b, 0x0600, "iMac 14,1", CS420X_IMAC27_122), 402 SND_PCI_QUIRK(0x106b, 0x0900, "iMac 12,1", CS420X_IMAC27_122), 402 403 SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81), 403 404 SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_conexant.c
r737 r738 229 229 CXT_PINCFG_COMPAQ_CQ60, 230 230 CXT_FIXUP_STEREO_DMIC, 231 CXT_PINCFG_LENOVO_NOTEBOOK, 231 232 CXT_FIXUP_INC_MIC_BOOST, 232 233 CXT_FIXUP_HEADPHONE_MIC_PIN, … … 813 814 .v.func = cxt_fixup_stereo_dmic, 814 815 }, 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 815 826 [CXT_FIXUP_INC_MIC_BOOST] = { 816 827 .type = HDA_FIXUP_FUNC, … … 1005 1016 SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE), 1006 1017 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), 1007 1019 SND_PCI_QUIRK(0x103c, 0x836e, "HP ProBook 455 G5", CXT_FIXUP_MUTE_LED_GPIO), 1008 1020 SND_PCI_QUIRK(0x103c, 0x837f, "HP ProBook 470 G5", CXT_FIXUP_MUTE_LED_GPIO), … … 1031 1043 SND_PCI_QUIRK(0x17aa, 0x390b, "Lenovo G50-80", CXT_FIXUP_STEREO_DMIC), 1032 1044 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), 1034 1046 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC), 1035 1047 SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), … … 1140 1152 goto error; 1141 1153 1142 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);1154 err = cx_auto_parse_beep(codec); 1143 1155 if (err < 0) 1144 1156 goto error; 1145 1157 1146 err = cx_auto_parse_beep(codec);1158 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); 1147 1159 if (err < 0) 1148 1160 goto error; -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_hdmi.c
r737 r738 131 131 struct snd_jack *jack; 132 132 struct snd_kcontrol *eld_ctl; 133 }; 134 135 enum { 136 SILENT_STREAM_OFF = 0, 137 SILENT_STREAM_KAE, /* use standard HDA Keep-Alive */ 138 SILENT_STREAM_I915, /* Intel i915 extension */ 133 139 }; 134 140 … … 175 181 bool dyn_pcm_assign; 176 182 bool dyn_pcm_no_legacy; 183 /* hdmi interrupt trigger control flag for Nvidia codec */ 184 bool hdmi_intr_trig_ctrl; 177 185 bool intel_hsw_fixup; /* apply Intel platform-specific fixups */ 178 186 /* … … 192 200 const int *port_map; 193 201 int port_num; 194 bool send_silent_stream; /* Flag to enable silent stream feature */202 int silent_stream_type; 195 203 }; 196 204 … … 1684 1692 #define I915_SILENT_FMT_MASK 0xf 1685 1693 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; 1694 static void silent_stream_enable_i915(struct hda_codec *codec, 1695 struct hdmi_spec_per_pin *per_pin) 1696 { 1692 1697 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);1723 1698 1724 1699 snd_hdac_sync_audio_rate(&codec->core, per_pin->pin_nid, … … 1735 1710 per_pin->channels = I915_SILENT_CHANNELS; 1736 1711 hdmi_setup_audio_infoframe(codec, per_pin, per_pin->non_pcm); 1712 } 1713 1714 static 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 1733 static 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 } 1737 1796 1738 1797 unlock_out: 1739 1798 mutex_unlock(&per_pin->lock); 1799 1800 if (err || !keep_power) 1801 snd_hda_power_down_pm(codec); 1740 1802 } 1741 1803 … … 1745 1807 struct hdmi_spec *spec = codec->spec; 1746 1808 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 } 1748 1819 1749 1820 mutex_lock(&per_pin->lock); … … 1760 1831 } 1761 1832 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 1762 1840 per_pin->cvt_nid = 0; 1763 1841 per_pin->silent_stream = false; … … 1765 1843 unlock_out: 1766 1844 mutex_unlock(&per_pin->lock); 1845 1846 snd_hda_power_down_pm(codec); 1767 1847 } 1768 1848 … … 1786 1866 mutex_unlock(&per_pin->lock); 1787 1867 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) 1802 1870 silent_stream_enable(codec, per_pin); 1803 } else if (monitor_prev && !monitor_next) {1871 else if (monitor_prev && !monitor_next) 1804 1872 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 }1811 1873 } 1812 1874 } … … 3007 3069 */ 3008 3070 if (send_silent_stream) 3009 spec->s end_silent_stream = true;3071 spec->silent_stream_type = SILENT_STREAM_I915; 3010 3072 3011 3073 return parse_intel_hdmi(codec); … … 3058 3120 3059 3121 return ret; 3122 } 3123 3124 static 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; 3060 3138 } 3061 3139 … … 3746 3824 * 3747 3825 * 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. 3749 3829 */ 3830 #define NVIDIA_SET_HOST_INTR 0xf80 3750 3831 #define NVIDIA_GET_SCRATCH0 0xfa6 3751 3832 #define NVIDIA_SET_SCRATCH0_BYTE0 0xfa7 … … 3766 3847 * the format is invalidated so that the HDMI codec can be disabled. 3767 3848 */ 3768 static void tegra_hdmi_set_format(struct hda_codec *codec, unsigned int format) 3849 static void tegra_hdmi_set_format(struct hda_codec *codec, 3850 hda_nid_t cvt_nid, 3851 unsigned int format) 3769 3852 { 3770 3853 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; 3771 3865 3772 3866 /* 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, 3774 3868 NVIDIA_GET_SCRATCH0, 0); 3775 3869 value = (value >> 24) & 0xff; 3776 3870 3777 3871 /* 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, 3779 3873 NVIDIA_SET_SCRATCH0_BYTE0, 3780 3874 (format >> 0) & 0xff); 3781 snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0,3875 snd_hda_codec_write(codec, nid, 0, 3782 3876 NVIDIA_SET_SCRATCH0_BYTE1, 3783 3877 (format >> 8) & 0xff); 3784 3878 3785 3879 /* bits [16:24] are unused */ 3786 snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0,3880 snd_hda_codec_write(codec, nid, 0, 3787 3881 NVIDIA_SET_SCRATCH0_BYTE2, 0); 3788 3882 … … 3796 3890 value |= NVIDIA_SCRATCH_VALID; 3797 3891 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 } 3807 3914 } 3808 3915 … … 3821 3928 3822 3929 /* notify the HDMI codec of the format change */ 3823 tegra_hdmi_set_format(codec, format);3930 tegra_hdmi_set_format(codec, hinfo->nid, format); 3824 3931 3825 3932 return 0; … … 3831 3938 { 3832 3939 /* invalidate the format in the HDMI codec */ 3833 tegra_hdmi_set_format(codec, 0);3940 tegra_hdmi_set_format(codec, hinfo->nid, 0); 3834 3941 3835 3942 return generic_hdmi_playback_pcm_cleanup(hinfo, codec, substream); … … 3876 3983 } 3877 3984 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) 3985 static 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); 3885 3993 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); 3886 4002 3887 4003 codec->patch_ops.build_pcms = tegra_hdmi_build_pcms; 3888 spec = codec->spec;3889 4004 spec->chmap.ops.chmap_cea_alloc_validate_get_type = 3890 4005 nvhdmi_chmap_cea_alloc_validate_get_type; 3891 4006 spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate; 3892 4007 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 3893 4012 return 0; 4013 } 4014 4015 static 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 4026 static 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); 3894 4043 } 3895 4044 … … 4347 4496 HDA_CODEC_ENTRY(0x10de002f, "Tegra194 HDMI/DP2", patch_tegra_hdmi), 4348 4497 HDA_CODEC_ENTRY(0x10de0030, "Tegra194 HDMI/DP3", patch_tegra_hdmi), 4498 HDA_CODEC_ENTRY(0x10de0031, "Tegra234 HDMI/DP", patch_tegra234_hdmi), 4349 4499 HDA_CODEC_ENTRY(0x10de0040, "GPU 40 HDMI/DP", patch_nvhdmi), 4350 4500 HDA_CODEC_ENTRY(0x10de0041, "GPU 41 HDMI/DP", patch_nvhdmi), … … 4415 4565 HDA_CODEC_ENTRY(0x80862815, "Alderlake HDMI", patch_i915_tgl_hdmi), 4416 4566 HDA_CODEC_ENTRY(0x80862816, "Rocketlake HDMI", patch_i915_tgl_hdmi), 4417 HDA_CODEC_ENTRY(0x80862819, "DG2 HDMI", patch_i915_tgl_hdmi), 4567 HDA_CODEC_ENTRY(0x80862818, "Raptorlake HDMI", patch_i915_tgl_hdmi), 4568 HDA_CODEC_ENTRY(0x80862819, "DG2 HDMI", patch_i915_adlp_hdmi), 4418 4569 HDA_CODEC_ENTRY(0x8086281a, "Jasperlake HDMI", patch_i915_icl_hdmi), 4419 4570 HDA_CODEC_ENTRY(0x8086281b, "Elkhartlake HDMI", patch_i915_icl_hdmi), 4420 HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_tgl_hdmi), 4571 HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_adlp_hdmi), 4572 HDA_CODEC_ENTRY(0x8086281f, "Raptorlake-P HDMI", patch_i915_adlp_hdmi), 4573 HDA_CODEC_ENTRY(0x8086281d, "Meteorlake HDMI", patch_i915_adlp_hdmi), 4421 4574 HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi), 4422 4575 HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi), -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_realtek.c
r737 r738 455 455 case 0x10ec0255: 456 456 case 0x10ec0256: 457 case 0x19e58326: 457 458 case 0x10ec0257: 458 459 case 0x10ec0282: … … 592 593 case 0x10ec0236: 593 594 case 0x10ec0256: 595 case 0x19e58326: 594 596 case 0x10ec0283: 595 597 case 0x10ec0286: … … 3187 3189 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3188 3190 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), 3189 3192 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3190 3193 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS), … … 3897 3900 case 0x10ec0236: 3898 3901 case 0x10ec0256: 3902 case 0x19e58326: 3899 3903 alc_write_coef_idx(codec, 0x48, 0x0); 3900 3904 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); … … 3925 3929 case 0x10ec0236: 3926 3930 case 0x10ec0256: 3931 case 0x19e58326: 3927 3932 alc_write_coef_idx(codec, 0x48, 0xd011); 3928 3933 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); … … 5607 5612 case 0x10ec0236: 5608 5613 case 0x10ec0256: 5614 case 0x19e58326: 5609 5615 alc_process_coef_fw(codec, coef0256); 5610 5616 break; … … 5722 5728 case 0x10ec0236: 5723 5729 case 0x10ec0256: 5730 case 0x19e58326: 5724 5731 alc_write_coef_idx(codec, 0x45, 0xc489); 5725 5732 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); … … 5872 5879 case 0x10ec0236: 5873 5880 case 0x10ec0256: 5881 case 0x19e58326: 5874 5882 alc_write_coef_idx(codec, 0x1b, 0x0e4b); 5875 5883 alc_write_coef_idx(codec, 0x45, 0xc089); … … 5971 5979 case 0x10ec0236: 5972 5980 case 0x10ec0256: 5981 case 0x19e58326: 5973 5982 alc_process_coef_fw(codec, coef0256); 5974 5983 break; … … 6085 6094 case 0x10ec0236: 6086 6095 case 0x10ec0256: 6096 case 0x19e58326: 6087 6097 alc_process_coef_fw(codec, coef0256); 6088 6098 break; … … 6186 6196 case 0x10ec0236: 6187 6197 case 0x10ec0256: 6198 case 0x19e58326: 6188 6199 alc_write_coef_idx(codec, 0x1b, 0x0e4b); 6189 6200 alc_write_coef_idx(codec, 0x06, 0x6104); … … 6482 6493 case 0x10ec0236: 6483 6494 case 0x10ec0256: 6495 case 0x19e58326: 6484 6496 alc_process_coef_fw(codec, alc256fw); 6485 6497 break; … … 7085 7097 case 0x10ec0255: 7086 7098 case 0x10ec0256: 7099 case 0x19e58326: 7087 7100 alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */ 7088 7101 alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15); … … 7295 7308 } 7296 7309 7297 static int comp_match_dev_name(struct device *dev, void *data)7298 {7299 return strcmp(dev_name(dev), data) == 0;7300 }7301 7302 7310 static int find_comp_by_dev_name(struct alc_spec *spec, const char *name) 7303 7311 { … … 7360 7368 if (!name) 7361 7369 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); 7363 7371 } 7364 7372 ret = component_master_add_with_match(dev, &comp_master_ops, spec->match); … … 7376 7384 } 7377 7385 7386 static 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 7391 static 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 7378 7396 static void alc287_legion_16achg6_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc, 7379 7397 struct snd_pcm_substream *sub, int action) … … 7409 7427 switch (action) { 7410 7428 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, 7412 7430 "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, 7414 7432 "i2c-CLSA0100:00-cs35l41-hda.1"); 7415 7433 ret = component_master_add_with_match(dev, &comp_master_ops, spec->match); … … 7519 7537 } 7520 7538 } 7539 break; 7540 } 7541 } 7542 7543 static 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; 7521 7576 break; 7522 7577 } … … 7578 7633 ALC269VB_FIXUP_ASUS_ZENBOOK, 7579 7634 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, 7635 ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE, 7580 7636 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, 7581 7637 ALC269VB_FIXUP_ORDISSIMO_EVE2, … … 7637 7693 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, 7638 7694 ALC269_FIXUP_ATIV_BOOK_8, 7695 ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE, 7639 7696 ALC221_FIXUP_HP_MIC_NO_PRESENCE, 7640 7697 ALC256_FIXUP_ASUS_HEADSET_MODE, … … 7741 7798 ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, 7742 7799 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS, 7800 ALC298_FIXUP_LENOVO_C940_DUET7, 7743 7801 ALC287_FIXUP_13S_GEN2_SPEAKERS, 7744 7802 ALC256_FIXUP_SET_COEF_DEFAULTS, … … 7750 7808 ALC287_FIXUP_LEGION_16ACHG6, 7751 7809 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, 7752 7815 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED, 7753 7816 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 */ 7825 static 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 } 7755 7837 7756 7838 #ifdef TARGET_OS2 … … 8392 8474 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK, 8393 8475 }, 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 8394 8487 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { 8395 8488 .type = HDA_FIXUP_FUNC, … … 8848 8941 }, 8849 8942 #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 }, 8850 8953 [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = { 8851 8954 .type = HDA_FIXUP_PINS, … … 9766 9869 .chained = true, 9767 9870 .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, 9768 9875 }, 9769 9876 [ALC287_FIXUP_13S_GEN2_SPEAKERS] = { … … 9829 9936 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 9830 9937 }, 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 }, 9831 9964 #ifdef TARGET_OS2xxx 9832 9965 [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = { … … 9857 9990 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9858 9991 }, 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 }, 9860 10061 }; 9861 10062 … … 9890 10091 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 9891 10092 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), 9892 10094 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 9893 10095 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), … … 9899 10101 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC), 9900 10102 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), 10103 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X), 9901 10104 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS), 9902 10105 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X), … … 10014 10217 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 10015 10218 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), 10016 10220 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE), 10017 10221 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE), … … 10034 10238 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED), 10035 10239 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), 10036 10242 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 10037 10243 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), … … 10049 10255 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation", 10050 10256 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), 10051 10259 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 10052 10260 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED), … … 10077 10285 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), 10078 10286 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), 10080 10307 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10081 10308 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), 10082 10313 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 10083 10314 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), … … 10094 10325 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC), 10095 10326 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), 10096 10328 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC), 10097 10329 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), … … 10169 10401 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10170 10402 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), 10171 10404 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10172 10405 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10195 10428 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10196 10429 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), 10197 10432 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10198 10433 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10279 10514 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 10280 10515 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), 10281 10517 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 10282 10518 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), 10284 10520 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), 10285 10521 SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), … … 10337 10573 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), 10338 10574 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), 10339 10576 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 10340 10577 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), … … 10523 10760 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"}, 10524 10761 {.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"}, 10525 10763 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"}, 10526 10764 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"}, … … 11121 11359 case 0x10ec0236: 11122 11360 case 0x10ec0256: 11361 case 0x19e58326: 11123 11362 spec->codec_variant = ALC269_TYPE_ALC256; 11124 11363 spec->shutup = alc256_shutup; … … 11787 12026 ALC897_FIXUP_LENOVO_HEADSET_MIC, 11788 12027 ALC897_FIXUP_HEADSET_MIC_PIN, 12028 ALC897_FIXUP_HP_HSMIC_VERB, 11789 12029 }; 11790 12030 … … 12393 12633 .chained = true, 12394 12634 .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 }, 12395 12642 }, 12396 12643 #endif … … 12420 12667 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 12421 12668 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 12669 SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB), 12422 12670 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), 12423 12672 SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2), 12424 12673 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE), … … 12802 13051 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882), 12803 13052 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882), 13053 HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269), 12804 13054 {0} /* terminator */ 12805 13055 }; -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_via.c
r736 r738 529 529 return err; 530 530 531 err = auto_parse_beep(codec); 532 if (err < 0) 533 return err; 534 531 535 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);536 536 if (err < 0) 537 537 return err; -
GPL/branches/uniaud32-exp/include/linux/component.h
r737 r738 83 83 }; 84 84 85 int component_compare_dev_name(struct device *dev, void *data); 86 85 87 void component_master_del(struct device *, 86 88 const struct component_master_ops *); -
GPL/branches/uniaud32-exp/include/linux/device.h
r737 r738 348 348 int device_match_of_node(struct device *dev, const void *np); 349 349 350 char *devm_kasprintf(struct device *dev, gfp_t gfp, 351 const char *fmt, ...); 352 350 353 #endif /* _LINUX_DEVICE_H */ 351 354
Note:
See TracChangeset
for help on using the changeset viewer.
