Skip to contentSkip to conversation

Fixes for RME MADI cards

PATCH In review Adrian Knoth 2 participants 14 messages Oct 19, 2012 – Oct 20, 2012 Sound

lore
Share & tools
lore
#0 lore raw

cover Fixes for RME MADI cards

Hi!

I've spent another afternoon at IOSONO to fix a series of bugs in the hdspm driver.

Andre Schramm and me have tested almost all patches on a box with two PCIe MADI cards and one PCI MADI card. The DDS/Varispeed patch has only been tested on my RayDAT, the sync_in detection for AES32 has not been tested at all, though the documentation is pretty clear that the previous bit position was wrong. If there are AES(32) owners with two or more cards out there, please test and report back.

The typo and the coding style patches have not been tested, since they're trivial.

Cheers

Adrian Knoth (9):
ALSA: hdspm - Allow DDS/Varispeed to be set from userspace
ALSA: hdspm - Report external rate in slave mode on PCI MADI
ALSA: hdspm - Fix sync check reporting on all RME HDSPM cards
ALSA: hdspm - Fix reported autosync_sample_rate
ALSA: hdspm - Also report autosync_sample_rate on MADI and MADIface
ALSA: hdspm - Fix sync_in reporting on RME MADI cards
ALSA: hdspm - Fix sync_in detection on AES/AES32
ALSA: hdspm - Fix typo in kcontrol element on RME MADI cards
ALSA: hdspm - Fix coding style in CTL_ELEM macros

 sound/pci/rme9652/hdspm.c |  232 ++++++++++++++++++++++++++-------------------
 1 file changed, 137 insertions(+), 95 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/9 ALSA: hdspm - Allow DDS/Varispeed to be set from userspace

The DDS value is the actual physical sample rate. We set it indirectly when selecting 44100, 48000 and so on via snd_hdspm_hw_params or hdspm_set_clock_source.

This commit now allows the DDS value to be altered at runtime, thus speeding up or slowing down the physical sample rate. This is required for MADI's varispeed that allows for ±12.5% speed adjustment from the "selected" rate (32kHz, 44100kHz, 48kHz and so on).

sound/pci/rme9652/hdspm.c +13 -1
index b12308b..742bd5e 100644
@@ -2003,8 +2003,10 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm)
 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
   .name = xname, \
   .index = xindex, \
-  .access = SNDRV_CTL_ELEM_ACCESS_READ, \
+  .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |\
+	SNDRV_CTL_ELEM_ACCESS_VOLATILE, \
   .info = snd_hdspm_info_system_sample_rate, \
+  .put = snd_hdspm_put_system_sample_rate, \
   .get = snd_hdspm_get_system_sample_rate \
 }
 
@@ -2030,6 +2032,16 @@ static int snd_hdspm_get_system_sample_rate(struct snd_kcontrol *kcontrol,
 	return 0;
 }
 
