Compare
e2c278bc37b52222e53d5f88971ffcfacd6c97be..a3bb7a0184fbf9fed14aacb9773fe9f6f2097c1b
Merge tag 'sound-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Here are the (hopefully) last bits for 7.3. At this time, all changes are small and device-specific ASoC fixes. Not super-urgent, but should be fairly safe to take" * tag 'sound-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: amd: yc: disable MSI on resume ASoC: nau8822: Fix the 128x oversampling switch bits ASoC: wm8978: Fix the 128x oversampling switch bits ASoC: max98371: Fix the Speaker DHT Min Volume bits ASoC: pcm3168a: Fix the DAC zero flag polarity bit ASoC: cs42l52: Fix the NG Type Switch bit ASoC: cs42l56: Put the Limiter Cushion control on the limiter register ASoC: stm32: spdifrx: fix synchronization state check ASoC: Intel: avs: Reset the stream unless it is already prepared ASoC: SOF: sof-client: Use event-handler mutex consistently ASoC: SOF: ipc4-topology: Fix shift-out-of-bounds for aggregated ALH capture
Linus Torvalds <torvalds@linux-foundation.org> · 2026-10-17 01:29 UTC
16 files changed,
+90
−24
- drivers/pci/pci.c
- drivers/pci/quirks.c
- kernel/printk/nbcon.c
- kernel/printk/printk.c
- kernel/reboot.c
- sound/soc/amd/yc/pci-acp6x.c
- sound/soc/codecs/cs42l52.c
- sound/soc/codecs/cs42l56.c
- sound/soc/codecs/max98371.c
- sound/soc/codecs/nau8822.c
- sound/soc/codecs/pcm3168a.c
- sound/soc/codecs/wm8978.c
- sound/soc/intel/avs/pcm.c
- sound/soc/sof/ipc4-topology.c
- sound/soc/sof/sof-client.c
- sound/soc/stm/stm32_spdifrx.c
modified drivers/pci/pci.c
| @@ -1246,9 +1246,11 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout) | |||
| 1246 | 1246 | * initialize. | |
| 1247 | 1247 | * | |
| 1248 | 1248 | * If the device is below a Root Port with Configuration RRS | |
| 1249 | - | * Software Visibility enabled, reading the Vendor ID returns a | |
| 1249 | + | * Software Visibility enabled, reading the Vendor ID may return a | |
| 1250 | 1250 | * special data value if the device responded with RRS. Read the | |
| 1251 | - | * Vendor ID until we get non-RRS status. | |
| 1251 | + | * Vendor ID until we get non-RRS status and something other than | |
| 1252 | + | * ~0. The Vendor ID of VFs reads ~0, so check their Command | |
| 1253 | + | * register instead. | |
| 1252 | 1254 | * | |
| 1253 | 1255 | * If there's no Root Port or Configuration RRS Software Visibility | |
| 1254 | 1256 | * is not enabled, the device may still respond with RRS, but | |
| @@ -1268,8 +1270,13 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout) | |||
| 1268 | 1270 | ||
| 1269 | 1271 | if (root && root->config_rrs_sv) { | |
| 1270 | 1272 | pci_read_config_dword(dev, PCI_VENDOR_ID, &id); | |
| 1271 | - | if (!pci_bus_rrs_vendor_id(id)) | |
| 1272 | - | break; | |
| 1273 | + | if (!pci_bus_rrs_vendor_id(id)) { | |
| 1274 | + | if (PCI_POSSIBLE_ERROR(id) && dev->is_virtfn) | |
| 1275 | + | pci_read_config_dword(dev, PCI_COMMAND, | |
| 1276 | + | &id); | |
| 1277 | + | if (!PCI_POSSIBLE_ERROR(id)) | |
| 1278 | + | break; | |
| 1279 | + | } | |
| 1273 | 1280 | } else { | |
| 1274 | 1281 | pci_read_config_dword(dev, PCI_COMMAND, &id); | |
| 1275 | 1282 | if (!PCI_POSSIBLE_ERROR(id)) | |
modified drivers/pci/quirks.c
| @@ -5634,6 +5634,18 @@ static void quirk_no_flr_snet(struct pci_dev *dev) | |||
| 5634 | 5634 | } | |
| 5635 | 5635 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SOLIDRUN, 0x1000, quirk_no_flr_snet); | |
| 5636 | 5636 | ||
| 5637 | + | /* Some Samsung SSDs advertise Immediate Readiness but aren't ready after FLR */ | |
| 5638 | + | static void quirk_no_imm_ready(struct pci_dev *dev) | |
| 5639 | + | { | |
| 5640 | + | if (!dev->imm_ready) | |
| 5641 | + | return; | |
| 5642 | + | ||
| 5643 | + | pci_info(dev, "Ignoring incorrectly advertised Immediate Readiness support\n"); | |
| 5644 | + | dev->imm_ready = 0; | |
| 5645 | + | } | |
| 5646 | + | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SAMSUNG, 0xa80c, quirk_no_imm_ready); | |
| 5647 | + | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SAMSUNG, 0xa80d, quirk_no_imm_ready); | |
| 5648 | + | ||
| 5637 | 5649 | static void quirk_no_ext_tags(struct pci_dev *pdev) | |
| 5638 | 5650 | { | |
| 5639 | 5651 | struct pci_host_bridge *bridge = pci_find_host_bridge(pdev->bus); | |
modified kernel/printk/nbcon.c
| @@ -2005,7 +2005,8 @@ void nbcon_kdb_release(struct nbcon_write_context *wctxt) | |||
| 2005 | 2005 | } | |
| 2006 | 2006 | ||
| 2007 | 2007 | /** | |
| 2008 | - | * nbcon_is_braille - Checks whether the nbcon write context is using Braille console | |
| 2008 | + | * nbcon_write_context_is_braille - Checks whether the nbcon write context | |
| 2009 | + | * is using Braille console | |
| 2009 | 2010 | * | |
| 2010 | 2011 | * @wctxt: checked nbcon write context | |
| 2011 | 2012 | * | |
modified kernel/printk/printk.c
| @@ -3862,7 +3862,7 @@ static int __init printk_set_kthreads_ready(void) | |||
| 3862 | 3862 | ||
| 3863 | 3863 | return 0; | |
| 3864 | 3864 | } | |
| 3865 | - | early_initcall(printk_set_kthreads_ready); | |
| 3865 | + | subsys_initcall(printk_set_kthreads_ready); | |
| 3866 | 3866 | #endif /* CONFIG_PRINTK */ | |
| 3867 | 3867 | ||
| 3868 | 3868 | static int __read_mostly keep_bootcon; | |
modified kernel/reboot.c
| @@ -8,6 +8,7 @@ | |||
| 8 | 8 | #define pr_fmt(fmt) "reboot: " fmt | |
| 9 | 9 | ||
| 10 | 10 | #include <linux/atomic.h> | |
| 11 | + | #include <linux/console.h> | |
| 11 | 12 | #include <linux/ctype.h> | |
| 12 | 13 | #include <linux/export.h> | |
| 13 | 14 | #include <linux/kexec.h> | |
| @@ -94,6 +95,14 @@ void emergency_restart(void) | |||
| 94 | 95 | { | |
| 95 | 96 | kmsg_dump(KMSG_DUMP_EMERG); | |
| 96 | 97 | system_state = SYSTEM_RESTART; | |
| 98 | + | ||
| 99 | + | /* | |
| 100 | + | * NBCON kthreads won't be flushed and stopped properly in | |
| 101 | + | * the emergency restart. Move them to the atomic mode. | |
| 102 | + | */ | |
| 103 | + | nbcon_cpu_emergency_enter(); | |
| 104 | + | printk_trigger_flush(); | |
| 105 | + | ||
| 97 | 106 | machine_emergency_restart(); | |
| 98 | 107 | } | |
| 99 | 108 | EXPORT_SYMBOL_GPL(emergency_restart); | |
modified sound/soc/amd/yc/pci-acp6x.c
| @@ -301,7 +301,7 @@ static int snd_acp6x_suspend(struct device *dev) | |||
| 301 | 301 | return ret; | |
| 302 | 302 | } | |
| 303 | 303 | ||
| 304 | - | static int snd_acp6x_resume(struct device *dev) | |
| 304 | + | static int snd_acp6x_runtime_resume(struct device *dev) | |
| 305 | 305 | { | |
| 306 | 306 | struct acp6x_dev_data *adata; | |
| 307 | 307 | int ret; | |
| @@ -313,8 +313,42 @@ static int snd_acp6x_resume(struct device *dev) | |||
| 313 | 313 | return ret; | |
| 314 | 314 | } | |
| 315 | 315 | ||
| 316 | + | static void acp6x_disable_msi_on_resume(struct pci_dev *pdev) | |
| 317 | + | { | |
| 318 | + | u16 control; | |
| 319 | + | ||
| 320 | + | if (!pdev->msi_cap) | |
| 321 | + | return; | |
| 322 | + | ||
| 323 | + | pci_read_config_word(pdev, pdev->msi_cap + PCI_MSI_FLAGS, &control); | |
| 324 | + | if (control & PCI_MSI_FLAGS_ENABLE) { | |
| 325 | + | dev_warn(&pdev->dev, | |
| 326 | + | "ACP: MSI unexpectedly enabled after resume (flags=0x%04x), disabling\n", | |
| 327 | + | control); | |
| 328 | + | control &= ~PCI_MSI_FLAGS_ENABLE; | |
| 329 | + | pci_write_config_word(pdev, pdev->msi_cap + PCI_MSI_FLAGS, control); | |
| 330 | + | } | |
| 331 | + | } | |
| 332 | + | ||
| 333 | + | static int snd_acp6x_resume(struct device *dev) | |
| 334 | + | { | |
| 335 | + | struct pci_dev *pdev = to_pci_dev(dev); | |
| 336 | + | ||
| 337 | + | /* | |
| 338 | + | * BIOS/firmware may re-enable MSI in PCI config space during | |
| 339 | + | * system resume even though this driver only uses legacy INTx | |
| 340 | + | * interrupts. If MSI is left enabled with stale address/data | |
| 341 | + | * registers, the device will write interrupts to a bogus address | |
| 342 | + | * causing IOMMU IO_PAGE_FAULT and interrupt delivery failure. | |
| 343 | + | * Explicitly clear the MSI Enable bit before reinitializing | |
| 344 | + | * the ACP hardware. | |
| 345 | + | */ | |
| 346 | + | acp6x_disable_msi_on_resume(pdev); | |
| 347 | + | return snd_acp6x_runtime_resume(dev); | |
| 348 | + | } | |
| 349 | + | ||
| 316 | 350 | static const struct dev_pm_ops acp6x_pm = { | |
| 317 | - | RUNTIME_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume, NULL) | |
| 351 | + | RUNTIME_PM_OPS(snd_acp6x_suspend, snd_acp6x_runtime_resume, NULL) | |
| 318 | 352 | SYSTEM_SLEEP_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume) | |
| 319 | 353 | }; | |
| 320 | 354 | ||
modified sound/soc/codecs/cs42l52.c
| @@ -290,7 +290,7 @@ static const char * const cs42l52_ng_type_text[] = { | |||
| 290 | 290 | }; | |
| 291 | 291 | ||
| 292 | 292 | static SOC_ENUM_SINGLE_DECL(ng_type_enum, | |
| 293 | - | CS42L52_NOISE_GATE_CTL, 6, | |
| 293 | + | CS42L52_NOISE_GATE_CTL, 7, | |
| 294 | 294 | cs42l52_ng_type_text); | |
| 295 | 295 | ||
| 296 | 296 | static const char * const left_swap_text[] = { | |
modified sound/soc/codecs/cs42l56.c
| @@ -481,7 +481,7 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = { | |||
| 481 | 481 | 0, 0x3f, 0, 0), | |
| 482 | 482 | SOC_SINGLE_TLV("Limiter MAX", CS42L56_LIM_THRESHOLD_CTL, | |
| 483 | 483 | 5, 0x07, 1, alc_tlv), | |
| 484 | - | SOC_SINGLE_TLV("Limiter Cushion", CS42L56_ALC_THRESHOLD, | |
| 484 | + | SOC_SINGLE_TLV("Limiter Cushion", CS42L56_LIM_THRESHOLD_CTL, | |
| 485 | 485 | 2, 0x07, 1, alc_tlv), | |
| 486 | 486 | ||
| 487 | 487 | SOC_SINGLE("NG Switch", CS42L56_NOISE_GATE_CTL, 6, 1, 1), | |
modified sound/soc/codecs/max98371.c
| @@ -166,7 +166,7 @@ static const struct snd_kcontrol_new max98371_snd_controls[] = { | |||
| 166 | 166 | 0, (1<<MAX98371_DHT_MAX_WIDTH)-1, 0, | |
| 167 | 167 | max98371_dht_max_gain), | |
| 168 | 168 | SOC_SINGLE_TLV("Speaker DHT Min Volume", MAX98371_DHT_GAIN, | |
| 169 | - | 0, (1<<MAX98371_DHT_GAIN_WIDTH)-1, 0, | |
| 169 | + | 4, (1<<MAX98371_DHT_GAIN_WIDTH)-1, 0, | |
| 170 | 170 | max98371_dht_min_gain), | |
| 171 | 171 | SOC_SINGLE_TLV("Speaker DHT Rotation Volume", MAX98371_DHT_GAIN, | |
| 172 | 172 | 0, (1<<MAX98371_DHT_ROT_WIDTH)-1, 0, | |
modified sound/soc/codecs/nau8822.c
| @@ -383,9 +383,9 @@ static const struct snd_kcontrol_new nau8822_snd_controls[] = { | |||
| 383 | 383 | NAU8822_REG_RIGHT_ADC_BOOST_CONTROL, 0, 7, 0, boost_tlv), | |
| 384 | 384 | ||
| 385 | 385 | SOC_SINGLE("DAC 128x Oversampling Switch", | |
| 386 | - | NAU8822_REG_DAC_CONTROL, 5, 1, 0), | |
| 386 | + | NAU8822_REG_DAC_CONTROL, 3, 1, 0), | |
| 387 | 387 | SOC_SINGLE("ADC 128x Oversampling Switch", | |
| 388 | - | NAU8822_REG_ADC_CONTROL, 5, 1, 0), | |
| 388 | + | NAU8822_REG_ADC_CONTROL, 3, 1, 0), | |
| 389 | 389 | }; | |
| 390 | 390 | ||
| 391 | 391 | /* LMAIN and RMAIN Mixer */ | |
modified sound/soc/codecs/pcm3168a.c
| @@ -103,7 +103,7 @@ static SOC_ENUM_SINGLE_DECL(pcm3168a_dac_zf_func, PCM3168A_DAC_ATT_DEMP_ZF, | |||
| 103 | 103 | static const char *const pcm3168a_pol[] = { "Active High", "Active Low" }; | |
| 104 | 104 | ||
| 105 | 105 | static SOC_ENUM_SINGLE_DECL(pcm3168a_dac_zf_pol, PCM3168A_DAC_ATT_DEMP_ZF, | |
| 106 | - | PCM3168A_DAC_ATSPDA_SHIFT, pcm3168a_pol); | |
| 106 | + | PCM3168A_DAC_ZREV_SHIFT, pcm3168a_pol); | |
| 107 | 107 | ||
| 108 | 108 | static const char *const pcm3168a_con[] = { "Differential", "Single-Ended" }; | |
| 109 | 109 | ||
modified sound/soc/codecs/wm8978.c
| @@ -255,9 +255,9 @@ static const struct snd_kcontrol_new wm8978_snd_controls[] = { | |||
| 255 | 255 | ||
| 256 | 256 | /* DAC / ADC oversampling */ | |
| 257 | 257 | SOC_SINGLE("DAC 128x Oversampling Switch", WM8978_DAC_CONTROL, | |
| 258 | - | 5, 1, 0), | |
| 258 | + | 3, 1, 0), | |
| 259 | 259 | SOC_SINGLE("ADC 128x Oversampling Switch", WM8978_ADC_CONTROL, | |
| 260 | - | 5, 1, 0), | |
| 260 | + | 3, 1, 0), | |
| 261 | 261 | }; | |
| 262 | 262 | ||
| 263 | 263 | /* Mixer #1: Output (OUT1, OUT2) Mixer: mix AUX, Input mixer output and DAC */ | |
modified sound/soc/intel/avs/pcm.c
| @@ -756,7 +756,7 @@ static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_so | |||
| 756 | 756 | data = snd_soc_dai_get_dma_data(dai, substream); | |
| 757 | 757 | host_stream = data->host_stream; | |
| 758 | 758 | ||
| 759 | - | if (runtime->state == SNDRV_PCM_STATE_XRUN) | |
| 759 | + | if (runtime->state != SNDRV_PCM_STATE_PREPARED) | |
| 760 | 760 | hdac_stream(host_stream)->prepared = false; | |
| 761 | 761 | if (hdac_stream(host_stream)->prepared) | |
| 762 | 762 | return 0; | |
modified sound/soc/sof/ipc4-topology.c
| @@ -2458,11 +2458,14 @@ _sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget, | |||
| 2458 | 2458 | ch_map >>= 4; | |
| 2459 | 2459 | } | |
| 2460 | 2460 | ||
| 2461 | - | if (swidget->id == snd_soc_dapm_dai_in && ch_count == out_ref_channels) { | |
| 2461 | + | if ((swidget->id == snd_soc_dapm_dai_in && ch_count == out_ref_channels) || | |
| 2462 | + | ch_count < blob->alh_cfg.device_count) { | |
| 2462 | 2463 | /* | |
| 2463 | 2464 | * For playback DAI widgets where the channel number is equal to | |
| 2464 | - | * the output reference channels, set the step = 0 to ensure all | |
| 2465 | - | * the ch_mask is applied to all alh mappings. | |
| 2465 | + | * the output reference channels, or when there are fewer | |
| 2466 | + | * channels than aggregated devices (e.g. a mono capture | |
| 2467 | + | * stream split across multiple links), set step = 0 to | |
| 2468 | + | * ensure all the ch_mask is applied to all alh mappings. | |
| 2466 | 2469 | */ | |
| 2467 | 2470 | mask = ch_mask; | |
| 2468 | 2471 | step = 0; | |
modified sound/soc/sof/sof-client.c
| @@ -576,7 +576,7 @@ void sof_client_unregister_ipc_rx_handler(struct sof_client_dev *cdev, | |||
| 576 | 576 | struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev); | |
| 577 | 577 | struct sof_ipc_event_entry *event; | |
| 578 | 578 | ||
| 579 | - | guard(mutex)(&sdev->ipc_client_mutex); | |
| 579 | + | guard(mutex)(&sdev->client_event_handler_mutex); | |
| 580 | 580 | ||
| 581 | 581 | list_for_each_entry(event, &sdev->ipc_rx_handler_list, list) { | |
| 582 | 582 | if (event->cdev == cdev && event->ipc_msg_type == ipc_msg_type) { | |
| @@ -593,7 +593,7 @@ void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev) | |||
| 593 | 593 | { | |
| 594 | 594 | struct sof_state_event_entry *event; | |
| 595 | 595 | ||
| 596 | - | guard(mutex)(&sdev->ipc_client_mutex); | |
| 596 | + | guard(mutex)(&sdev->client_event_handler_mutex); | |
| 597 | 597 | ||
| 598 | 598 | list_for_each_entry(event, &sdev->fw_state_handler_list, list) | |
| 599 | 599 | event->callback(event->cdev, sdev->fw_state); | |
| @@ -628,7 +628,7 @@ void sof_client_unregister_fw_state_handler(struct sof_client_dev *cdev) | |||
| 628 | 628 | struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev); | |
| 629 | 629 | struct sof_state_event_entry *event; | |
| 630 | 630 | ||
| 631 | - | guard(mutex)(&sdev->ipc_client_mutex); | |
| 631 | + | guard(mutex)(&sdev->client_event_handler_mutex); | |
| 632 | 632 | ||
| 633 | 633 | list_for_each_entry(event, &sdev->fw_state_handler_list, list) { | |
| 634 | 634 | if (event->cdev == cdev) { | |
modified sound/soc/stm/stm32_spdifrx.c
| @@ -720,7 +720,7 @@ static irqreturn_t stm32_spdifrx_isr(int irq, void *devid) | |||
| 720 | 720 | ||
| 721 | 721 | if (err) { | |
| 722 | 722 | regmap_read(spdifrx->regmap, STM32_SPDIFRX_CR, &cr); | |
| 723 | - | sync_state = FIELD_GET(SPDIFRX_CR_SPDIFEN_MASK, cr) && | |
| 723 | + | sync_state = FIELD_GET(SPDIFRX_CR_SPDIFEN_MASK, cr) == | |
| 724 | 724 | SPDIFRX_SPDIFEN_SYNC; | |
| 725 | 725 | ||
| 726 | 726 | /* SPDIFRX is in STATE_STOP. Disable SPDIFRX to clear errors */ | |