From 707a8e27622d57d998a84e0797aad3f4513296c4 Mon Sep 17 00:00:00 2001 From: Adrian Knoth Date: Fri, 29 Jul 2011 03:11:03 +0200 Subject: [PATCH] --- yaml --- r: 262169 b: refs/heads/master c: d12c51d8299667464e31d545acc4ebb7031d024c h: refs/heads/master i: 262167: 915dc7ba421776051937c2140e72c4618029c0d4 v: v3 --- [refs] | 2 +- trunk/sound/pci/rme9652/hdspm.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 308c0881f805..4a1ff5beafa5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 700d1ef33ff1d9a582b4a1dc23a130049f239942 +refs/heads/master: d12c51d8299667464e31d545acc4ebb7031d024c diff --git a/trunk/sound/pci/rme9652/hdspm.c b/trunk/sound/pci/rme9652/hdspm.c index d21964994168..88ae27431cb2 100644 --- a/trunk/sound/pci/rme9652/hdspm.c +++ b/trunk/sound/pci/rme9652/hdspm.c @@ -1217,6 +1217,22 @@ static int hdspm_external_sample_rate(struct hdspm *hdspm) rate = 0; break; } + + /* QS and DS rates normally can not be detected + * automatically by the card. Only exception is MADI + * in 96k frame mode. + * + * So if we read SS values (32 .. 48k), check for + * user-provided DS/QS bits in the control register + * and multiply the base frequency accordingly. + */ + if (rate <= 48000) { + if (hdspm->control_register & HDSPM_QuadSpeed) + rate *= 4; + else if (hdspm->control_register & + HDSPM_DoubleSpeed) + rate *= 2; + } } break; }