ALSA: emu10k1: Use workqueue instead of kthread for emu1010 fw polling

This patch is a cleanup of EMU1010 dock probing code in emu10k1 driver
to use work instead of kthread in a loop.  The work is lighter and
easier to control than kthread, in general.

Instead of a loop with the explicit sleep, we do simply
delayed-schedule the work.  At suspend/resume callbacks, the work is
canceled and restarted, respectively.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Esse commit está contido em:
Takashi Iwai
2016-11-02 18:38:39 +01:00
commit aeaa6203b6
3 arquivos alterados com 66 adições e 76 exclusões

Ver arquivo

@@ -1688,7 +1688,8 @@ struct snd_emu1010 {
unsigned int internal_clock; /* 44100 or 48000 */
unsigned int optical_in; /* 0:SPDIF, 1:ADAT */
unsigned int optical_out; /* 0:SPDIF, 1:ADAT */
struct task_struct *firmware_thread;
struct delayed_work firmware_work;
u32 last_reg;
};
struct snd_emu10k1 {