Message ID | bf3d1e928a9096b033833c5ce559dda3c898636b.1686125797.git.siyanteng@loongson.cn |
---|---|
State | Superseded |
Headers | show |
Series | Add Loongson HD Audio support | expand |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index a1e3883b00a4..76fddd9e0f15 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -655,6 +655,13 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev) unsigned int pos; snd_pcm_uframes_t hwptr, target; + /* + * The value of the WALLCLK register is always 0 + * on the Loongson controller, so we return directly. + */ + if (chip->driver_type == AZX_DRIVER_LOONGSON) + return 1; + wallclk = azx_readl(chip, WALLCLK) - azx_dev->core.start_wallclk; if (wallclk < (azx_dev->core.period_wallclk * 2) / 3) return -1; /* bogus (too early) interrupt */