+static int snd_hdspm_put_system_sample_rate(struct snd_kcontrol *kcontrol,
+					    struct snd_ctl_elem_value *
+					    ucontrol)
+{
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
+
+	hdspm_set_dds_value(hdspm, ucontrol->value.enumerated.item[0]);
+	return 0;
+}
+
 
 /**
  * Returns the WordClock sample rate class for the given card.
Signature · 6 lines
1.7.10.4

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#2 lore raw

Re: [PATCH 1/9] ALSA: hdspm - Allow DDS/Varispeed to be set from userspace

At Fri, 19 Oct 2012 17:42:22 +0200,

Quoted 17 lines · Adrian Knoth

The DDS value is the actual physical sample rate. We set it indirectly when selecting 44100, 48000 and so on via snd_hdspm_hw_params or hdspm_set_clock_source.

This commit now allows the DDS value to be altered at runtime, thus speeding up or slowing down the physical sample rate. This is required for MADI's varispeed that allows for ±12.5% speed adjustment from the "selected" rate (32kHz, 44100kHz, 48kHz and so on).

sound/pci/rme9652/hdspm.c +0 -0
index b12308b..742bd5e 100644

sound/pci/rme9652/hdspm.c static int hdspm_get_system_sample_rate(struct hdspm *hdspm) · line 2007

Quoted 6 lines
sound/pci/rme9652/hdspm.c +2 -1
@@ -2003,8 +2003,10 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm)
 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
   .name = xname, \
   .index = xindex, \
-  .access = SNDRV_CTL_ELEM_ACCESS_READ, \
+  .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |\
+	SNDRV_CTL_ELEM_ACCESS_VOLATILE, \

What's the reason to add VOLATILE flag?
Does the hardware itself change the value without the driver involvement?

thanks,

Takashi

Quoted 25 lines
sound/pci/rme9652/hdspm.c +11 -0
   .info = snd_hdspm_info_system_sample_rate, \
+  .put = snd_hdspm_put_system_sample_rate, \
   .get = snd_hdspm_get_system_sample_rate \
 }
 
@@ -2030,6 +2032,16 @@ static int snd_hdspm_get_system_sample_rate(struct snd_kcontrol *kcontrol,
 	return 0;
 }
 
+static int snd_hdspm_put_system_sample_rate(struct snd_kcontrol *kcontrol,
+					    struct snd_ctl_elem_value *
+					    ucontrol)
+{
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
+
+	hdspm_set_dds_value(hdspm, ucontrol->value.enumerated.item[0]);
+	return 0;
+}
+
 
 /**
  * Returns the WordClock sample rate class for the given card.
Signature · 1 line
1.7.10.4

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#3 lore raw

Re: [PATCH 1/9] ALSA: hdspm - Allow DDS/Varispeed to be set from userspace

Quoted 11 lines · Takashi Iwai
Quoted 11 lines

The DDS value is the actual physical sample rate. We set it indirectly when selecting 44100, 48000 and so on via snd_hdspm_hw_params or hdspm_set_clock_source.

This commit now allows the DDS value to be altered at runtime, thus speeding up or slowing down the physical sample rate. This is required for MADI's varispeed that allows for ±12.5% speed adjustment from the "selected" rate (32kHz, 44100kHz, 48kHz and so on).

Quoted 15 lines

sound/pci/rme9652/hdspm.c static int hdspm_get_system_sample_rate(struct hdspm *hdspm) · line 2007

Quoted 11 lines
sound/pci/rme9652/hdspm.c +2 -1
index b12308b..742bd5e 100644
@@ -2003,8 +2003,10 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm)
 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
   .name = xname, \
   .index = xindex, \
-  .access = SNDRV_CTL_ELEM_ACCESS_READ, \
+  .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |\
+	SNDRV_CTL_ELEM_ACCESS_VOLATILE, \

What's the reason to add VOLATILE flag?
Does the hardware itself change the value without the driver involvement?

Yes, when in slave mode. Then, this value reflects the detected external sample rate that may change at any time.

The following example shows that this just happened in my test setup:

adi@foh:/opt/adi-src/sound-2.6$ amixer -c 0 cset numid=5 48000
numid=5,iface=MIXER,name='System Sample Rate'
  ; type=INTEGER,access=rw------,values=1,min=27000,max=207000,step=1
  : values=44104

Though I was asking for 48000Hz, the card runs at 44104Hz, because it's syncing to S/PDIF-In at the moment.

Cheers

Signature · 1 line
mail: [email protected]  	http://adi.thur.de	PGP/GPG: key via keyserver
#4 lore raw

Re: [PATCH 1/9] ALSA: hdspm - Allow DDS/Varispeed to be set from userspace

At Sat, 20 Oct 2012 10:35:36 +0200,

Quoted 35 lines · Adrian Knoth
Quoted 11 lines · Takashi Iwai
Quoted 11 lines

The DDS value is the actual physical sample rate. We set it indirectly when selecting 44100, 48000 and so on via snd_hdspm_hw_params or hdspm_set_clock_source.

This commit now allows the DDS value to be altered at runtime, thus speeding up or slowing down the physical sample rate. This is required for MADI's varispeed that allows for ±12.5% speed adjustment from the "selected" rate (32kHz, 44100kHz, 48kHz and so on).

Quoted 15 lines

sound/pci/rme9652/hdspm.c static int hdspm_get_system_sample_rate(struct hdspm *hdspm) · line 2007

Quoted 11 lines
sound/pci/rme9652/hdspm.c +2 -1
index b12308b..742bd5e 100644
@@ -2003,8 +2003,10 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm)
 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
   .name = xname, \
   .index = xindex, \
-  .access = SNDRV_CTL_ELEM_ACCESS_READ, \
+  .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |\
+	SNDRV_CTL_ELEM_ACCESS_VOLATILE, \

What's the reason to add VOLATILE flag?
Does the hardware itself change the value without the driver involvement?

Yes, when in slave mode. Then, this value reflects the detected external sample rate that may change at any time.

The following example shows that this just happened in my test setup:

Quoted 7 lines
adi@foh:/opt/adi-src/sound-2.6$ amixer -c 0 cset numid=5 48000
numid=5,iface=MIXER,name='System Sample Rate'
  ; type=INTEGER,access=rw------,values=1,min=27000,max=207000,step=1
  : values=44104

Though I was asking for 48000Hz, the card runs at 44104Hz, because it's syncing to S/PDIF-In at the moment.

OK, now I applied all patches.

thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#5 lore raw

PATCH 2/9 ALSA: hdspm - Report external rate in slave mode on PCI MADI

In reply to Adrian Knoth

As a follow-up to a97bda7d29d02a2e9c6609d0947b15e55f5200e5, report the external sample rate as system_sample_rate when in slave mode.

For PCIe MADI cards, the DDS value automatically contains the external sample rate, but the PCI version needs this manual workaround.

sound/pci/rme9652/hdspm.c +9 -4
index 742bd5e..1131a8a 100644
@@ -971,6 +971,7 @@ static inline void snd_hdspm_initialize_midi_flush(struct hdspm *hdspm);
 static int hdspm_update_simple_mixer_controls(struct hdspm *hdspm);
 static int hdspm_autosync_ref(struct hdspm *hdspm);
 static int snd_hdspm_set_defaults(struct hdspm *hdspm);
+static int hdspm_system_clock_mode(struct hdspm *hdspm);
 static void hdspm_set_sgbuf(struct hdspm *hdspm,
 			    struct snd_pcm_substream *substream,
 			     unsigned int reg, int channels);
@@ -1989,10 +1990,14 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm)
 	rate = hdspm_calc_dds_value(hdspm, period);
 
 	if (rate > 207000) {
-		/* Unreasonable high sample rate as seen on PCI MADI cards.
-		 * Use the cached value instead.
-		 */
-		rate = hdspm->system_sample_rate;
+		/* Unreasonable high sample rate as seen on PCI MADI cards. */
+		if (0 == hdspm_system_clock_mode(hdspm)) {
+			/* master mode, return internal sample rate */
+			rate = hdspm->system_sample_rate;
+		} else {
+			/* slave mode, return external sample rate */
+			rate = hdspm_external_sample_rate(hdspm);
+		}
 	}
 
 	return rate;
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH 3/9 ALSA: hdspm - Fix sync check reporting on all RME HDSPM cards

