aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652/hdspm.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 16:27:36 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 16:27:36 -0500
commit9f9cba810f36d16f4e64477e879a69f6c47b389d (patch)
treed787abcbead1439d3f82f0719efe520fd9689f79 /sound/pci/rme9652/hdspm.c
parentdbf5bef8da169b38db804996a661f8d634df8295 (diff)
parent949db153b6466c6f7cad5a427ecea94985927311 (diff)
Merge 3.8-rc5 into tty-next
This resolves a number of tty driver merge issues found in linux-next Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/pci/rme9652/hdspm.c')
-rw-r--r--sound/pci/rme9652/hdspm.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 6e02e064d7b4..223c3d9cc69e 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -441,6 +441,7 @@ MODULE_SUPPORTED_DEVICE("{{RME HDSPM-MADI}}");
441*/ 441*/
442/* status */ 442/* status */
443#define HDSPM_AES32_wcLock 0x0200000 443#define HDSPM_AES32_wcLock 0x0200000
444#define HDSPM_AES32_wcSync 0x0100000
444#define HDSPM_AES32_wcFreq_bit 22 445#define HDSPM_AES32_wcFreq_bit 22
445/* (status >> HDSPM_AES32_wcFreq_bit) & 0xF gives WC frequency (cf function 446/* (status >> HDSPM_AES32_wcFreq_bit) & 0xF gives WC frequency (cf function
446 HDSPM_bit2freq */ 447 HDSPM_bit2freq */
@@ -3467,10 +3468,12 @@ static int hdspm_wc_sync_check(struct hdspm *hdspm)
3467 switch (hdspm->io_type) { 3468 switch (hdspm->io_type) {
3468 case AES32: 3469 case AES32:
3469 status = hdspm_read(hdspm, HDSPM_statusRegister); 3470 status = hdspm_read(hdspm, HDSPM_statusRegister);
3470 if (status & HDSPM_wcSync) 3471 if (status & HDSPM_AES32_wcLock) {
3471 return 2; 3472 if (status & HDSPM_AES32_wcSync)
3472 else if (status & HDSPM_wcLock) 3473 return 2;
3473 return 1; 3474 else
3475 return 1;
3476 }
3474 return 0; 3477 return 0;
3475 break; 3478 break;
3476 3479
@@ -4658,6 +4661,7 @@ snd_hdspm_proc_read_aes32(struct snd_info_entry * entry,
4658 unsigned int status; 4661 unsigned int status;
4659 unsigned int status2; 4662 unsigned int status2;
4660 unsigned int timecode; 4663 unsigned int timecode;
4664 unsigned int wcLock, wcSync;
4661 int pref_syncref; 4665 int pref_syncref;
4662 char *autosync_ref; 4666 char *autosync_ref;
4663 int x; 4667 int x;
@@ -4751,8 +4755,11 @@ snd_hdspm_proc_read_aes32(struct snd_info_entry * entry,
4751 4755
4752 snd_iprintf(buffer, "--- Status:\n"); 4756 snd_iprintf(buffer, "--- Status:\n");
4753 4757
4758 wcLock = status & HDSPM_AES32_wcLock;
4759 wcSync = wcLock && (status & HDSPM_AES32_wcSync);
4760
4754 snd_iprintf(buffer, "Word: %s Frequency: %d\n", 4761 snd_iprintf(buffer, "Word: %s Frequency: %d\n",
4755 (status & HDSPM_AES32_wcLock) ? "Sync " : "No Lock", 4762 (wcLock) ? (wcSync ? "Sync " : "Lock ") : "No Lock",
4756 HDSPM_bit2freq((status >> HDSPM_AES32_wcFreq_bit) & 0xF)); 4763 HDSPM_bit2freq((status >> HDSPM_AES32_wcFreq_bit) & 0xF));
4757 4764
4758 for (x = 0; x < 8; x++) { 4765 for (x = 0; x < 8; x++) {