Compare
59e483739f2fd14327ece3f60c4995d060ca46b7..2a31b5378c6db9c4a8d399e5d10d32cd4b732bef
ASoC: amd: yc: disable MSI on resume
BIOS/firmware may re-enable MSI in PCI config space during system
resume even though this driver only uses legacy INTx interrupts. If MSI
is left enabled with stale address and data registers, the device can
write interrupts to a bogus address and cause an IOMMU IO_PAGE_FAULT.
Clear the MSI Enable bit before reinitializing ACP hardware on system
resume. Keep runtime resume separate because firmware does not restore
PCI configuration on that path.
Fixes: c8212df7bc0f ("ASoC: amd: add acp6x pci driver pm ops")
Reported-by: Marek Borůvka <boruvka.marek@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=222119
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20261013125425.3541206-1-mario.limonciello@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mario Limonciello <mario.limonciello@amd.com> · 2026-10-13 12:54 UTC · committed by Mark Brown
26 files changed,
+70
−65
- fs/afs/internal.h
- fs/afs/super.c
- fs/ext4/ext4.h
- fs/ext4/extents-test.c
- fs/ext4/extents.c
- fs/ext4/extents_status.c
- fs/ext4/extents_status.h
- fs/ext4/super.c
- fs/ocfs2/dlm/dlmcommon.h
- fs/ocfs2/dlm/dlmdebug.c
- fs/ocfs2/dlm/dlmrecovery.c
- fs/pipe.c
- include/linux/sched/signal.h
- kernel/watch_queue.c
- samples/pidfd/Makefile
- 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 fs/afs/internal.h
| @@ -251,8 +251,6 @@ struct afs_super_info { | |||
| 251 | 251 | struct afs_volume *volume; /* volume record */ | |
| 252 | 252 | enum afs_flock_mode flock_mode:8; /* File locking emulation mode */ | |
| 253 | 253 | bool dyn_root; /* True if dynamic root */ | |
| 254 | - | /* afs_atcell_get_link() reads ->net_ns in rcu pathwalk */ | |
| 255 | - | struct rcu_head rcu; | |
| 256 | 254 | }; | |
| 257 | 255 | ||
| 258 | 256 | static inline struct afs_super_info *AFS_FS_S(struct super_block *sb) | |
modified fs/afs/super.c
| @@ -523,7 +523,7 @@ static void afs_destroy_sbi(struct afs_super_info *as) | |||
| 523 | 523 | afs_put_volume(as->volume, afs_volume_trace_put_destroy_sbi); | |
| 524 | 524 | afs_unuse_cell(as->cell, afs_cell_trace_unuse_sbi); | |
| 525 | 525 | put_net(as->net_ns); | |
| 526 | - | kfree_rcu(as, rcu); | |
| 526 | + | kfree(as); | |
| 527 | 527 | } | |
| 528 | 528 | } | |
| 529 | 529 | ||
modified fs/ext4/ext4.h
| @@ -1774,8 +1774,6 @@ struct ext4_sb_info { | |||
| 1774 | 1774 | struct list_head s_es_list; /* List of inodes with reclaimable extents */ | |
| 1775 | 1775 | long s_es_nr_inode; | |
| 1776 | 1776 | struct ext4_es_stats s_es_stats; | |
| 1777 | - | /* ext4_get_link() reads the sbi in rcu pathwalk */ | |
| 1778 | - | struct rcu_head s_rcu; | |
| 1779 | 1777 | struct mb_cache *s_ea_block_cache; | |
| 1780 | 1778 | struct mb_cache *s_ea_inode_cache; | |
| 1781 | 1779 | ||
modified fs/ext4/extents-test.c
| @@ -151,7 +151,6 @@ static void extents_kunit_exit(struct kunit *test) | |||
| 151 | 151 | ||
| 152 | 152 | sbi = k_ctx.k_ei->vfs_inode.i_sb->s_fs_info; | |
| 153 | 153 | ext4_es_unregister_shrinker(sbi); | |
| 154 | - | ext4_es_destroy_stats(sbi); | |
| 155 | 154 | deactivate_super(sbi->s_sb); | |
| 156 | 155 | kfree(sbi); | |
| 157 | 156 | kfree(k_ctx.k_ei); | |
| @@ -341,7 +340,6 @@ out: | |||
| 341 | 340 | k_ctx.k_data = NULL; | |
| 342 | 341 | ||
| 343 | 342 | ext4_es_unregister_shrinker(sbi); | |
| 344 | - | ext4_es_destroy_stats(sbi); | |
| 345 | 343 | out_deactivate: | |
| 346 | 344 | deactivate_locked_super(sb); | |
| 347 | 345 | kfree(sbi); | |
modified fs/ext4/extents.c
| @@ -6409,7 +6409,6 @@ EXPORT_SYMBOL_FOR_EXT4_TEST(__ext4_ext_dirty); | |||
| 6409 | 6409 | EXPORT_SYMBOL_FOR_EXT4_TEST(ext4_ext_zeroout); | |
| 6410 | 6410 | EXPORT_SYMBOL_FOR_EXT4_TEST(ext4_es_register_shrinker); | |
| 6411 | 6411 | EXPORT_SYMBOL_FOR_EXT4_TEST(ext4_es_unregister_shrinker); | |
| 6412 | - | EXPORT_SYMBOL_FOR_EXT4_TEST(ext4_es_destroy_stats); | |
| 6413 | 6412 | EXPORT_SYMBOL_FOR_EXT4_TEST(ext4_map_create_blocks); | |
| 6414 | 6413 | EXPORT_SYMBOL_FOR_EXT4_TEST(ext4_es_init_tree); | |
| 6415 | 6414 | EXPORT_SYMBOL_FOR_EXT4_TEST(ext4_es_lookup_extent); | |
modified fs/ext4/extents_status.c
| @@ -1881,17 +1881,12 @@ err1: | |||
| 1881 | 1881 | } | |
| 1882 | 1882 | ||
| 1883 | 1883 | void ext4_es_unregister_shrinker(struct ext4_sb_info *sbi) | |
| 1884 | - | { | |
| 1885 | - | shrinker_free(sbi->s_es_shrinker); | |
| 1886 | - | } | |
| 1887 | - | ||
| 1888 | - | /* ext4_get_link() bumps the hit and miss counters in rcu pathwalk */ | |
| 1889 | - | void ext4_es_destroy_stats(struct ext4_sb_info *sbi) | |
| 1890 | 1884 | { | |
| 1891 | 1885 | percpu_counter_destroy(&sbi->s_es_stats.es_stats_cache_hits); | |
| 1892 | 1886 | percpu_counter_destroy(&sbi->s_es_stats.es_stats_cache_misses); | |
| 1893 | 1887 | percpu_counter_destroy(&sbi->s_es_stats.es_stats_all_cnt); | |
| 1894 | 1888 | percpu_counter_destroy(&sbi->s_es_stats.es_stats_shk_cnt); | |
| 1889 | + | shrinker_free(sbi->s_es_shrinker); | |
| 1895 | 1890 | } | |
| 1896 | 1891 | ||
| 1897 | 1892 | /* | |
modified fs/ext4/extents_status.h
| @@ -238,7 +238,6 @@ static inline void ext4_es_store_pblock_status(struct extent_status *es, | |||
| 238 | 238 | ||
| 239 | 239 | extern int ext4_es_register_shrinker(struct ext4_sb_info *sbi); | |
| 240 | 240 | extern void ext4_es_unregister_shrinker(struct ext4_sb_info *sbi); | |
| 241 | - | extern void ext4_es_destroy_stats(struct ext4_sb_info *sbi); | |
| 242 | 241 | ||
| 243 | 242 | extern int ext4_seq_es_shrinker_info_show(struct seq_file *seq, void *v); | |
| 244 | 243 | ||
modified fs/ext4/super.c
| @@ -1279,14 +1279,6 @@ static void ext4_flex_groups_free(struct ext4_sb_info *sbi) | |||
| 1279 | 1279 | } | |
| 1280 | 1280 | } | |
| 1281 | 1281 | ||
| 1282 | - | static void ext4_put_sbi_rcu(struct rcu_head *head) | |
| 1283 | - | { | |
| 1284 | - | struct ext4_sb_info *sbi = container_of(head, struct ext4_sb_info, s_rcu); | |
| 1285 | - | ||
| 1286 | - | ext4_es_destroy_stats(sbi); | |
| 1287 | - | kfree(sbi); | |
| 1288 | - | } | |
| 1289 | - | ||
| 1290 | 1282 | static void ext4_put_super(struct super_block *sb) | |
| 1291 | 1283 | { | |
| 1292 | 1284 | struct ext4_sb_info *sbi = EXT4_SB(sb); | |
| @@ -1382,6 +1374,7 @@ static void ext4_put_super(struct super_block *sb) | |||
| 1382 | 1374 | ext4_stop_mmpd(sbi); | |
| 1383 | 1375 | ||
| 1384 | 1376 | brelse(sbi->s_sbh); | |
| 1377 | + | sb->s_fs_info = NULL; | |
| 1385 | 1378 | /* | |
| 1386 | 1379 | * Now that we are completely done shutting down the | |
| 1387 | 1380 | * superblock, we need to actually destroy the kobject. | |
| @@ -1394,8 +1387,7 @@ static void ext4_put_super(struct super_block *sb) | |||
| 1394 | 1387 | #if IS_ENABLED(CONFIG_UNICODE) | |
| 1395 | 1388 | utf8_unload(sb->s_encoding); | |
| 1396 | 1389 | #endif | |
| 1397 | - | /* ext4_get_link() reads the sbi and the counters in rcu pathwalk */ | |
| 1398 | - | call_rcu(&sbi->s_rcu, ext4_put_sbi_rcu); | |
| 1390 | + | kfree(sbi); | |
| 1399 | 1391 | } | |
| 1400 | 1392 | ||
| 1401 | 1393 | static struct kmem_cache *ext4_inode_cachep; | |
| @@ -5814,7 +5806,6 @@ failed_mount3a: | |||
| 5814 | 5806 | /* Drain deferred EA inode iputs from journal replay */ | |
| 5815 | 5807 | flush_delayed_work(&sbi->s_ea_inode_work); | |
| 5816 | 5808 | ext4_es_unregister_shrinker(sbi); | |
| 5817 | - | ext4_es_destroy_stats(sbi); | |
| 5818 | 5809 | failed_mount3: | |
| 5819 | 5810 | /* flush s_sb_upd_work before sbi destroy */ | |
| 5820 | 5811 | flush_work(&sbi->s_sb_upd_work); | |
modified fs/ocfs2/dlm/dlmcommon.h
| @@ -435,8 +435,6 @@ enum { | |||
| 435 | 435 | DLM_DEREF_LOCKRES_DONE = 522, | |
| 436 | 436 | }; | |
| 437 | 437 | ||
| 438 | - | extern spinlock_t dlm_reco_state_lock; | |
| 439 | - | ||
| 440 | 438 | struct dlm_reco_node_data | |
| 441 | 439 | { | |
| 442 | 440 | int state; | |
modified fs/ocfs2/dlm/dlmdebug.c
| @@ -736,11 +736,8 @@ static int debug_state_print(struct dlm_ctxt *dlm, char *buf, int len) | |||
| 736 | 736 | buf + out, len - out); | |
| 737 | 737 | out += scnprintf(buf + out, len - out, "\n"); | |
| 738 | 738 | ||
| 739 | - | spin_unlock(&dlm->spinlock); | |
| 740 | - | ||
| 741 | 739 | /* Recovery Node State: */ | |
| 742 | 740 | out += scnprintf(buf + out, len - out, "Recovery Node State:\n"); | |
| 743 | - | spin_lock(&dlm_reco_state_lock); | |
| 744 | 741 | list_for_each_entry(node, &dlm->reco.node_data, list) { | |
| 745 | 742 | switch (node->state) { | |
| 746 | 743 | case DLM_RECO_NODE_DATA_INIT: | |
| @@ -772,7 +769,7 @@ static int debug_state_print(struct dlm_ctxt *dlm, char *buf, int len) | |||
| 772 | 769 | node->node_num, state); | |
| 773 | 770 | } | |
| 774 | 771 | ||
| 775 | - | spin_unlock(&dlm_reco_state_lock); | |
| 772 | + | spin_unlock(&dlm->spinlock); | |
| 776 | 773 | ||
| 777 | 774 | return out; | |
| 778 | 775 | } | |
modified fs/ocfs2/dlm/dlmrecovery.c
| @@ -80,7 +80,7 @@ static int dlm_lockres_master_requery(struct dlm_ctxt *dlm, | |||
| 80 | 80 | ||
| 81 | 81 | static u64 dlm_get_next_mig_cookie(void); | |
| 82 | 82 | ||
| 83 | - | DEFINE_SPINLOCK(dlm_reco_state_lock); | |
| 83 | + | static DEFINE_SPINLOCK(dlm_reco_state_lock); | |
| 84 | 84 | static DEFINE_SPINLOCK(dlm_mig_cookie_lock); | |
| 85 | 85 | static u64 dlm_mig_cookie = 1; | |
| 86 | 86 | ||
modified fs/pipe.c
| @@ -838,11 +838,9 @@ pipe_fasync(int fd, struct file *filp, int on) | |||
| 838 | 838 | if (filp->f_mode & FMODE_READ) | |
| 839 | 839 | retval = fasync_helper(fd, filp, on, &pipe->fasync_readers); | |
| 840 | 840 | if ((filp->f_mode & FMODE_WRITE) && retval >= 0) { | |
| 841 | - | int read_ret = retval; | |
| 842 | - | ||
| 843 | 841 | retval = fasync_helper(fd, filp, on, &pipe->fasync_writers); | |
| 844 | - | /* Undo only a reader entry added by this call. */ | |
| 845 | - | if (retval < 0 && read_ret > 0) | |
| 842 | + | if (retval < 0 && (filp->f_mode & FMODE_READ)) | |
| 843 | + | /* this can happen only if on == T */ | |
| 846 | 844 | fasync_helper(-1, filp, 0, &pipe->fasync_readers); | |
| 847 | 845 | } | |
| 848 | 846 | mutex_unlock(&pipe->mutex); | |
modified include/linux/sched/signal.h
| @@ -130,8 +130,8 @@ struct signal_struct { | |||
| 130 | 130 | * process will inherit a flag if they should look for a | |
| 131 | 131 | * child_subreaper process at exit. | |
| 132 | 132 | */ | |
| 133 | - | bool is_child_subreaper; | |
| 134 | - | bool has_child_subreaper; | |
| 133 | + | unsigned int is_child_subreaper:1; | |
| 134 | + | unsigned int has_child_subreaper:1; | |
| 135 | 135 | unsigned int autoreap:1; | |
| 136 | 136 | ||
| 137 | 137 | #ifdef CONFIG_POSIX_TIMERS | |
modified kernel/watch_queue.c
| @@ -101,7 +101,7 @@ static bool post_one_notification(struct watch_queue *wqueue, | |||
| 101 | 101 | struct pipe_inode_info *pipe = wqueue->pipe; | |
| 102 | 102 | struct pipe_buffer *buf; | |
| 103 | 103 | struct page *page; | |
| 104 | - | unsigned int head, tail, note, offset, len, nr_notes; | |
| 104 | + | unsigned int head, tail, note, offset, len; | |
| 105 | 105 | bool done = false; | |
| 106 | 106 | ||
| 107 | 107 | spin_lock_irq(&pipe->rd_wait.lock); | |
| @@ -111,10 +111,8 @@ static bool post_one_notification(struct watch_queue *wqueue, | |||
| 111 | 111 | if (pipe_full(head, tail, pipe->ring_size)) | |
| 112 | 112 | goto lost; | |
| 113 | 113 | ||
| 114 | - | /* Pairs with the smp_store_release() in watch_queue_set_size(). */ | |
| 115 | - | nr_notes = smp_load_acquire(&wqueue->nr_notes); | |
| 116 | - | note = find_first_bit(wqueue->notes_bitmap, nr_notes); | |
| 117 | - | if (note >= nr_notes) | |
| 114 | + | note = find_first_bit(wqueue->notes_bitmap, wqueue->nr_notes); | |
| 115 | + | if (note >= wqueue->nr_notes) | |
| 118 | 116 | goto lost; | |
| 119 | 117 | ||
| 120 | 118 | page = wqueue->notes[note / WATCH_QUEUE_NOTES_PER_PAGE]; | |
| @@ -299,8 +297,7 @@ long watch_queue_set_size(struct pipe_inode_info *pipe, unsigned int nr_notes) | |||
| 299 | 297 | wqueue->notes = pages; | |
| 300 | 298 | wqueue->notes_bitmap = bitmap; | |
| 301 | 299 | wqueue->nr_pages = nr_pages; | |
| 302 | - | /* Pairs with the smp_load_acquire() in post_one_notification(). */ | |
| 303 | - | smp_store_release(&wqueue->nr_notes, nr_notes); | |
| 300 | + | wqueue->nr_notes = nr_notes; | |
| 304 | 301 | return 0; | |
| 305 | 302 | ||
| 306 | 303 | error_p: | |
modified samples/pidfd/Makefile
| @@ -1,4 +1,4 @@ | |||
| 1 | 1 | # SPDX-License-Identifier: GPL-2.0 | |
| 2 | - | userprogs-always-y += pidfd-metadata | |
| 2 | + | usertprogs-always-y += pidfd-metadata | |
| 3 | 3 | ||
| 4 | 4 | userccflags += -I usr/include | |
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 */ | |