Commit a97bda7d authored by Adrian Knoth's avatar Adrian Knoth Committed by Takashi Iwai

ALSA: hdspm - Work around broken DDS value on PCI RME MADI

On PCI RME MADI cards, the PLL register does not contain the proper
value, so the calculated system_sample_rate is wrong. In this case, we
simply return the cached rate from struct hdspm.
Signed-off-by: default avatarAdrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5cd5d7c4
...@@ -1988,6 +1988,13 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm) ...@@ -1988,6 +1988,13 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm)
period = hdspm_read(hdspm, HDSPM_RD_PLL_FREQ); period = hdspm_read(hdspm, HDSPM_RD_PLL_FREQ);
rate = hdspm_calc_dds_value(hdspm, period); rate = hdspm_calc_dds_value(hdspm, period);
if (rate > 207000) {
/* Unreasonable high sample rate as seen on PCI MADI cards.
* Use the cached value instead.
*/
rate = hdspm->system_sample_rate;
}
return rate; return rate;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment