Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-6.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"A collection of small fixes. All changes are rather boring
device-specific fixes and quirks:

- A few fixes for missing NULL checks

- ASoC NAU8821 fixes for jack and irq handling

- Various fixes for ASoC TAS2781, IDT821034, sc8280xp, max9809x,
wcd938x, and SoundWire

- Usual HD-audio and USB-audio quirks"

* tag 'sound-6.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (27 commits)
ALSA: hda/realtek: Fix mute led for HP Omen 17-cb0xxx
ALSA: usb-audio: fix vendor quirk for Logitech H390
ALSA: usb-audio: add volume quirks for MS LifeChat LX-3000
ASoC: amd/sdw_utils: avoid NULL deref when devm_kasprintf() fails
ASoC: max98090/91: fixed max98091 ALSA widget powering up/down
ASoC: dt-bindings: Add compatible string fsl,imx-audio-tlv320
ASoC: codecs: wcd938x-sdw: remove redundant runtime pm calls
ASoC: sdw_utils: add rt1321 part id to codec_info_list
ALSA: usb-audio: Fix NULL pointer deference in try_to_register_card
ALSA: firewire: amdtp-stream: fix enum kernel-doc warnings
ALSA: usb-audio: add mixer_playback_min_mute quirk for Logitech H390
ASoC: nau8821: Avoid unnecessary blocking in IRQ handler
ASoC: nau8821: Add DMI quirk to bypass jack debounce circuit
ASoC: nau8821: Consistently clear interrupts before unmasking
ASoC: nau8821: Generalize helper to clear IRQ status
ASoC: nau8821: Cancel jdet_work before handling jack ejection
ASoC: codecs: Fix gain setting ranges for Renesas IDT821034 codec
ASoC: tas2781: Update ti,tas2781.yaml for adding tas58xx
ASoC: tas2781: Support more newly-released amplifiers tas58xx in the driver
ASoC: qcom: sc8280xp: Add support for QCS615
...

