diff options
author | Adrian Knoth <adi@drcomp.erfurt.thur.de> | 2012-05-30 08:23:18 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-05-31 04:26:12 -0400 |
commit | a97bda7d29d02a2e9c6609d0947b15e55f5200e5 (patch) | |
tree | 62fd74b55d53d2074bc1da1abe3d69b58d0ffee6 /sound | |
parent | 5cd5d7c44990658df6ab49f6253c39617c53b03d (diff) |
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: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 0a5027b94714..b8ac8710f47f 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -1988,6 +1988,13 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm) | |||
1988 | period = hdspm_read(hdspm, HDSPM_RD_PLL_FREQ); | 1988 | period = hdspm_read(hdspm, HDSPM_RD_PLL_FREQ); |
1989 | rate = hdspm_calc_dds_value(hdspm, period); | 1989 | rate = hdspm_calc_dds_value(hdspm, period); |
1990 | 1990 | ||
1991 | if (rate > 207000) { | ||
1992 | /* Unreasonable high sample rate as seen on PCI MADI cards. | ||
1993 | * Use the cached value instead. | ||
1994 | */ | ||
1995 | rate = hdspm->system_sample_rate; | ||
1996 | } | ||
1997 | |||
1991 | return rate; | 1998 | return rate; |
1992 | } | 1999 | } |
1993 | 2000 | ||