diff options
author | Adrian Knoth <adi@drcomp.erfurt.thur.de> | 2012-12-03 08:55:50 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-12-03 09:29:54 -0500 |
commit | c9e1668c68c623296f4aca35ffca5763665e58de (patch) | |
tree | c0e038a6cbd8430acb68bf0c7dc0695ff12f3f4e /sound | |
parent | bf0ff87bef59fbc60b259b8843ae7fbed2cc44bd (diff) |
ALSA: hdspm - Use HDSPM_TOGGLE_SETTING to alter settings
HDSPM_TOGGLE_SETTING and its corresponding functions allow to change
settings in the control register. Instead of using the specialised
functions, use the generic code to make the code DRY.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 002e692bd346..f958e204eb4b 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -4533,10 +4533,10 @@ static struct snd_kcontrol_new snd_hdspm_controls_madi[] = { | |||
4533 | HDSPM_SYNC_CHECK("MADI SyncCheck", 1), | 4533 | HDSPM_SYNC_CHECK("MADI SyncCheck", 1), |
4534 | HDSPM_SYNC_CHECK("TCO SyncCheck", 2), | 4534 | HDSPM_SYNC_CHECK("TCO SyncCheck", 2), |
4535 | HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 3), | 4535 | HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 3), |
4536 | HDSPM_LINE_OUT("Line Out", 0), | 4536 | HDSPM_TOGGLE_SETTING("Line Out", HDSPM_LineOut), |
4537 | HDSPM_TX_64("TX 64 channels mode", 0), | 4537 | HDSPM_TOGGLE_SETTING("TX 64 channels mode", HDSPM_TX_64ch), |
4538 | HDSPM_C_TMS("Clear Track Marker", 0), | 4538 | HDSPM_TOGGLE_SETTING("Clear Track Marker", HDSPM_clr_tms), |
4539 | HDSPM_SAFE_MODE("Safe Mode", 0), | 4539 | HDSPM_TOGGLE_SETTING("Safe Mode", HDSPM_AutoInp), |
4540 | HDSPM_INPUT_SELECT("Input Select", 0), | 4540 | HDSPM_INPUT_SELECT("Input Select", 0), |
4541 | HDSPM_MADI_SPEEDMODE("MADI Speed Mode", 0) | 4541 | HDSPM_MADI_SPEEDMODE("MADI Speed Mode", 0) |
4542 | }; | 4542 | }; |
@@ -4549,9 +4549,9 @@ static struct snd_kcontrol_new snd_hdspm_controls_madiface[] = { | |||
4549 | HDSPM_SYSTEM_SAMPLE_RATE("System Sample Rate", 0), | 4549 | HDSPM_SYSTEM_SAMPLE_RATE("System Sample Rate", 0), |
4550 | HDSPM_AUTOSYNC_SAMPLE_RATE("External Rate", 0), | 4550 | HDSPM_AUTOSYNC_SAMPLE_RATE("External Rate", 0), |
4551 | HDSPM_SYNC_CHECK("MADI SyncCheck", 0), | 4551 | HDSPM_SYNC_CHECK("MADI SyncCheck", 0), |
4552 | HDSPM_TX_64("TX 64 channels mode", 0), | 4552 | HDSPM_TOGGLE_SETTING("TX 64 channels mode", HDSPM_TX_64ch), |
4553 | HDSPM_C_TMS("Clear Track Marker", 0), | 4553 | HDSPM_TOGGLE_SETTING("Clear Track Marker", HDSPM_clr_tms), |
4554 | HDSPM_SAFE_MODE("Safe Mode", 0), | 4554 | HDSPM_TOGGLE_SETTING("Safe Mode", HDSPM_AutoInp), |
4555 | HDSPM_MADI_SPEEDMODE("MADI Speed Mode", 0) | 4555 | HDSPM_MADI_SPEEDMODE("MADI Speed Mode", 0) |
4556 | }; | 4556 | }; |
4557 | 4557 | ||
@@ -4644,11 +4644,11 @@ static struct snd_kcontrol_new snd_hdspm_controls_aes32[] = { | |||
4644 | HDSPM_AUTOSYNC_SAMPLE_RATE("AES8 Frequency", 8), | 4644 | HDSPM_AUTOSYNC_SAMPLE_RATE("AES8 Frequency", 8), |
4645 | HDSPM_AUTOSYNC_SAMPLE_RATE("TCO Frequency", 9), | 4645 | HDSPM_AUTOSYNC_SAMPLE_RATE("TCO Frequency", 9), |
4646 | HDSPM_AUTOSYNC_SAMPLE_RATE("SYNC IN Frequency", 10), | 4646 | HDSPM_AUTOSYNC_SAMPLE_RATE("SYNC IN Frequency", 10), |
4647 | HDSPM_LINE_OUT("Line Out", 0), | 4647 | HDSPM_TOGGLE_SETTING("Line Out", HDSPM_LineOut), |
4648 | HDSPM_EMPHASIS("Emphasis", 0), | 4648 | HDSPM_TOGGLE_SETTING("Emphasis", HDSPM_Emphasis), |
4649 | HDSPM_DOLBY("Non Audio", 0), | 4649 | HDSPM_TOGGLE_SETTING("Non Audio", HDSPM_Dolby), |
4650 | HDSPM_PROFESSIONAL("Professional", 0), | 4650 | HDSPM_TOGGLE_SETTING("Professional", HDSPM_Professional), |
4651 | HDSPM_C_TMS("Clear Track Marker", 0), | 4651 | HDSPM_TOGGLE_SETTING("Clear Track Marker", HDSPM_clr_tms), |
4652 | HDSPM_DS_WIRE("Double Speed Wire Mode", 0), | 4652 | HDSPM_DS_WIRE("Double Speed Wire Mode", 0), |
4653 | HDSPM_QS_WIRE("Quad Speed Wire Mode", 0), | 4653 | HDSPM_QS_WIRE("Quad Speed Wire Mode", 0), |
4654 | }; | 4654 | }; |
@@ -6323,7 +6323,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, | |||
6323 | info.system_clock_mode = hdspm_system_clock_mode(hdspm); | 6323 | info.system_clock_mode = hdspm_system_clock_mode(hdspm); |
6324 | info.clock_source = hdspm_clock_source(hdspm); | 6324 | info.clock_source = hdspm_clock_source(hdspm); |
6325 | info.autosync_ref = hdspm_autosync_ref(hdspm); | 6325 | info.autosync_ref = hdspm_autosync_ref(hdspm); |
6326 | info.line_out = hdspm_line_out(hdspm); | 6326 | info.line_out = hdspm_toggle_setting(hdspm, HDSPM_LineOut); |
6327 | info.passthru = 0; | 6327 | info.passthru = 0; |
6328 | spin_unlock_irq(&hdspm->lock); | 6328 | spin_unlock_irq(&hdspm->lock); |
6329 | if (copy_to_user(argp, &info, sizeof(info))) | 6329 | if (copy_to_user(argp, &info, sizeof(info))) |