ALSA: x86: Rearrange defines
We have two header files and everything is mixed up chaotically.
Move the chip-specific definitions like the hardware registers to
intel_hdmi_lpe_audio.h, and the rest, the implementation specific
stuff into intel_hdmi_audio.h.
In addition, put some more comments to the register fields, and fix
the incorrect name prefix for AUD_HDMI_STATUS bits, too.
The whole changes are merely a code shuffling, and there is no
functional change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index 1022aaa..34750c5 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -252,7 +252,8 @@ static void had_ack_irqs(struct snd_intelhad *ctx)
/* Reset buffer pointers */
static void had_reset_audio(struct snd_intelhad *intelhaddata)
{
- had_write_register(intelhaddata, AUD_HDMI_STATUS, 1);
+ had_write_register(intelhaddata, AUD_HDMI_STATUS,
+ AUD_HDMI_STATUSG_MASK_FUNCRST);
had_write_register(intelhaddata, AUD_HDMI_STATUS, 0);
}
@@ -989,7 +990,7 @@ static void wait_clear_underrun_bit(struct snd_intelhad *intelhaddata)
for (i = 0; i < MAX_CNT; i++) {
/* clear bit30, 31 AUD_HDMI_STATUS */
had_read_register(intelhaddata, AUD_HDMI_STATUS, &val);
- if (!(val & AUD_CONFIG_MASK_UNDERRUN))
+ if (!(val & AUD_HDMI_STATUS_MASK_UNDERRUN))
return;
had_write_register(intelhaddata, AUD_HDMI_STATUS, val);
}