+219 -90
+1
Documentation/devicetree/bindings/sound/fsl-asoc-card.yaml
··· 79 79 - fsl,imx-audio-nau8822 80 80 - fsl,imx-audio-sgtl5000 81 81 - fsl,imx-audio-si476x 82 + - fsl,imx-audio-tlv320 82 83 - fsl,imx-audio-tlv320aic31xx 83 84 - fsl,imx-audio-tlv320aic32x4 84 85 - fsl,imx-audio-wm8524
+1
Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
··· 33 33 - qcom,apq8096-sndcard 34 34 - qcom,glymur-sndcard 35 35 - qcom,qcm6490-idp-sndcard 36 + - qcom,qcs615-sndcard 36 37 - qcom,qcs6490-rb3gen2-sndcard 37 38 - qcom,qcs8275-sndcard 38 39 - qcom,qcs9075-sndcard
+37 -6
Documentation/devicetree/bindings/sound/ti,tas2781.yaml
··· 24 24 Instruments Smart Amp speaker protection algorithm. The 25 25 integrated speaker voltage and current sense provides for real time 26 26 monitoring of loudspeaker behavior. 27 - The TAS5825/TAS5827 is a stereo, digital input Class-D audio 28 - amplifier optimized for efficiently driving high peak power into 29 - small loudspeakers. An integrated on-chip DSP supports Texas 30 - Instruments Smart Amp speaker protection algorithm. 27 + The TAS5802/TAS5815/TAS5825/TAS5827/TAS5828 is a stereo, digital input 28 + Class-D audio amplifier optimized for efficiently driving high peak 29 + power into small loudspeakers. An integrated on-chip DSP supports 30 + Texas Instruments Smart Amp speaker protection algorithm. 31 31 32 32 Specifications about the audio amplifier can be found at: 33 33 https://www.ti.com/lit/gpn/tas2120 ··· 35 35 https://www.ti.com/lit/gpn/tas2563 36 36 https://www.ti.com/lit/gpn/tas2572 37 37 https://www.ti.com/lit/gpn/tas2781 38 + https://www.ti.com/lit/gpn/tas5815 38 39 https://www.ti.com/lit/gpn/tas5825m 39 40 https://www.ti.com/lit/gpn/tas5827 41 + https://www.ti.com/lit/gpn/tas5828m 40 42 41 43 properties: 42 44 compatible: ··· 67 65 Protection and Audio Processing, 16/20/24/32bit stereo I2S or 68 66 multichannel TDM. 69 67 68 + ti,tas5802: 22-W, Inductor-Less, Digital Input, Closed-Loop Class-D 69 + Audio Amplifier with 96-Khz Extended Processing and Low Idle Power 70 + Dissipation. 71 + 72 + ti,tas5815: 30-W, Digital Input, Stereo, Closed-loop Class-D Audio 73 + Amplifier with 96 kHz Enhanced Processing 74 + 70 75 ti,tas5825: 38-W Stereo, Inductor-Less, Digital Input, Closed-Loop 4.5V 71 76 to 26.4V Class-D Audio Amplifier with 192-kHz Extended Audio Processing. 72 77 73 - ti,tas5827: 47-W Stereo, Digital Input, High Efficiency Closed-Loop Class-D 74 - Amplifier with Class-H Algorithm 78 + ti,tas5827: 47-W Stereo, Digital Input, High Efficiency Closed-Loop 79 + Class-D Amplifier with Class-H Algorithm 80 + 81 + ti,tas5828: 50-W Stereo, Digital Input, High Efficiency Closed-Loop 82 + Class-D Amplifier with Hybrid-Pro Algorithm 75 83 oneOf: 76 84 - items: 77 85 - enum: ··· 92 80 - ti,tas2563 93 81 - ti,tas2570 94 82 - ti,tas2572 83 + - ti,tas5802 84 + - ti,tas5815 95 85 - ti,tas5825 96 86 - ti,tas5827 87 + - ti,tas5828 97 88 - const: ti,tas2781 98 89 - enum: 99 90 - ti,tas2781 ··· 197 182 compatible: 198 183 contains: 199 184 enum: 185 + - ti,tas5802 186 + - ti,tas5815 187 + then: 188 + properties: 189 + reg: 190 + maxItems: 4 191 + items: 192 + minimum: 0x54 193 + maximum: 0x57 194 + 195 + - if: 196 + properties: 197 + compatible: 198 + contains: 199 + enum: 200 200 - ti,tas5827 201 + - ti,tas5828 201 202 then: 202 203 properties: 203 204 reg:
+3
include/sound/tas2781.h
··· 120 120 TAS2570, 121 121 TAS2572, 122 122 TAS2781, 123 + TAS5802, 124 + TAS5815, 123 125 TAS5825, 124 126 TAS5827, 127 + TAS5828, 125 128 TAS_OTHERS, 126 129 }; 127 130
+1 -1
sound/firewire/amdtp-stream.h
··· 32 32 * allows 5 times as large as IEC 61883-6 defines. 33 33 * @CIP_HEADER_WITHOUT_EOH: Only for in-stream. CIP Header doesn't include 34 34 * valid EOH. 35 - * @CIP_NO_HEADERS: a lack of headers in packets 35 + * @CIP_NO_HEADER: a lack of headers in packets 36 36 * @CIP_UNALIGHED_DBC: Only for in-stream. The value of dbc is not alighed to 37 37 * the value of current SYT_INTERVAL; e.g. initial value is not zero. 38 38 * @CIP_UNAWARE_SYT: For outgoing packet, the value in SYT field of CIP is 0xffff.
+2
sound/hda/codecs/realtek/alc269.c
··· 6397 6397 SND_PCI_QUIRK(0x103c, 0x854a, "HP EliteBook 830 G6", ALC285_FIXUP_HP_GPIO_LED), 6398 6398 SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_COEFBIT11), 6399 6399 SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360), 6400 + SND_PCI_QUIRK(0x103c, 0x8603, "HP Omen 17-cb0xxx", ALC285_FIXUP_HP_MUTE_LED), 6401 + SND_PCI_QUIRK(0x103c, 0x860c, "HP ZBook 17 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT), 6400 6402 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT), 6401 6403 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT), 6402 6404 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
+2
sound/hda/codecs/side-codecs/cs35l41_hda.c
··· 1410 1410 1411 1411 if (cs35l41_dsm_supported(handle, CS35L41_DSM_GET_MUTE)) { 1412 1412 ret = acpi_evaluate_dsm(handle, &guid, 0, CS35L41_DSM_GET_MUTE, NULL); 1413 + if (!ret) 1414 + return -EINVAL; 1413 1415 mute = *ret->buffer.pointer; 1414 1416 dev_dbg(cs35l41->dev, "CS35L41_DSM_GET_MUTE: %d\n", mute); 1415 1417 }
+4
sound/hda/codecs/side-codecs/hda_component.c
··· 174 174 sm->match_str = match_str; 175 175 sm->index = i; 176 176 component_match_add(dev, &match, hda_comp_match_dev_name, sm); 177 + if (IS_ERR(match)) { 178 + codec_err(cdc, "Fail to add component %ld\n", PTR_ERR(match)); 179 + return PTR_ERR(match); 180 + } 177 181 } 178 182 179 183 ret = component_master_add_with_match(dev, ops, match);
+1
sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
··· 669 669 */ 670 670 device_name = "TXNW5825"; 671 671 hda_priv->hda_chip_id = HDA_TAS5825; 672 + tas_hda->priv->chip_id = TAS5825; 672 673 } else { 673 674 return -ENODEV; 674 675 }
+1
sound/hda/controllers/intel.c
··· 2075 2075 { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1043, 0x874f) }, /* ASUS ROG Zenith II / Strix */ 2076 2076 { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb59) }, /* MSI TRX40 Creator */ 2077 2077 { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb60) }, /* MSI TRX40 */ 2078 + { PCI_DEVICE_SUB(0x1022, 0x15e3, 0x1462, 0xee59) }, /* MSI X870E Tomahawk WiFi */ 2078 2079 {} 2079 2080 }; 2080 2081
+1 -1
sound/soc/amd/acp/acp-sdw-sof-mach.c
··· 176 176 cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, 177 177 "SDW%d Pin%d", 178 178 link_num, cpu_pin_id); 179 - dev_dbg(dev, "cpu->dai_name:%s\n", cpus->dai_name); 180 179 if (!cpus->dai_name) 181 180 return -ENOMEM; 181 + dev_dbg(dev, "cpu->dai_name:%s\n", cpus->dai_name); 182 182 183 183 codec_maps[j].cpu = 0; 184 184 codec_maps[j].codec = j;
+6 -6
sound/soc/codecs/idt821034.c
··· 548 548 return ret; 549 549 } 550 550 551 - static const DECLARE_TLV_DB_LINEAR(idt821034_gain_in, -6520, 1306); 552 - #define IDT821034_GAIN_IN_MIN_RAW 1 /* -65.20 dB -> 10^(-65.2/20.0) * 1820 = 1 */ 553 - #define IDT821034_GAIN_IN_MAX_RAW 8191 /* 13.06 dB -> 10^(13.06/20.0) * 1820 = 8191 */ 551 + static const DECLARE_TLV_DB_LINEAR(idt821034_gain_in, -300, 1300); 552 + #define IDT821034_GAIN_IN_MIN_RAW 1288 /* -3.0 dB -> 10^(-3.0/20.0) * 1820 = 1288 */ 553 + #define IDT821034_GAIN_IN_MAX_RAW 8130 /* 13.0 dB -> 10^(13.0/20.0) * 1820 = 8130 */ 554 554 #define IDT821034_GAIN_IN_INIT_RAW 1820 /* 0dB -> 10^(0/20) * 1820 = 1820 */ 555 555 556 - static const DECLARE_TLV_DB_LINEAR(idt821034_gain_out, -6798, 1029); 557 - #define IDT821034_GAIN_OUT_MIN_RAW 1 /* -67.98 dB -> 10^(-67.98/20.0) * 2506 = 1*/ 558 - #define IDT821034_GAIN_OUT_MAX_RAW 8191 /* 10.29 dB -> 10^(10.29/20.0) * 2506 = 8191 */ 556 + static const DECLARE_TLV_DB_LINEAR(idt821034_gain_out, -1300, 300); 557 + #define IDT821034_GAIN_OUT_MIN_RAW 561 /* -13.0 dB -> 10^(-13.0/20.0) * 2506 = 561 */ 558 + #define IDT821034_GAIN_OUT_MAX_RAW 3540 /* 3.0 dB -> 10^(3.0/20.0) * 2506 = 3540 */ 559 559 #define IDT821034_GAIN_OUT_INIT_RAW 2506 /* 0dB -> 10^(0/20) * 2506 = 2506 */ 560 560 561 561 static const struct snd_kcontrol_new idt821034_controls[] = {
+4 -2
sound/soc/codecs/max98090.c
··· 1234 1234 SND_SOC_DAPM_INPUT("DMIC4"), 1235 1235 1236 1236 SND_SOC_DAPM_SUPPLY("DMIC3_ENA", M98090_REG_DIGITAL_MIC_ENABLE, 1237 - M98090_DIGMIC3_SHIFT, 0, NULL, 0), 1237 + M98090_DIGMIC3_SHIFT, 0, max98090_shdn_event, 1238 + SND_SOC_DAPM_POST_PMU), 1238 1239 SND_SOC_DAPM_SUPPLY("DMIC4_ENA", M98090_REG_DIGITAL_MIC_ENABLE, 1239 - M98090_DIGMIC4_SHIFT, 0, NULL, 0), 1240 + M98090_DIGMIC4_SHIFT, 0, max98090_shdn_event, 1241 + SND_SOC_DAPM_POST_PMU), 1240 1242 }; 1241 1243 1242 1244 static const struct snd_soc_dapm_route max98090_dapm_routes[] = {
+82 -51
sound/soc/codecs/nau8821.c
··· 26 26 #include <sound/tlv.h> 27 27 #include "nau8821.h" 28 28 29 - #define NAU8821_JD_ACTIVE_HIGH BIT(0) 29 + #define NAU8821_QUIRK_JD_ACTIVE_HIGH BIT(0) 30 + #define NAU8821_QUIRK_JD_DB_BYPASS BIT(1) 30 31 31 32 static int nau8821_quirk; 32 33 static int quirk_override = -1; ··· 1022 1021 return active_high == is_high; 1023 1022 } 1024 1023 1025 - static void nau8821_int_status_clear_all(struct regmap *regmap) 1024 + static void nau8821_irq_status_clear(struct regmap *regmap, int active_irq) 1026 1025 { 1027 - int active_irq, clear_irq, i; 1026 + int clear_irq, i; 1028 1027 1029 - /* Reset the intrruption status from rightmost bit if the corres- 1030 - * ponding irq event occurs. 1028 + if (active_irq) { 1029 + regmap_write(regmap, NAU8821_R11_INT_CLR_KEY_STATUS, active_irq); 1030 + return; 1031 + } 1032 + 1033 + /* Reset the interruption status from rightmost bit if the 1034 + * corresponding irq event occurs. 1031 1035 */ 1032 1036 regmap_read(regmap, NAU8821_R10_IRQ_STATUS, &active_irq); 1033 1037 for (i = 0; i < NAU8821_REG_DATA_LEN; i++) { ··· 1058 1052 snd_soc_component_disable_pin(component, "MICBIAS"); 1059 1053 snd_soc_dapm_sync(dapm); 1060 1054 1061 - /* Clear all interruption status */ 1062 - nau8821_int_status_clear_all(regmap); 1063 - 1064 - /* Enable the insertion interruption, disable the ejection inter- 1065 - * ruption, and then bypass de-bounce circuit. 1066 - */ 1055 + /* Disable & mask both insertion & ejection IRQs */ 1067 1056 regmap_update_bits(regmap, NAU8821_R12_INTERRUPT_DIS_CTRL, 1068 - NAU8821_IRQ_EJECT_DIS | NAU8821_IRQ_INSERT_DIS, 1069 - NAU8821_IRQ_EJECT_DIS); 1070 - /* Mask unneeded IRQs: 1 - disable, 0 - enable */ 1057 + NAU8821_IRQ_INSERT_DIS | NAU8821_IRQ_EJECT_DIS, 1058 + NAU8821_IRQ_INSERT_DIS | NAU8821_IRQ_EJECT_DIS); 1071 1059 regmap_update_bits(regmap, NAU8821_R0F_INTERRUPT_MASK, 1072 - NAU8821_IRQ_EJECT_EN | NAU8821_IRQ_INSERT_EN, 1073 - NAU8821_IRQ_EJECT_EN); 1060 + NAU8821_IRQ_INSERT_EN | NAU8821_IRQ_EJECT_EN, 1061 + NAU8821_IRQ_INSERT_EN | NAU8821_IRQ_EJECT_EN); 1074 1062 1063 + /* Clear all interruption status */ 1064 + nau8821_irq_status_clear(regmap, 0); 1065 + 1066 + /* Enable & unmask the insertion IRQ */ 1067 + regmap_update_bits(regmap, NAU8821_R12_INTERRUPT_DIS_CTRL, 1068 + NAU8821_IRQ_INSERT_DIS, 0); 1069 + regmap_update_bits(regmap, NAU8821_R0F_INTERRUPT_MASK, 1070 + NAU8821_IRQ_INSERT_EN, 0); 1071 + 1072 + /* Bypass de-bounce circuit */ 1075 1073 regmap_update_bits(regmap, NAU8821_R0D_JACK_DET_CTRL, 1076 1074 NAU8821_JACK_DET_DB_BYPASS, NAU8821_JACK_DET_DB_BYPASS); 1077 1075 ··· 1099 1089 NAU8821_IRQ_KEY_RELEASE_DIS | 1100 1090 NAU8821_IRQ_KEY_PRESS_DIS); 1101 1091 } 1102 - 1103 1092 } 1104 1093 1105 1094 static void nau8821_jdet_work(struct work_struct *work) 1106 1095 { 1107 1096 struct nau8821 *nau8821 = 1108 - container_of(work, struct nau8821, jdet_work); 1097 + container_of(work, struct nau8821, jdet_work.work); 1109 1098 struct snd_soc_dapm_context *dapm = nau8821->dapm; 1110 1099 struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); 1111 1100 struct regmap *regmap = nau8821->regmap; 1112 1101 int jack_status_reg, mic_detected, event = 0, event_mask = 0; 1113 - 1114 - snd_soc_component_force_enable_pin(component, "MICBIAS"); 1115 - snd_soc_dapm_sync(dapm); 1116 - msleep(20); 1117 1102 1118 1103 regmap_read(regmap, NAU8821_R58_I2C_DEVICE_ID, &jack_status_reg); 1119 1104 mic_detected = !(jack_status_reg & NAU8821_KEYDET); ··· 1142 1137 snd_soc_component_disable_pin(component, "MICBIAS"); 1143 1138 snd_soc_dapm_sync(dapm); 1144 1139 } 1140 + 1145 1141 event_mask |= SND_JACK_HEADSET; 1146 1142 snd_soc_jack_report(nau8821->jack, event, event_mask); 1147 1143 } ··· 1151 1145 static void nau8821_setup_inserted_irq(struct nau8821 *nau8821) 1152 1146 { 1153 1147 struct regmap *regmap = nau8821->regmap; 1148 + 1149 + /* Disable & mask insertion IRQ */ 1150 + regmap_update_bits(regmap, NAU8821_R12_INTERRUPT_DIS_CTRL, 1151 + NAU8821_IRQ_INSERT_DIS, NAU8821_IRQ_INSERT_DIS); 1152 + regmap_update_bits(regmap, NAU8821_R0F_INTERRUPT_MASK, 1153 + NAU8821_IRQ_INSERT_EN, NAU8821_IRQ_INSERT_EN); 1154 + 1155 + /* Clear insert IRQ status */ 1156 + nau8821_irq_status_clear(regmap, NAU8821_JACK_INSERT_DETECTED); 1154 1157 1155 1158 /* Enable internal VCO needed for interruptions */ 1156 1159 if (nau8821->dapm->bias_level < SND_SOC_BIAS_PREPARE) ··· 1175 1160 regmap_update_bits(regmap, NAU8821_R1D_I2S_PCM_CTRL2, 1176 1161 NAU8821_I2S_MS_MASK, NAU8821_I2S_MS_SLAVE); 1177 1162 1178 - /* Not bypass de-bounce circuit */ 1179 - regmap_update_bits(regmap, NAU8821_R0D_JACK_DET_CTRL, 1180 - NAU8821_JACK_DET_DB_BYPASS, 0); 1163 + /* Do not bypass de-bounce circuit */ 1164 + if (!(nau8821_quirk & NAU8821_QUIRK_JD_DB_BYPASS)) 1165 + regmap_update_bits(regmap, NAU8821_R0D_JACK_DET_CTRL, 1166 + NAU8821_JACK_DET_DB_BYPASS, 0); 1181 1167 1168 + /* Unmask & enable the ejection IRQs */ 1182 1169 regmap_update_bits(regmap, NAU8821_R0F_INTERRUPT_MASK, 1183 - NAU8821_IRQ_EJECT_EN, 0); 1170 + NAU8821_IRQ_EJECT_EN, 0); 1184 1171 regmap_update_bits(regmap, NAU8821_R12_INTERRUPT_DIS_CTRL, 1185 - NAU8821_IRQ_EJECT_DIS, 0); 1172 + NAU8821_IRQ_EJECT_DIS, 0); 1186 1173 } 1187 1174 1188 1175 static irqreturn_t nau8821_interrupt(int irq, void *data) 1189 1176 { 1190 1177 struct nau8821 *nau8821 = (struct nau8821 *)data; 1191 1178 struct regmap *regmap = nau8821->regmap; 1192 - int active_irq, clear_irq = 0, event = 0, event_mask = 0; 1179 + struct snd_soc_component *component; 1180 + int active_irq, event = 0, event_mask = 0; 1193 1181 1194 1182 if (regmap_read(regmap, NAU8821_R10_IRQ_STATUS, &active_irq)) { 1195 1183 dev_err(nau8821->dev, "failed to read irq status\n"); ··· 1203 1185 1204 1186 if ((active_irq & NAU8821_JACK_EJECT_IRQ_MASK) == 1205 1187 NAU8821_JACK_EJECT_DETECTED) { 1188 + cancel_delayed_work_sync(&nau8821->jdet_work); 1206 1189 regmap_update_bits(regmap, NAU8821_R71_ANALOG_ADC_1, 1207 1190 NAU8821_MICDET_MASK, NAU8821_MICDET_DIS); 1208 1191 nau8821_eject_jack(nau8821); 1209 1192 event_mask |= SND_JACK_HEADSET; 1210 - clear_irq = NAU8821_JACK_EJECT_IRQ_MASK; 1211 1193 } else if (active_irq & NAU8821_KEY_SHORT_PRESS_IRQ) { 1212 1194 event |= NAU8821_BUTTON; 1213 1195 event_mask |= NAU8821_BUTTON; 1214 - clear_irq = NAU8821_KEY_SHORT_PRESS_IRQ; 1196 + nau8821_irq_status_clear(regmap, NAU8821_KEY_SHORT_PRESS_IRQ); 1215 1197 } else if (active_irq & NAU8821_KEY_RELEASE_IRQ) { 1216 1198 event_mask = NAU8821_BUTTON; 1217 - clear_irq = NAU8821_KEY_RELEASE_IRQ; 1199 + nau8821_irq_status_clear(regmap, NAU8821_KEY_RELEASE_IRQ); 1218 1200 } else if ((active_irq & NAU8821_JACK_INSERT_IRQ_MASK) == 1219 1201 NAU8821_JACK_INSERT_DETECTED) { 1202 + cancel_delayed_work_sync(&nau8821->jdet_work); 1220 1203 regmap_update_bits(regmap, NAU8821_R71_ANALOG_ADC_1, 1221 1204 NAU8821_MICDET_MASK, NAU8821_MICDET_EN); 1222 1205 if (nau8821_is_jack_inserted(regmap)) { 1223 - /* detect microphone and jack type */ 1224 - cancel_work_sync(&nau8821->jdet_work); 1225 - schedule_work(&nau8821->jdet_work); 1206 + /* Detect microphone and jack type */ 1207 + component = snd_soc_dapm_to_component(nau8821->dapm); 1208 + snd_soc_component_force_enable_pin(component, "MICBIAS"); 1209 + snd_soc_dapm_sync(nau8821->dapm); 1210 + schedule_delayed_work(&nau8821->jdet_work, msecs_to_jiffies(20)); 1226 1211 /* Turn off insertion interruption at manual mode */ 1227 - regmap_update_bits(regmap, 1228 - NAU8821_R12_INTERRUPT_DIS_CTRL, 1229 - NAU8821_IRQ_INSERT_DIS, 1230 - NAU8821_IRQ_INSERT_DIS); 1231 - regmap_update_bits(regmap, 1232 - NAU8821_R0F_INTERRUPT_MASK, 1233 - NAU8821_IRQ_INSERT_EN, 1234 - NAU8821_IRQ_INSERT_EN); 1235 1212 nau8821_setup_inserted_irq(nau8821); 1236 1213 } else { 1237 1214 dev_warn(nau8821->dev, 1238 1215 "Inserted IRQ fired but not connected\n"); 1239 1216 nau8821_eject_jack(nau8821); 1240 1217 } 1218 + } else { 1219 + /* Clear the rightmost interrupt */ 1220 + nau8821_irq_status_clear(regmap, active_irq); 1241 1221 } 1242 - 1243 - if (!clear_irq) 1244 - clear_irq = active_irq; 1245 - /* clears the rightmost interruption */ 1246 - regmap_write(regmap, NAU8821_R11_INT_CLR_KEY_STATUS, clear_irq); 1247 1222 1248 1223 if (event_mask) 1249 1224 snd_soc_jack_report(nau8821->jack, event, event_mask); ··· 1532 1521 nau8821_configure_sysclk(nau8821, NAU8821_CLK_DIS, 0); 1533 1522 if (nau8821->irq) { 1534 1523 /* Clear all interruption status */ 1535 - nau8821_int_status_clear_all(regmap); 1524 + nau8821_irq_status_clear(regmap, 0); 1536 1525 1537 1526 /* Enable both insertion and ejection interruptions, and then 1538 1527 * bypass de-bounce circuit. ··· 1662 1651 1663 1652 nau8821->jack = jack; 1664 1653 /* Initiate jack detection work queue */ 1665 - INIT_WORK(&nau8821->jdet_work, nau8821_jdet_work); 1654 + INIT_DELAYED_WORK(&nau8821->jdet_work, nau8821_jdet_work); 1655 + 1666 1656 ret = devm_request_threaded_irq(nau8821->dev, nau8821->irq, NULL, 1667 1657 nau8821_interrupt, IRQF_TRIGGER_LOW | IRQF_ONESHOT, 1668 1658 "nau8821", nau8821); ··· 1868 1856 DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"), 1869 1857 DMI_MATCH(DMI_BOARD_NAME, "CW14Q01P-V2"), 1870 1858 }, 1871 - .driver_data = (void *)(NAU8821_JD_ACTIVE_HIGH), 1859 + .driver_data = (void *)(NAU8821_QUIRK_JD_ACTIVE_HIGH), 1860 + }, 1861 + { 1862 + /* Valve Steam Deck LCD */ 1863 + .matches = { 1864 + DMI_MATCH(DMI_SYS_VENDOR, "Valve"), 1865 + DMI_MATCH(DMI_PRODUCT_NAME, "Jupiter"), 1866 + }, 1867 + .driver_data = (void *)(NAU8821_QUIRK_JD_DB_BYPASS), 1868 + }, 1869 + { 1870 + /* Valve Steam Deck OLED */ 1871 + .matches = { 1872 + DMI_MATCH(DMI_SYS_VENDOR, "Valve"), 1873 + DMI_MATCH(DMI_PRODUCT_NAME, "Galileo"), 1874 + }, 1875 + .driver_data = (void *)(NAU8821_QUIRK_JD_DB_BYPASS), 1872 1876 }, 1873 1877 {} 1874 1878 }; ··· 1926 1898 1927 1899 nau8821_check_quirks(); 1928 1900 1929 - if (nau8821_quirk & NAU8821_JD_ACTIVE_HIGH) 1901 + if (nau8821_quirk & NAU8821_QUIRK_JD_ACTIVE_HIGH) 1930 1902 nau8821->jkdet_polarity = 0; 1903 + 1904 + if (nau8821_quirk & NAU8821_QUIRK_JD_DB_BYPASS) 1905 + dev_dbg(dev, "Force bypassing jack detection debounce circuit\n"); 1931 1906 1932 1907 nau8821_print_device_properties(nau8821); 1933 1908
+1 -1
sound/soc/codecs/nau8821.h
··· 561 561 struct regmap *regmap; 562 562 struct snd_soc_dapm_context *dapm; 563 563 struct snd_soc_jack *jack; 564 - struct work_struct jdet_work; 564 + struct delayed_work jdet_work; 565 565 int irq; 566 566 int clk_id; 567 567 int micbias_voltage;
+19 -2
sound/soc/codecs/tas2781-i2c.c
··· 108 108 { "tas2570", TAS2570 }, 109 109 { "tas2572", TAS2572 }, 110 110 { "tas2781", TAS2781 }, 111 + { "tas5802", TAS5802 }, 112 + { "tas5815", TAS5815 }, 111 113 { "tas5825", TAS5825 }, 112 114 { "tas5827", TAS5827 }, 115 + { "tas5828", TAS5828 }, 113 116 {} 114 117 }; 115 118 MODULE_DEVICE_TABLE(i2c, tasdevice_id); ··· 127 124 { .compatible = "ti,tas2570" }, 128 125 { .compatible = "ti,tas2572" }, 129 126 { .compatible = "ti,tas2781" }, 127 + { .compatible = "ti,tas5802" }, 128 + { .compatible = "ti,tas5815" }, 130 129 { .compatible = "ti,tas5825" }, 131 130 { .compatible = "ti,tas5827" }, 131 + { .compatible = "ti,tas5828" }, 132 132 {}, 133 133 }; 134 134 MODULE_DEVICE_TABLE(of, tasdevice_of_match); ··· 1671 1665 } 1672 1666 tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK; 1673 1667 1674 - /* There is no calibration required for TAS5825/TAS5827. */ 1675 - if (tas_priv->chip_id < TAS5825) { 1668 + /* There is no calibration required for 1669 + * TAS5802/TAS5815/TAS5825/TAS5827/TAS5828. 1670 + */ 1671 + if (tas_priv->chip_id < TAS5802) { 1676 1672 ret = tasdevice_create_cali_ctrls(tas_priv); 1677 1673 if (ret) { 1678 1674 dev_err(tas_priv->dev, "cali controls error\n"); ··· 1728 1720 switch (tas_priv->chip_id) { 1729 1721 case TAS2563: 1730 1722 case TAS2781: 1723 + case TAS5802: 1724 + case TAS5815: 1731 1725 case TAS5825: 1732 1726 case TAS5827: 1727 + case TAS5828: 1733 1728 /* If DSP FW fail, DSP kcontrol won't be created. */ 1734 1729 tasdevice_dsp_remove(tas_priv); 1735 1730 } ··· 1893 1882 p = (struct snd_kcontrol_new *)tas2781_snd_controls; 1894 1883 size = ARRAY_SIZE(tas2781_snd_controls); 1895 1884 break; 1885 + case TAS5802: 1886 + case TAS5815: 1896 1887 case TAS5825: 1897 1888 case TAS5827: 1889 + case TAS5828: 1898 1890 p = (struct snd_kcontrol_new *)tas5825_snd_controls; 1899 1891 size = ARRAY_SIZE(tas5825_snd_controls); 1900 1892 break; ··· 2068 2054 { "TXNW2570", TAS2570 }, 2069 2055 { "TXNW2572", TAS2572 }, 2070 2056 { "TXNW2781", TAS2781 }, 2057 + { "TXNW5802", TAS5802 }, 2058 + { "TXNW5815", TAS5815 }, 2071 2059 { "TXNW5825", TAS5825 }, 2072 2060 { "TXNW5827", TAS5827 }, 2061 + { "TXNW5828", TAS5828 }, 2073 2062 {}, 2074 2063 }; 2075 2064
+4 -18
sound/soc/codecs/wcd938x-sdw.c
··· 1207 1207 regcache_cache_only(wcd->regmap, true); 1208 1208 } 1209 1209 1210 - pm_runtime_set_autosuspend_delay(dev, 3000); 1211 - pm_runtime_use_autosuspend(dev); 1212 - pm_runtime_mark_last_busy(dev); 1213 - pm_runtime_set_active(dev); 1214 - pm_runtime_enable(dev); 1215 - 1216 1210 ret = component_add(dev, &wcd_sdw_component_ops); 1217 1211 if (ret) 1218 - goto err_disable_rpm; 1212 + return ret; 1213 + 1214 + /* Set suspended until aggregate device is bind */ 1215 + pm_runtime_set_suspended(dev); 1219 1216 1220 1217 return 0; 1221 - 1222 - err_disable_rpm: 1223 - pm_runtime_disable(dev); 1224 - pm_runtime_set_suspended(dev); 1225 - pm_runtime_dont_use_autosuspend(dev); 1226 - 1227 - return ret; 1228 1218 } 1229 1219 1230 1220 static int wcd9380_remove(struct sdw_slave *pdev) ··· 1222 1232 struct device *dev = &pdev->dev; 1223 1233 1224 1234 component_del(dev, &wcd_sdw_component_ops); 1225 - 1226 - pm_runtime_disable(dev); 1227 - pm_runtime_set_suspended(dev); 1228 - pm_runtime_dont_use_autosuspend(dev); 1229 1235 1230 1236 return 0; 1231 1237 }
+1
sound/soc/qcom/sc8280xp.c
··· 192 192 193 193 static const struct of_device_id snd_sc8280xp_dt_match[] = { 194 194 {.compatible = "qcom,qcm6490-idp-sndcard", "qcm6490"}, 195 + {.compatible = "qcom,qcs615-sndcard", "qcs615"}, 195 196 {.compatible = "qcom,qcs6490-rb3gen2-sndcard", "qcs6490"}, 196 197 {.compatible = "qcom,qcs8275-sndcard", "qcs8300"}, 197 198 {.compatible = "qcom,qcs9075-sndcard", "sa8775p"},
+20
sound/soc/sdw_utils/soc_sdw_utils.c
··· 312 312 .dai_num = 1, 313 313 }, 314 314 { 315 + .part_id = 0x1321, 316 + .dais = { 317 + { 318 + .direction = {true, false}, 319 + .dai_name = "rt1320-aif1", 320 + .component_name = "rt1320", 321 + .dai_type = SOC_SDW_DAI_TYPE_AMP, 322 + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, 323 + .init = asoc_sdw_rt_amp_init, 324 + .exit = asoc_sdw_rt_amp_exit, 325 + .rtd_init = asoc_sdw_rt_amp_spk_rtd_init, 326 + .controls = generic_spk_controls, 327 + .num_controls = ARRAY_SIZE(generic_spk_controls), 328 + .widgets = generic_spk_widgets, 329 + .num_widgets = ARRAY_SIZE(generic_spk_widgets), 330 + }, 331 + }, 332 + .dai_num = 1, 333 + }, 334 + { 315 335 .part_id = 0x714, 316 336 .version_id = 3, 317 337 .ignore_internal_dmic = true,
+8 -2
sound/usb/card.c
··· 891 891 */ 892 892 static int try_to_register_card(struct snd_usb_audio *chip, int ifnum) 893 893 { 894 + struct usb_interface *iface; 895 + 894 896 if (check_delayed_register_option(chip) == ifnum || 895 - chip->last_iface == ifnum || 896 - usb_interface_claimed(usb_ifnum_to_if(chip->dev, chip->last_iface))) 897 + chip->last_iface == ifnum) 897 898 return snd_card_register(chip->card); 899 + 900 + iface = usb_ifnum_to_if(chip->dev, chip->last_iface); 901 + if (iface && usb_interface_claimed(iface)) 902 + return snd_card_register(chip->card); 903 + 898 904 return 0; 899 905 } 900 906
+15
sound/usb/mixer.c
··· 1147 1147 } 1148 1148 break; 1149 1149 1150 + case USB_ID(0x045e, 0x070f): /* MS LifeChat LX-3000 Headset */ 1151 + if (!strcmp(kctl->id.name, "Speaker Playback Volume")) { 1152 + usb_audio_info(chip, 1153 + "set volume quirk for MS LifeChat LX-3000\n"); 1154 + cval->res = 192; 1155 + } 1156 + break; 1157 + 1150 1158 case USB_ID(0x0471, 0x0101): 1151 1159 case USB_ID(0x0471, 0x0104): 1152 1160 case USB_ID(0x0471, 0x0105): ··· 1195 1187 usb_audio_info(chip, 1196 1188 "set volume quirk for MOONDROP Quark2\n"); 1197 1189 cval->min = -14208; /* Mute under it */ 1190 + } 1191 + break; 1192 + case USB_ID(0x12d1, 0x3a07): /* Huawei Technologies Co., Ltd. CM-Q3 */ 1193 + if (!strcmp(kctl->id.name, "PCM Playback Volume")) { 1194 + usb_audio_info(chip, 1195 + "set volume quirk for Huawei Technologies Co., Ltd. CM-Q3\n"); 1196 + cval->min = -11264; /* Mute under it */ 1198 1197 } 1199 1198 break; 1200 1199 }
+5
sound/usb/quirks.c
··· 2153 2153 DEVICE_FLG(0x045e, 0x083c, /* MS USB Link headset */ 2154 2154 QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_CTL_MSG_DELAY | 2155 2155 QUIRK_FLAG_DISABLE_AUTOSUSPEND), 2156 + DEVICE_FLG(0x045e, 0x070f, /* MS LifeChat LX-3000 Headset */ 2157 + QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE), 2156 2158 DEVICE_FLG(0x046d, 0x0807, /* Logitech Webcam C500 */ 2157 2159 QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384), 2158 2160 DEVICE_FLG(0x046d, 0x0808, /* Logitech Webcam C600 */ ··· 2182 2180 QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384), 2183 2181 DEVICE_FLG(0x046d, 0x09a4, /* Logitech QuickCam E 3500 */ 2184 2182 QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_IGNORE_CTL_ERROR), 2183 + DEVICE_FLG(0x046d, 0x0a8f, /* Logitech H390 headset */ 2184 + QUIRK_FLAG_CTL_MSG_DELAY_1M | 2185 + QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE), 2185 2186 DEVICE_FLG(0x0499, 0x1506, /* Yamaha THR5 */ 2186 2187 QUIRK_FLAG_GENERIC_IMPLICIT_FB), 2187 2188 DEVICE_FLG(0x0499, 0x1509, /* Steinberg UR22 */