Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
ASoC: rockchip: i2s-tdm: Fix panic on rockchip_dai_tdm_slot
Browse files Browse the repository at this point in the history
SError Interrupt on CPU0, code 0xbe000011 -- SError
CPU: 0 PID: 7 Comm: kworker/u16:0 Not tainted 5.10.66 torvalds#107
Workqueue: events_unbound deferred_probe_work_func
pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
pc : _raw_spin_unlock_irqrestore+0x28/0x60
lr : regmap_unlock_spinlock+0x18/0x28
sp : ffffffc01251b850
x29: ffffffc01251b850 x28: ffffff81039afa80
x27: ffffff810349b1b0 x26: ffffffc011aa5d20
x25: 0000000000000000 x24: ffffff8100023000
x23: 0000000000000030 x22: 0000000000003fff
x21: 0000000000001e7f x20: 0000000000000000
x19: 0000000000000000 x18: ffffffc0123d10c0
x17: 0000000000000080 x16: 00000000000000d8
x15: ffffffc0105db5c8 x14: ffffffc011668c18
x13: 0000000062b0642e x12: 7fffffffffffffff
x11: 0000000000000000 x10: 0000000000000030
x9 : 0000000100000001 x8 : ffffff8100325880
x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000
x3 : 0000000000003eff x2 : 0000000000001e7f
x1 : 0000000000000000 x0 : ffffff8100023000
Kernel panic - not syncing: Asynchronous SError Interrupt
CPU: 0 PID: 7 Comm: kworker/u16:0 Not tainted 5.10.66 torvalds#107
Workqueue: events_unbound deferred_probe_work_func
Call trace:
 dump_backtrace+0x0/0x1c8
 show_stack+0x1c/0x2c
 dump_stack_lvl+0xdc/0x12c
 dump_stack+0x1c/0x64
 panic+0x150/0x3a4
 test_taint+0x0/0x30
 arm64_serror_panic+0x78/0x84
 do_serror+0xe0/0x100
 el1_error+0x94/0x118
 _raw_spin_unlock_irqrestore+0x28/0x60
 regmap_unlock_spinlock+0x18/0x28
 regmap_update_bits_base+0x78/0x9c
 rockchip_dai_tdm_slot+0x5c/0x94
 snd_soc_dai_set_tdm_slot+0xac/0x124
 asoc_simple_init_dai+0x64/0xc4
 asoc_simple_dai_init+0x74/0x178
 snd_soc_link_init+0x28/0x84
 snd_soc_bind_card+0x6b4/0xad0
 snd_soc_register_card+0xf8/0x114
 devm_snd_soc_register_card+0x48/0x90
 asoc_simple_probe+0x2a0/0x348
 ...

Fixes: 2b987b2 ("ASoC: rockchip: i2s_tdm: add support for tdm mode")
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib5ceb2f21bad346285c814aaf4c367e71c44230a
  • Loading branch information
Sugar Zhang authored and rkhuangtao committed Jun 30, 2022
1 parent 1d20cb9 commit 112f4f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/rockchip/rockchip_i2s_tdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1401,10 +1401,12 @@ static int rockchip_dai_tdm_slot(struct snd_soc_dai *dai,
mask = TDM_SLOT_BIT_WIDTH_MSK | TDM_FRAME_WIDTH_MSK;
val = TDM_SLOT_BIT_WIDTH(slot_width) |
TDM_FRAME_WIDTH(slots * slot_width);
pm_runtime_get_sync(dai->dev);
regmap_update_bits(i2s_tdm->regmap, I2S_TDM_TXCR,
mask, val);
regmap_update_bits(i2s_tdm->regmap, I2S_TDM_RXCR,
mask, val);
pm_runtime_put(dai->dev);

return 0;
}
Expand Down

0 comments on commit 112f4f4

Please sign in to comment.