On Wed, 24 Mar 2021 16:43:02 +0100, Andrey Grodzovsky wrote:
I merged the patches, since it looks like my branch is older I didn't have chip->init_failed member and also seems there was a typo on ur side as there is no flush_work_sync, only flush_work which waits synchronously anyway.
Ah that must be some typos I forgot to refresh.
Everything works fine when testing with maplyer running concurrently to PCI rescan cycle.
Can you be more specific what are those get/put calls, I am thinking about some waitqueue to wait on in rescan_prepare after setting snd_hdac_bus_freeze, on wakeup it checks that a counter dropped back to zero. Not sure on which entity to hang this counter ?
It's something like the patch 6 in the v2 series below. At this time, I dropped snd_hdac_bus_freeze() as this is basically useless.
Maybe this is no optimal implementation and we might improve a bit, but I guess you get an idea from that.
Also I added ifdef CONFIG_PM in the last patch as it obviously depends on it. It could be put in Kconfig somehow, too, but a simple ifdef should suffice.
Takashi