summary refs log tree commit diff
path: root/sound/pci/rme9652
diff options
context:
space:
mode:
authorAdrian Knoth <adi@drcomp.erfurt.thur.de>2012-10-19 17:42:26 +0200
committerTakashi Iwai <tiwai@suse.de>2012-10-20 10:43:05 +0200
commitb8812c55c5e59596bbf4b1d3e5b4b3ef50a89cad (patch)
tree295cbf5b52ca19fd6b923e7615eeff2a9204ea16 /sound/pci/rme9652
parentd681deaa74748ce1d4b1a862438c955b70f46690 (diff)
downloadlinux-b8812c55c5e59596bbf4b1d3e5b4b3ef50a89cad.tar.gz
ALSA: hdspm - Also report autosync_sample_rate on MADI and MADIface
MADI and MADIface used to report the autosync_sample_rate. This
functionality was lost in commit
0dca1793063c28dde8f6c49c9c72203fe5cb6efc, this commit now adds it back.

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.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 976e3a6b0508..5f243aedeef7 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -2225,6 +2225,21 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol,
 			break;
 		}
 		break;
+
+	case MADI:
+	case MADIface:
+		{
+			int rate = hdspm_external_sample_rate(hdspm);
+			int i, selected_rate = 0;
+			for (i = 1; i < 10; i++)
+				if (HDSPM_bit2freq(i) == rate) {
+					selected_rate = i;
+					break;
+				}
+			ucontrol->value.enumerated.item[0] = selected_rate;
+		}
+		break;
+
 	default:
 		break;
 	}
@@ -4450,6 +4465,7 @@ static struct snd_kcontrol_new snd_hdspm_controls_madi[] = {
 	HDSPM_PREF_SYNC_REF("Preferred Sync Reference", 0),
 	HDSPM_AUTOSYNC_REF("AutoSync Reference", 0),
 	HDSPM_SYSTEM_SAMPLE_RATE("System Sample Rate", 0),
+	HDSPM_AUTOSYNC_SAMPLE_RATE("External Rate", 0),
 	HDSPM_SYNC_CHECK("WC SyncCheck", 0),
 	HDSPM_SYNC_CHECK("MADI SyncCheck", 1),
 	HDSPM_SYNC_CHECK("TCO SyncCHeck", 2),