summaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652
diff options
context:
space:
mode:
authorAdrian Knoth <adi@drcomp.erfurt.thur.de>2011-02-23 11:43:13 +0100
committerTakashi Iwai <tiwai@suse.de>2011-02-23 15:44:42 +0100
commit7c4a95b5ec484244fc615be7b9f56c267c51ade6 (patch)
tree1660c1d4696c1f71813ecbda57d3808f89e72abb /sound/pci/rme9652
parentf6ea805f524207f125f1d245152a16e3a8094243 (diff)
downloadop-kernel-dev-7c4a95b5ec484244fc615be7b9f56c267c51ade6.zip
op-kernel-dev-7c4a95b5ec484244fc615be7b9f56c267c51ade6.tar.gz
ALSA: hdspm - fix sync check on AES32
Fredrik Lingvall <fredrik.lingvall@gmail.com> has discovered wrong frequency and sync detection on AES32. According to him, the provided patch fixes these issues. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/rme9652')
-rw-r--r--sound/pci/rme9652/hdspm.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index ea49ffe..0b0293f 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -1082,7 +1082,7 @@ static int hdspm_external_sample_rate(struct hdspm *hdspm)
case AES32:
status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
status = hdspm_read(hdspm, HDSPM_statusRegister);
- timecode = hdspm_read(hdspm, HDSPM_timecodeRegister);
+ timecode = hdspm_read(hdspm, HDSPM_timecodeRegister);
syncref = hdspm_autosync_ref(hdspm);
@@ -2115,6 +2115,29 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol,
hdspm_get_s1_sample_rate(hdspm,
ucontrol->id.index-1);
}
+
+ case AES32:
+
+ switch (kcontrol->private_value) {
+ case 0: /* WC */
+ ucontrol->value.enumerated.item[0] =
+ hdspm_get_wc_sample_rate(hdspm);
+ break;
+ case 9: /* TCO */
+ ucontrol->value.enumerated.item[0] =
+ hdspm_get_tco_sample_rate(hdspm);
+ break;
+ case 10: /* SYNC_IN */
+ ucontrol->value.enumerated.item[0] =
+ hdspm_get_sync_in_sample_rate(hdspm);
+ break;
+ default: /* AES1 to AES8 */
+ ucontrol->value.enumerated.item[0] =
+ hdspm_get_s1_sample_rate(hdspm,
+ kcontrol->private_value-1);
+ break;
+
+ }
default:
break;
}
@@ -3803,9 +3826,9 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol,
val = hdspm_tco_sync_check(hdspm); break;
case 10 /* SYNC IN */:
val = hdspm_sync_in_sync_check(hdspm); break;
- default:
+ default: /* AES1 to AES8 */
val = hdspm_aes_sync_check(hdspm,
- ucontrol->id.index-1);
+ kcontrol->private_value-1);
}
}
OpenPOWER on IntegriCloud