Skip to content

Commit

Permalink
ALSA: hdspm - Work around broken DDS value on PCI RME MADI
Browse files Browse the repository at this point in the history
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: Adrian Knoth <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
adiknoth authored and tiwai committed May 31, 2012
1 parent 5cd5d7c commit a97bda7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sound/pci/rme9652/hdspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1988,6 +1988,13 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm)
period = hdspm_read(hdspm, HDSPM_RD_PLL_FREQ);
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;
}

Expand Down

0 comments on commit a97bda7

Please sign in to comment.