On Tue, Sep 24, 2024 at 02:25:44PM +0300, Andrei Simion wrote:
On 24.09.2024 11:59, Mark Brown wrote:
On Tue, Sep 24, 2024 at 11:12:38AM +0300, Andrei Simion wrote:
This then means that control writes are just discarded which presumably is going to upset things if they actually saved a value here. Why is that a good choice, rather than either fixing the race so the card doesn't come up too early or removing the need for the runtime?
Ok. I understand. My first intention was to follow the https://github.com/torvalds/linux/blob/master/sound/hda/hdmi_chmap.c#L794 but after your point of view, I intend to return -EAGAIN in V2 to specify the substream->runtime is not ready.
I retested: configured pdmc, then reboot the board and the configuration: as a result the configuration kept.
alsa-restore.service status success.
Do you think this solution is enough?
Ah, I'm a little surprised that we baked retries like that into the API but if userspace already understands that then that'd be fine. Though now I see that the HDA code already does what your existing patch does I'm happy to just queue this version, HDA is so widely deployed that I'd guess everything will DTRT and it's probably best to be consistent. Sorry, I hadn't seen these nuances of the channel map interface before.