In reply to Adrian Knoth

Due to missing breaks and the resulting fall-through, card subtype selection was effectively missing, thus causing the wrong sync check functions to be called.

sound/pci/rme9652/hdspm.c +4 -0
index 1131a8a..81d83fa 100644
@@ -3959,6 +3959,7 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol,
 		default:
 			val = hdspm_s1_sync_check(hdspm, ucontrol->id.index-1);
 		}
+		break;
 
 	case AIO:
 		switch (kcontrol->private_value) {
@@ -3971,6 +3972,7 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol,
 		default:
 			val = hdspm_s1_sync_check(hdspm, ucontrol->id.index-1);
 		}
+		break;
 
 	case MADI:
 		switch (kcontrol->private_value) {
@@ -3983,6 +3985,7 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol,
 		case 3: /* SYNC_IN */
 			val = hdspm_sync_in_sync_check(hdspm); break;
 		}
+		break;
 
 	case MADIface:
 		val = hdspm_madi_sync_check(hdspm); /* MADI */
@@ -4000,6 +4003,7 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol,
 			 val = hdspm_aes_sync_check(hdspm,
 					 kcontrol->private_value-1);
 		}
+		break;
 
 	}
 
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH 4/9 ALSA: hdspm - Fix reported autosync_sample_rate

