Skip to content

Commit 5fabfe4

Browse files
Yanteng Sichenhuacai
Yanteng Si
authored andcommitted
ALSA: hda/intel: Workaround for WALLCLK register for loongson controller
On loongson controller, the value of WALLCLK register is always 0, which is meaningless, so we return directly. Signed-off-by: Yanteng Si <[email protected]> Signed-off-by: Yingkun Meng <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent e678264 commit 5fabfe4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sound/pci/hda/hda_intel.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,13 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev)
655655
unsigned int pos;
656656
snd_pcm_uframes_t hwptr, target;
657657

658+
/*
659+
* The value of the WALLCLK register is always 0
660+
* on the Loongson controller, so we return directly.
661+
*/
662+
if (chip->driver_type == AZX_DRIVER_LOONGSON)
663+
return 1;
664+
658665
wallclk = azx_readl(chip, WALLCLK) - azx_dev->core.start_wallclk;
659666
if (wallclk < (azx_dev->core.period_wallclk * 2) / 3)
660667
return -1; /* bogus (too early) interrupt */

0 commit comments

Comments
 (0)