At Sun, 11 Jan 2015 22:00:59 +0100, Pavel Hofman wrote:
Dne 11.1.2015 v 21:36 Takashi Iwai napsal(a):
OK, then this should be cancel_delayed_work_sync() instead, I suppose. The revised patch (also for ak4113.c) below.
I am afraid it is getting stuck in the same way - see the thread stack below.
I see, snd_ak4113_reinit of ak4113.c is never called, only ak4113_init_regs. Perhaps Juli should not touch the workqueue in ak4114_reinit and only initialize the regs in similar manner to ak4113?
No, it's just quartet driver doesn't handle it properly :)
Why is actually the restart of the workqueue needed at reinit? The work (snd_ak4114_check_rate_and_errors) only reads ak4114 regs to controls (using i2c routine synchronized with mutexes) and handles the stream stop.
Yeah, restart is necessary only in a certain situation, and is a bug that is done through work itself. This was the cause. I'll prepare fix patches later.
It doesn't matter much because PM doesn't work with Quartet. But the juli.c also should be improved regarding PM. It should stop the workq at suspend. Also, it'd be preferable to have some control start/stop this background work, e.g. via a control element. Otherwise your machine will be constantly loaded unnecessarily.
I think we can extend the timer, perhaps to HZ/2 - the thread is just a security measure anyway.
The HZ/10 isn't that bad, but the problem is that it's unconditionally running even if user doesn't need/want.
Takashi