In reply to Adrian Knoth

Missing breaks lead to a fall-through, thus causing the wrong autosync_sample_rate to be reported.

sound/pci/rme9652/hdspm.c +3 -1
index 81d83fa..976e3a6 100644
@@ -2180,6 +2180,7 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol,
 				hdspm_get_s1_sample_rate(hdspm,
 						kcontrol->private_value-1);
 		}
+		break;
 
 	case AIO:
 		switch (kcontrol->private_value) {
@@ -2200,6 +2201,7 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol,
 				hdspm_get_s1_sample_rate(hdspm,
 						ucontrol->id.index-1);
 		}
+		break;
 
 	case AES32:
 
@@ -2221,8 +2223,8 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol,
 				hdspm_get_s1_sample_rate(hdspm,
 						kcontrol->private_value-1);
 			break;
-
 		}
+		break;
 	default:
 		break;
 	}
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH 5/9 ALSA: hdspm - Also report autosync_sample_rate on MADI and MADIface

In reply to Adrian Knoth

MADI and MADIface used to report the autosync_sample_rate. This functionality was lost in commit 0dca1793063c28dde8f6c49c9c72203fe5cb6efc, this commit now adds it back.

sound/pci/rme9652/hdspm.c +14 -0
index 976e3a6..1a679e9 100644
@@ -2225,6 +2225,19 @@ 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;
+			ucontrol->value.enumerated.item[0] = selected_rate;
+		}
+		break;
+
 	default:
 		break;
 	}
@@ -4450,6 +4463,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),
Signature · 1 line
1.7.10.4
#9 lore raw

Re: [PATCH 5/9] ALSA: hdspm - Also report autosync_sample_rate on MADI and MADIface

At Fri, 19 Oct 2012 17:42:26 +0200,

Quoted 14 lines · Adrian Knoth

MADI and MADIface used to report the autosync_sample_rate. This functionality was lost in commit 0dca1793063c28dde8f6c49c9c72203fe5cb6efc, this commit now adds it back.

sound/pci/rme9652/hdspm.c +0 -0
index 976e3a6..1a679e9 100644
@@ -2225,6 +2225,19 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol,
 			break;
 		}

sound/pci/rme9652/hdspm.c static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol, · line 2236

Quoted 10 lines
sound/pci/rme9652/hdspm.c +9 -0
 		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;

I added a missing break here (just a minor optimization) and committed.

thanks,

Takashi

Quoted 18 lines
sound/pci/rme9652/hdspm.c +5 -0
+			ucontrol->value.enumerated.item[0] = selected_rate;
+		}
+		break;
+
 	default:
 		break;
 	}
@@ -4450,6 +4463,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),
Signature · 1 line
1.7.10.4
#10 lore raw

PATCH 6/9 ALSA: hdspm - Fix sync_in reporting on RME MADI cards

In reply to Adrian Knoth

In contrast to AES32, MADI uses the first status register to report the sync_in status.

