Commit 2d60fc7f authored by Adrian Knoth's avatar Adrian Knoth Committed by Takashi Iwai

ALSA: hdspm - AES32: Enable TCO/Sync-In in snd_hdspm_put_sync_ref()

This patch enables the user to select "TCO" and "Sync In" as a preferred
sync reference on RME AES(32) cards.
Signed-off-by: default avatarAdrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent dbae4a0c
...@@ -2954,19 +2954,20 @@ static int snd_hdspm_put_pref_sync_ref(struct snd_kcontrol *kcontrol, ...@@ -2954,19 +2954,20 @@ static int snd_hdspm_put_pref_sync_ref(struct snd_kcontrol *kcontrol,
static int hdspm_autosync_ref(struct hdspm *hdspm) static int hdspm_autosync_ref(struct hdspm *hdspm)
{ {
/* This looks at the autosync selected sync reference */
if (AES32 == hdspm->io_type) { if (AES32 == hdspm->io_type) {
unsigned int status = hdspm_read(hdspm, HDSPM_statusRegister); unsigned int status = hdspm_read(hdspm, HDSPM_statusRegister);
unsigned int syncref = unsigned int syncref = (status >> HDSPM_AES32_syncref_bit) & 0xF;
(status >> HDSPM_AES32_syncref_bit) & 0xF; if ((syncref >= HDSPM_AES32_AUTOSYNC_FROM_WORD) &&
if (syncref == 0) (syncref <= HDSPM_AES32_AUTOSYNC_FROM_SYNC_IN)) {
return HDSPM_AES32_AUTOSYNC_FROM_WORD;
if (syncref <= 8)
return syncref; return syncref;
}
return HDSPM_AES32_AUTOSYNC_FROM_NONE; return HDSPM_AES32_AUTOSYNC_FROM_NONE;
} else if (MADI == hdspm->io_type) { } else if (MADI == hdspm->io_type) {
/* This looks at the autosync selected sync reference */
unsigned int status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
unsigned int status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
switch (status2 & HDSPM_SelSyncRefMask) { switch (status2 & HDSPM_SelSyncRefMask) {
case HDSPM_SelSyncRef_WORD: case HDSPM_SelSyncRef_WORD:
return HDSPM_AUTOSYNC_FROM_WORD; return HDSPM_AUTOSYNC_FROM_WORD;
......
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