diff options
author | Adrian Knoth <adi@drcomp.erfurt.thur.de> | 2013-07-05 05:28:15 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-07-05 08:52:42 -0400 |
commit | 2d60fc7f7d3d79e5646646bb34811961f19d111a (patch) | |
tree | fd397e12481a5c4898efdc32d7b27deab400f274 | |
parent | dbae4a0c8d8794df1a6bd7e644ed94b915f46f7e (diff) |
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: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 80b2247dc8f9..73d96269c9b2 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -2954,19 +2954,20 @@ static int snd_hdspm_put_pref_sync_ref(struct snd_kcontrol *kcontrol, | |||
2954 | 2954 | ||
2955 | static int hdspm_autosync_ref(struct hdspm *hdspm) | 2955 | static int hdspm_autosync_ref(struct hdspm *hdspm) |
2956 | { | 2956 | { |
2957 | /* This looks at the autosync selected sync reference */ | ||
2957 | if (AES32 == hdspm->io_type) { | 2958 | if (AES32 == hdspm->io_type) { |
2959 | |||
2958 | unsigned int status = hdspm_read(hdspm, HDSPM_statusRegister); | 2960 | unsigned int status = hdspm_read(hdspm, HDSPM_statusRegister); |
2959 | unsigned int syncref = | 2961 | unsigned int syncref = (status >> HDSPM_AES32_syncref_bit) & 0xF; |
2960 | (status >> HDSPM_AES32_syncref_bit) & 0xF; | 2962 | if ((syncref >= HDSPM_AES32_AUTOSYNC_FROM_WORD) && |
2961 | if (syncref == 0) | 2963 | (syncref <= HDSPM_AES32_AUTOSYNC_FROM_SYNC_IN)) { |
2962 | return HDSPM_AES32_AUTOSYNC_FROM_WORD; | ||
2963 | if (syncref <= 8) | ||
2964 | return syncref; | 2964 | return syncref; |
2965 | } | ||
2965 | return HDSPM_AES32_AUTOSYNC_FROM_NONE; | 2966 | return HDSPM_AES32_AUTOSYNC_FROM_NONE; |
2967 | |||
2966 | } else if (MADI == hdspm->io_type) { | 2968 | } else if (MADI == hdspm->io_type) { |
2967 | /* This looks at the autosync selected sync reference */ | ||
2968 | unsigned int status2 = hdspm_read(hdspm, HDSPM_statusRegister2); | ||
2969 | 2969 | ||
2970 | unsigned int status2 = hdspm_read(hdspm, HDSPM_statusRegister2); | ||
2970 | switch (status2 & HDSPM_SelSyncRefMask) { | 2971 | switch (status2 & HDSPM_SelSyncRefMask) { |
2971 | case HDSPM_SelSyncRef_WORD: | 2972 | case HDSPM_SelSyncRef_WORD: |
2972 | return HDSPM_AUTOSYNC_FROM_WORD; | 2973 | return HDSPM_AUTOSYNC_FROM_WORD; |