sound/pci/rme9652/hdspm.c +5 -0
index 1a679e9..9c41661 100644
@@ -3883,6 +3883,11 @@ static int hdspm_sync_in_sync_check(struct hdspm *hdspm)
 		break;
 
 	case MADI:
+		status = hdspm_read(hdspm, HDSPM_statusRegister);
+		lock = (status & HDSPM_syncInLock) ? 1 : 0;
+		sync = (status & HDSPM_syncInSync) ? 1 : 0;
+		break;
+
 	case AES32:
 		status = hdspm_read(hdspm, HDSPM_statusRegister2);
 		lock = (status & HDSPM_syncInLock) ? 1 : 0;
Signature · 1 line
1.7.10.4
#11 lore raw

PATCH 7/9 ALSA: hdspm - Fix sync_in detection on AES/AES32

In reply to Adrian Knoth

According to the documentation, AES32 cards use a different bit position for reporting the sync_in status.

sound/pci/rme9652/hdspm.c +2 -2
index 9c41661..e327484 100644
@@ -3890,8 +3890,8 @@ static int hdspm_sync_in_sync_check(struct hdspm *hdspm)
 
 	case AES32:
 		status = hdspm_read(hdspm, HDSPM_statusRegister2);
-		lock = (status & HDSPM_syncInLock) ? 1 : 0;
-		sync = (status & HDSPM_syncInSync) ? 1 : 0;
+		lock = (status & 0x100000) ? 1 : 0;
+		sync = (status & 0x200000) ? 1 : 0;
 		break;
 
 	case MADIface:
Signature · 1 line
1.7.10.4
#12 lore raw

PATCH 8/9 ALSA: hdspm - Fix typo in kcontrol element on RME MADI cards

In reply to Adrian Knoth
sound/pci/rme9652/hdspm.c +1 -1
index e327484..4bc65ab 100644
@@ -4471,7 +4471,7 @@ static struct snd_kcontrol_new snd_hdspm_controls_madi[] = {
 	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),
+	HDSPM_SYNC_CHECK("TCO SyncCheck", 2),
 	HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 3),
 	HDSPM_LINE_OUT("Line Out", 0),
 	HDSPM_TX_64("TX 64 channels mode", 0),
Signature · 1 line
1.7.10.4
#13 lore raw

PATCH 9/9 ALSA: hdspm - Fix coding style in CTL_ELEM macros

In reply to Adrian Knoth

checkpatch.pl discourages the use of spaces at the beginning of lines. Some of the CTL_ELEM defines were not properly indented.

This patch replaces the leading spaces by tabs. No functionality is changed, the commit is purely cosmetic.

sound/pci/rme9652/hdspm.c +90 -90
index 4bc65ab..35bb213 100644
@@ -2005,14 +2005,14 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm)
 
 
 #define HDSPM_SYSTEM_SAMPLE_RATE(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |\
-	SNDRV_CTL_ELEM_ACCESS_VOLATILE, \
-  .info = snd_hdspm_info_system_sample_rate, \
-  .put = snd_hdspm_put_system_sample_rate, \
-  .get = snd_hdspm_get_system_sample_rate \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.access = SNDRV_CTL_ELEM_ACCESS_READWRITE |\
+		SNDRV_CTL_ELEM_ACCESS_VOLATILE, \
+	.info = snd_hdspm_info_system_sample_rate, \
+	.put = snd_hdspm_put_system_sample_rate, \
+	.get = snd_hdspm_get_system_sample_rate \
 }
 
 static int snd_hdspm_info_system_sample_rate(struct snd_kcontrol *kcontrol,
@@ -2462,7 +2462,7 @@ static int snd_hdspm_put_clock_source(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_PREF_SYNC_REF(xname, xindex) \
-{.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
 	.name = xname, \
 	.index = xindex, \
 	.access = SNDRV_CTL_ELEM_ACCESS_READWRITE |\
@@ -2798,12 +2798,12 @@ static int snd_hdspm_put_pref_sync_ref(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_AUTOSYNC_REF(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .access = SNDRV_CTL_ELEM_ACCESS_READ, \
-  .info = snd_hdspm_info_autosync_ref, \
-  .get = snd_hdspm_get_autosync_ref, \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.access = SNDRV_CTL_ELEM_ACCESS_READ, \
+	.info = snd_hdspm_info_autosync_ref, \
+	.get = snd_hdspm_get_autosync_ref, \
 }
 
 static int hdspm_autosync_ref(struct hdspm *hdspm)
@@ -2887,12 +2887,12 @@ static int snd_hdspm_get_autosync_ref(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_LINE_OUT(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .info = snd_hdspm_info_line_out, \
-  .get = snd_hdspm_get_line_out, \
-  .put = snd_hdspm_put_line_out \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.info = snd_hdspm_info_line_out, \
+	.get = snd_hdspm_get_line_out, \
+	.put = snd_hdspm_put_line_out \
 }
 
 static int hdspm_line_out(struct hdspm * hdspm)
@@ -2944,12 +2944,12 @@ static int snd_hdspm_put_line_out(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_TX_64(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .info = snd_hdspm_info_tx_64, \
-  .get = snd_hdspm_get_tx_64, \
-  .put = snd_hdspm_put_tx_64 \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.info = snd_hdspm_info_tx_64, \
+	.get = snd_hdspm_get_tx_64, \
+	.put = snd_hdspm_put_tx_64 \
 }
 
 static int hdspm_tx_64(struct hdspm * hdspm)
@@ -3000,12 +3000,12 @@ static int snd_hdspm_put_tx_64(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_C_TMS(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .info = snd_hdspm_info_c_tms, \
-  .get = snd_hdspm_get_c_tms, \
-  .put = snd_hdspm_put_c_tms \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.info = snd_hdspm_info_c_tms, \
+	.get = snd_hdspm_get_c_tms, \
+	.put = snd_hdspm_put_c_tms \
 }
 
 static int hdspm_c_tms(struct hdspm * hdspm)
@@ -3056,12 +3056,12 @@ static int snd_hdspm_put_c_tms(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_SAFE_MODE(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .info = snd_hdspm_info_safe_mode, \
-  .get = snd_hdspm_get_safe_mode, \
-  .put = snd_hdspm_put_safe_mode \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.info = snd_hdspm_info_safe_mode, \
+	.get = snd_hdspm_get_safe_mode, \
+	.put = snd_hdspm_put_safe_mode \
 }
 
 static int hdspm_safe_mode(struct hdspm * hdspm)
@@ -3112,12 +3112,12 @@ static int snd_hdspm_put_safe_mode(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_EMPHASIS(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .info = snd_hdspm_info_emphasis, \
-  .get = snd_hdspm_get_emphasis, \
-  .put = snd_hdspm_put_emphasis \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.info = snd_hdspm_info_emphasis, \
+	.get = snd_hdspm_get_emphasis, \
+	.put = snd_hdspm_put_emphasis \
 }
 
 static int hdspm_emphasis(struct hdspm * hdspm)
@@ -3168,12 +3168,12 @@ static int snd_hdspm_put_emphasis(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_DOLBY(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .info = snd_hdspm_info_dolby, \
-  .get = snd_hdspm_get_dolby, \
-  .put = snd_hdspm_put_dolby \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.info = snd_hdspm_info_dolby, \
+	.get = snd_hdspm_get_dolby, \
+	.put = snd_hdspm_put_dolby \
 }
 
 static int hdspm_dolby(struct hdspm * hdspm)
@@ -3224,12 +3224,12 @@ static int snd_hdspm_put_dolby(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_PROFESSIONAL(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .info = snd_hdspm_info_professional, \
-  .get = snd_hdspm_get_professional, \
-  .put = snd_hdspm_put_professional \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.info = snd_hdspm_info_professional, \
+	.get = snd_hdspm_get_professional, \
+	.put = snd_hdspm_put_professional \
 }
 
 static int hdspm_professional(struct hdspm * hdspm)
@@ -3279,12 +3279,12 @@ static int snd_hdspm_put_professional(struct snd_kcontrol *kcontrol,
 }
 
 #define HDSPM_INPUT_SELECT(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .info = snd_hdspm_info_input_select, \
-  .get = snd_hdspm_get_input_select, \
-  .put = snd_hdspm_put_input_select \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.info = snd_hdspm_info_input_select, \
+	.get = snd_hdspm_get_input_select, \
+	.put = snd_hdspm_put_input_select \
 }
 
 static int hdspm_input_select(struct hdspm * hdspm)
@@ -3351,12 +3351,12 @@ static int snd_hdspm_put_input_select(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_DS_WIRE(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .info = snd_hdspm_info_ds_wire, \
-  .get = snd_hdspm_get_ds_wire, \
-  .put = snd_hdspm_put_ds_wire \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.info = snd_hdspm_info_ds_wire, \
+	.get = snd_hdspm_get_ds_wire, \
+	.put = snd_hdspm_put_ds_wire \
 }
 
 static int hdspm_ds_wire(struct hdspm * hdspm)
@@ -3423,12 +3423,12 @@ static int snd_hdspm_put_ds_wire(struct snd_kcontrol *kcontrol,
 
 
 #define HDSPM_QS_WIRE(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .name = xname, \
-  .index = xindex, \
-  .info = snd_hdspm_info_qs_wire, \
-  .get = snd_hdspm_get_qs_wire, \
-  .put = snd_hdspm_put_qs_wire \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.name = xname, \
+	.index = xindex, \
+	.info = snd_hdspm_info_qs_wire, \
+	.get = snd_hdspm_get_qs_wire, \
+	.put = snd_hdspm_put_qs_wire \
 }
 
 static int hdspm_qs_wire(struct hdspm * hdspm)
@@ -3595,15 +3595,15 @@ static int snd_hdspm_put_madi_speedmode(struct snd_kcontrol *kcontrol,
 }
 
 #define HDSPM_MIXER(xname, xindex) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_HWDEP, \
-  .name = xname, \
-  .index = xindex, \
-  .device = 0, \
-  .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \
-		 SNDRV_CTL_ELEM_ACCESS_VOLATILE, \
-  .info = snd_hdspm_info_mixer, \
-  .get = snd_hdspm_get_mixer, \
-  .put = snd_hdspm_put_mixer \
+{	.iface = SNDRV_CTL_ELEM_IFACE_HWDEP, \
+	.name = xname, \
+	.index = xindex, \
+	.device = 0, \
+	.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \
+		SNDRV_CTL_ELEM_ACCESS_VOLATILE, \
+	.info = snd_hdspm_info_mixer, \
+	.get = snd_hdspm_get_mixer, \
+	.put = snd_hdspm_put_mixer \
 }
 
 static int snd_hdspm_info_mixer(struct snd_kcontrol *kcontrol,
@@ -3702,12 +3702,12 @@ static int snd_hdspm_put_mixer(struct snd_kcontrol *kcontrol,
 */
 
 #define HDSPM_PLAYBACK_MIXER \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE | \
-		 SNDRV_CTL_ELEM_ACCESS_VOLATILE, \
-  .info = snd_hdspm_info_playback_mixer, \
-  .get = snd_hdspm_get_playback_mixer, \
-  .put = snd_hdspm_put_playback_mixer \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+	.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE | \
+		SNDRV_CTL_ELEM_ACCESS_VOLATILE, \
+	.info = snd_hdspm_info_playback_mixer, \
+	.get = snd_hdspm_get_playback_mixer, \
+	.put = snd_hdspm_put_playback_mixer \
 }
 
 static int snd_hdspm_info_playback_mixer(struct snd_kcontrol *kcontrol,
Signature · 1 line
1.7.10.4