Re: snd_soc_dai_set_tdm_slot with slot=0 broken since 6.12.31 kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Giedrius

> Since Raspberry Pi's kernel version 6.12.31, I noticed
> that snd_soc_dai_set_tdm_slot returns -EINVAL when slots=0 is provided to
> the function, even though it's a documented legal use case:
> 
>  * TDM mode can be disabled by passing 0 for @slots. In this case @tx_mask,
>  * @rx_mask and @slot_width will be ignored.
> 
> https://elixir.bootlin.com/linux/v6.12.31/source/sound/soc/soc-dai.c#L260
> 
> The issue was introduced by this commit:
> 
> https://lore.kernel.org/all/87o6z7yk61.wl-kuninori.morimoto.gx@xxxxxxxxxxx/#t
> 
> Which adds checking of snd_soc_xlate_tdm_slot_mask result which is -EINVAL
> in case of slots=0, therefore stopping the snd_soc_dai_set_tdm_slot
> execution.
> 
> The 6.12.30 was still fine:
> https://elixir.bootlin.com/linux/v6.12.30/source/sound/soc/soc-dai.c#L281
> 
> I would suggest skipping the xlate call in case slots is 0 in
> snd_soc_dai_set_tdm_slot.

Thank you for your report.
I will post fixup patch. I'm happy if you can test it.

Best regards
---
Kuninori Morimoto



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux