1da607e19SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
225784ec2STakashi Sakamoto /*
325784ec2STakashi Sakamoto * bebob_focusrite.c - a part of driver for BeBoB based devices
425784ec2STakashi Sakamoto *
525784ec2STakashi Sakamoto * Copyright (c) 2013-2014 Takashi Sakamoto
625784ec2STakashi Sakamoto */
725784ec2STakashi Sakamoto
825784ec2STakashi Sakamoto #include "./bebob.h"
925784ec2STakashi Sakamoto
1025784ec2STakashi Sakamoto #define ANA_IN "Analog In"
1125784ec2STakashi Sakamoto #define DIG_IN "Digital In"
1225784ec2STakashi Sakamoto #define ANA_OUT "Analog Out"
1325784ec2STakashi Sakamoto #define DIG_OUT "Digital Out"
1425784ec2STakashi Sakamoto #define STM_IN "Stream In"
1525784ec2STakashi Sakamoto
169b5f0edfSTakashi Sakamoto #define SAFFIRE_ADDRESS_BASE 0x000100000000ULL
1725784ec2STakashi Sakamoto
189b5f0edfSTakashi Sakamoto #define SAFFIRE_OFFSET_CLOCK_SOURCE 0x00f8
199b5f0edfSTakashi Sakamoto #define SAFFIREPRO_OFFSET_CLOCK_SOURCE 0x0174
2025784ec2STakashi Sakamoto
2125784ec2STakashi Sakamoto /* whether sync to external device or not */
229b5f0edfSTakashi Sakamoto #define SAFFIRE_OFFSET_CLOCK_SYNC_EXT 0x013c
239b5f0edfSTakashi Sakamoto #define SAFFIRE_LE_OFFSET_CLOCK_SYNC_EXT 0x0432
249b5f0edfSTakashi Sakamoto #define SAFFIREPRO_OFFSET_CLOCK_SYNC_EXT 0x0164
2525784ec2STakashi Sakamoto
2625784ec2STakashi Sakamoto #define SAFFIRE_CLOCK_SOURCE_INTERNAL 0
2725784ec2STakashi Sakamoto #define SAFFIRE_CLOCK_SOURCE_SPDIF 1
2825784ec2STakashi Sakamoto
29d1d0b6b6SChristian Vogel /* clock sources as returned from register of Saffire Pro 10 and 26 */
30706ad674STakashi Sakamoto #define SAFFIREPRO_CLOCK_SOURCE_SELECT_MASK 0x000000ff
31706ad674STakashi Sakamoto #define SAFFIREPRO_CLOCK_SOURCE_DETECT_MASK 0x0000ff00
3225784ec2STakashi Sakamoto #define SAFFIREPRO_CLOCK_SOURCE_INTERNAL 0
33d1d0b6b6SChristian Vogel #define SAFFIREPRO_CLOCK_SOURCE_SKIP 1 /* never used on hardware */
3425784ec2STakashi Sakamoto #define SAFFIREPRO_CLOCK_SOURCE_SPDIF 2
35d1d0b6b6SChristian Vogel #define SAFFIREPRO_CLOCK_SOURCE_ADAT1 3 /* not used on s.pro. 10 */
36d1d0b6b6SChristian Vogel #define SAFFIREPRO_CLOCK_SOURCE_ADAT2 4 /* not used on s.pro. 10 */
3725784ec2STakashi Sakamoto #define SAFFIREPRO_CLOCK_SOURCE_WORDCLOCK 5
38d1d0b6b6SChristian Vogel #define SAFFIREPRO_CLOCK_SOURCE_COUNT 6
3925784ec2STakashi Sakamoto
4025784ec2STakashi Sakamoto /* S/PDIF, ADAT1, ADAT2 is enabled or not. three quadlets */
419b5f0edfSTakashi Sakamoto #define SAFFIREPRO_ENABLE_DIG_IFACES 0x01a4
4225784ec2STakashi Sakamoto
4325784ec2STakashi Sakamoto /* saffirepro has its own parameter for sampling frequency */
449b5f0edfSTakashi Sakamoto #define SAFFIREPRO_RATE_NOREBOOT 0x01cc
4525784ec2STakashi Sakamoto /* index is the value for this register */
4625784ec2STakashi Sakamoto static const unsigned int rates[] = {
4725784ec2STakashi Sakamoto [0] = 0,
4825784ec2STakashi Sakamoto [1] = 44100,
4925784ec2STakashi Sakamoto [2] = 48000,
5025784ec2STakashi Sakamoto [3] = 88200,
5125784ec2STakashi Sakamoto [4] = 96000,
5225784ec2STakashi Sakamoto [5] = 176400,
5325784ec2STakashi Sakamoto [6] = 192000
5425784ec2STakashi Sakamoto };
5525784ec2STakashi Sakamoto
5625784ec2STakashi Sakamoto /* saffire(no label)/saffire LE has metering */
579b5f0edfSTakashi Sakamoto #define SAFFIRE_OFFSET_METER 0x0100
589b5f0edfSTakashi Sakamoto #define SAFFIRE_LE_OFFSET_METER 0x0168
5925784ec2STakashi Sakamoto
6025784ec2STakashi Sakamoto static inline int
saffire_read_block(struct snd_bebob * bebob,u64 offset,u32 * buf,unsigned int size)6125784ec2STakashi Sakamoto saffire_read_block(struct snd_bebob *bebob, u64 offset,
6225784ec2STakashi Sakamoto u32 *buf, unsigned int size)
6325784ec2STakashi Sakamoto {
6425784ec2STakashi Sakamoto unsigned int i;
6525784ec2STakashi Sakamoto int err;
6625784ec2STakashi Sakamoto __be32 *tmp = (__be32 *)buf;
6725784ec2STakashi Sakamoto
6825784ec2STakashi Sakamoto err = snd_fw_transaction(bebob->unit, TCODE_READ_BLOCK_REQUEST,
6925784ec2STakashi Sakamoto SAFFIRE_ADDRESS_BASE + offset,
7025784ec2STakashi Sakamoto tmp, size, 0);
7125784ec2STakashi Sakamoto if (err < 0)
7225784ec2STakashi Sakamoto goto end;
7325784ec2STakashi Sakamoto
7425784ec2STakashi Sakamoto for (i = 0; i < size / sizeof(u32); i++)
7525784ec2STakashi Sakamoto buf[i] = be32_to_cpu(tmp[i]);
7625784ec2STakashi Sakamoto end:
7725784ec2STakashi Sakamoto return err;
7825784ec2STakashi Sakamoto }
7925784ec2STakashi Sakamoto
8025784ec2STakashi Sakamoto static inline int
saffire_read_quad(struct snd_bebob * bebob,u64 offset,u32 * value)8125784ec2STakashi Sakamoto saffire_read_quad(struct snd_bebob *bebob, u64 offset, u32 *value)
8225784ec2STakashi Sakamoto {
8325784ec2STakashi Sakamoto int err;
8425784ec2STakashi Sakamoto __be32 tmp;
8525784ec2STakashi Sakamoto
8625784ec2STakashi Sakamoto err = snd_fw_transaction(bebob->unit, TCODE_READ_QUADLET_REQUEST,
8725784ec2STakashi Sakamoto SAFFIRE_ADDRESS_BASE + offset,
8825784ec2STakashi Sakamoto &tmp, sizeof(__be32), 0);
8925784ec2STakashi Sakamoto if (err < 0)
9025784ec2STakashi Sakamoto goto end;
9125784ec2STakashi Sakamoto
9225784ec2STakashi Sakamoto *value = be32_to_cpu(tmp);
9325784ec2STakashi Sakamoto end:
9425784ec2STakashi Sakamoto return err;
9525784ec2STakashi Sakamoto }
9625784ec2STakashi Sakamoto
9725784ec2STakashi Sakamoto static inline int
saffire_write_quad(struct snd_bebob * bebob,u64 offset,u32 value)9825784ec2STakashi Sakamoto saffire_write_quad(struct snd_bebob *bebob, u64 offset, u32 value)
9925784ec2STakashi Sakamoto {
10025784ec2STakashi Sakamoto __be32 data = cpu_to_be32(value);
10125784ec2STakashi Sakamoto
10225784ec2STakashi Sakamoto return snd_fw_transaction(bebob->unit, TCODE_WRITE_QUADLET_REQUEST,
10325784ec2STakashi Sakamoto SAFFIRE_ADDRESS_BASE + offset,
10425784ec2STakashi Sakamoto &data, sizeof(__be32), 0);
10525784ec2STakashi Sakamoto }
10625784ec2STakashi Sakamoto
107782fbec7STakashi Sakamoto static const enum snd_bebob_clock_type saffirepro_10_clk_src_types[] = {
108ba517713STakashi Sakamoto SND_BEBOB_CLOCK_TYPE_INTERNAL,
109ba517713STakashi Sakamoto SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
110ba517713STakashi Sakamoto SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */
111ba517713STakashi Sakamoto };
112782fbec7STakashi Sakamoto static const enum snd_bebob_clock_type saffirepro_26_clk_src_types[] = {
113ba517713STakashi Sakamoto SND_BEBOB_CLOCK_TYPE_INTERNAL,
114ba517713STakashi Sakamoto SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
115ba517713STakashi Sakamoto SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* ADAT1 */
116ba517713STakashi Sakamoto SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* ADAT2 */
117ba517713STakashi Sakamoto SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */
118ba517713STakashi Sakamoto };
119d1d0b6b6SChristian Vogel /* Value maps between registers and labels for SaffirePro 10/26. */
120d1d0b6b6SChristian Vogel static const signed char saffirepro_clk_maps[][SAFFIREPRO_CLOCK_SOURCE_COUNT] = {
121d1d0b6b6SChristian Vogel /* SaffirePro 10 */
122d1d0b6b6SChristian Vogel [0] = {
123d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_INTERNAL] = 0,
124d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_SKIP] = -1, /* not supported */
125d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_SPDIF] = 1,
126d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_ADAT1] = -1, /* not supported */
127d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_ADAT2] = -1, /* not supported */
128d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_WORDCLOCK] = 2,
129d1d0b6b6SChristian Vogel },
130d1d0b6b6SChristian Vogel /* SaffirePro 26 */
131d1d0b6b6SChristian Vogel [1] = {
132d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_INTERNAL] = 0,
133d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_SKIP] = -1, /* not supported */
134d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_SPDIF] = 1,
135d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_ADAT1] = 2,
136d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_ADAT2] = 3,
137d1d0b6b6SChristian Vogel [SAFFIREPRO_CLOCK_SOURCE_WORDCLOCK] = 4,
138d1d0b6b6SChristian Vogel }
139d1d0b6b6SChristian Vogel };
140d1d0b6b6SChristian Vogel
14125784ec2STakashi Sakamoto static int
saffirepro_both_clk_freq_get(struct snd_bebob * bebob,unsigned int * rate)14225784ec2STakashi Sakamoto saffirepro_both_clk_freq_get(struct snd_bebob *bebob, unsigned int *rate)
14325784ec2STakashi Sakamoto {
14425784ec2STakashi Sakamoto u32 id;
14525784ec2STakashi Sakamoto int err;
14625784ec2STakashi Sakamoto
14725784ec2STakashi Sakamoto err = saffire_read_quad(bebob, SAFFIREPRO_RATE_NOREBOOT, &id);
14825784ec2STakashi Sakamoto if (err < 0)
14925784ec2STakashi Sakamoto goto end;
15025784ec2STakashi Sakamoto if (id >= ARRAY_SIZE(rates))
15125784ec2STakashi Sakamoto err = -EIO;
15225784ec2STakashi Sakamoto else
15325784ec2STakashi Sakamoto *rate = rates[id];
15425784ec2STakashi Sakamoto end:
15525784ec2STakashi Sakamoto return err;
15625784ec2STakashi Sakamoto }
15725784ec2STakashi Sakamoto static int
saffirepro_both_clk_freq_set(struct snd_bebob * bebob,unsigned int rate)15825784ec2STakashi Sakamoto saffirepro_both_clk_freq_set(struct snd_bebob *bebob, unsigned int rate)
15925784ec2STakashi Sakamoto {
16025784ec2STakashi Sakamoto u32 id;
16125784ec2STakashi Sakamoto
16225784ec2STakashi Sakamoto for (id = 0; id < ARRAY_SIZE(rates); id++) {
16325784ec2STakashi Sakamoto if (rates[id] == rate)
16425784ec2STakashi Sakamoto break;
16525784ec2STakashi Sakamoto }
16625784ec2STakashi Sakamoto if (id == ARRAY_SIZE(rates))
16725784ec2STakashi Sakamoto return -EINVAL;
16825784ec2STakashi Sakamoto
16925784ec2STakashi Sakamoto return saffire_write_quad(bebob, SAFFIREPRO_RATE_NOREBOOT, id);
17025784ec2STakashi Sakamoto }
171d1d0b6b6SChristian Vogel
172d1d0b6b6SChristian Vogel /*
173d1d0b6b6SChristian Vogel * query hardware for current clock source, return our internally
174d1d0b6b6SChristian Vogel * used clock index in *id, depending on hardware.
175d1d0b6b6SChristian Vogel */
17625784ec2STakashi Sakamoto static int
saffirepro_both_clk_src_get(struct snd_bebob * bebob,unsigned int * id)17725784ec2STakashi Sakamoto saffirepro_both_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
17825784ec2STakashi Sakamoto {
17925784ec2STakashi Sakamoto int err;
180d1d0b6b6SChristian Vogel u32 value; /* clock source read from hw register */
181d1d0b6b6SChristian Vogel const signed char *map;
18225784ec2STakashi Sakamoto
18325784ec2STakashi Sakamoto err = saffire_read_quad(bebob, SAFFIREPRO_OFFSET_CLOCK_SOURCE, &value);
18425784ec2STakashi Sakamoto if (err < 0)
18525784ec2STakashi Sakamoto goto end;
18625784ec2STakashi Sakamoto
187d1d0b6b6SChristian Vogel /* depending on hardware, use a different mapping */
188ba517713STakashi Sakamoto if (bebob->spec->clock->types == saffirepro_10_clk_src_types)
189d1d0b6b6SChristian Vogel map = saffirepro_clk_maps[0];
190d1d0b6b6SChristian Vogel else
191d1d0b6b6SChristian Vogel map = saffirepro_clk_maps[1];
192d1d0b6b6SChristian Vogel
193d1d0b6b6SChristian Vogel /* In a case that this driver cannot handle the value of register. */
194706ad674STakashi Sakamoto value &= SAFFIREPRO_CLOCK_SOURCE_SELECT_MASK;
195d1d0b6b6SChristian Vogel if (value >= SAFFIREPRO_CLOCK_SOURCE_COUNT || map[value] < 0) {
196d1d0b6b6SChristian Vogel err = -EIO;
197d1d0b6b6SChristian Vogel goto end;
19825784ec2STakashi Sakamoto }
199d1d0b6b6SChristian Vogel
200d1d0b6b6SChristian Vogel *id = (unsigned int)map[value];
20125784ec2STakashi Sakamoto end:
20225784ec2STakashi Sakamoto return err;
20325784ec2STakashi Sakamoto }
20425784ec2STakashi Sakamoto
2056b9866c8SJulia Lawall const struct snd_bebob_spec saffire_le_spec;
206782fbec7STakashi Sakamoto static const enum snd_bebob_clock_type saffire_both_clk_src_types[] = {
207ba517713STakashi Sakamoto SND_BEBOB_CLOCK_TYPE_INTERNAL,
208ba517713STakashi Sakamoto SND_BEBOB_CLOCK_TYPE_EXTERNAL,
209ba517713STakashi Sakamoto };
21025784ec2STakashi Sakamoto static int
saffire_both_clk_src_get(struct snd_bebob * bebob,unsigned int * id)21125784ec2STakashi Sakamoto saffire_both_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
21225784ec2STakashi Sakamoto {
21325784ec2STakashi Sakamoto int err;
21425784ec2STakashi Sakamoto u32 value;
21525784ec2STakashi Sakamoto
21625784ec2STakashi Sakamoto err = saffire_read_quad(bebob, SAFFIRE_OFFSET_CLOCK_SOURCE, &value);
21725784ec2STakashi Sakamoto if (err >= 0)
21825784ec2STakashi Sakamoto *id = 0xff & value;
21925784ec2STakashi Sakamoto
22025784ec2STakashi Sakamoto return err;
22125784ec2STakashi Sakamoto };
222e7ced413STakashi Iwai static const char *const saffire_le_meter_labels[] = {
22325784ec2STakashi Sakamoto ANA_IN, ANA_IN, DIG_IN,
22425784ec2STakashi Sakamoto ANA_OUT, ANA_OUT, ANA_OUT, ANA_OUT,
22525784ec2STakashi Sakamoto STM_IN, STM_IN
22625784ec2STakashi Sakamoto };
227e7ced413STakashi Iwai static const char *const saffire_meter_labels[] = {
22825784ec2STakashi Sakamoto ANA_IN, ANA_IN,
22925784ec2STakashi Sakamoto STM_IN, STM_IN, STM_IN, STM_IN, STM_IN,
23025784ec2STakashi Sakamoto };
23125784ec2STakashi Sakamoto static int
saffire_meter_get(struct snd_bebob * bebob,u32 * buf,unsigned int size)23225784ec2STakashi Sakamoto saffire_meter_get(struct snd_bebob *bebob, u32 *buf, unsigned int size)
23325784ec2STakashi Sakamoto {
2346b9866c8SJulia Lawall const struct snd_bebob_meter_spec *spec = bebob->spec->meter;
23525784ec2STakashi Sakamoto unsigned int channels;
23625784ec2STakashi Sakamoto u64 offset;
23725784ec2STakashi Sakamoto int err;
23825784ec2STakashi Sakamoto
23925784ec2STakashi Sakamoto if (spec->labels == saffire_le_meter_labels)
24025784ec2STakashi Sakamoto offset = SAFFIRE_LE_OFFSET_METER;
24125784ec2STakashi Sakamoto else
24225784ec2STakashi Sakamoto offset = SAFFIRE_OFFSET_METER;
24325784ec2STakashi Sakamoto
24425784ec2STakashi Sakamoto channels = spec->num * 2;
24525784ec2STakashi Sakamoto if (size < channels * sizeof(u32))
24625784ec2STakashi Sakamoto return -EIO;
24725784ec2STakashi Sakamoto
24825784ec2STakashi Sakamoto err = saffire_read_block(bebob, offset, buf, size);
24925784ec2STakashi Sakamoto if (err >= 0 && spec->labels == saffire_le_meter_labels) {
25025784ec2STakashi Sakamoto swap(buf[1], buf[3]);
25125784ec2STakashi Sakamoto swap(buf[2], buf[3]);
25225784ec2STakashi Sakamoto swap(buf[3], buf[4]);
25325784ec2STakashi Sakamoto
25425784ec2STakashi Sakamoto swap(buf[7], buf[10]);
25525784ec2STakashi Sakamoto swap(buf[8], buf[10]);
25625784ec2STakashi Sakamoto swap(buf[9], buf[11]);
25725784ec2STakashi Sakamoto swap(buf[11], buf[12]);
25825784ec2STakashi Sakamoto
25925784ec2STakashi Sakamoto swap(buf[15], buf[16]);
26025784ec2STakashi Sakamoto }
26125784ec2STakashi Sakamoto
26225784ec2STakashi Sakamoto return err;
26325784ec2STakashi Sakamoto }
26425784ec2STakashi Sakamoto
2656b9866c8SJulia Lawall static const struct snd_bebob_rate_spec saffirepro_both_rate_spec = {
26625784ec2STakashi Sakamoto .get = &saffirepro_both_clk_freq_get,
26725784ec2STakashi Sakamoto .set = &saffirepro_both_clk_freq_set,
26825784ec2STakashi Sakamoto };
26925784ec2STakashi Sakamoto /* Saffire Pro 26 I/O */
2706b9866c8SJulia Lawall static const struct snd_bebob_clock_spec saffirepro_26_clk_spec = {
271ba517713STakashi Sakamoto .num = ARRAY_SIZE(saffirepro_26_clk_src_types),
272ba517713STakashi Sakamoto .types = saffirepro_26_clk_src_types,
27325784ec2STakashi Sakamoto .get = &saffirepro_both_clk_src_get,
27425784ec2STakashi Sakamoto };
2756b9866c8SJulia Lawall const struct snd_bebob_spec saffirepro_26_spec = {
27625784ec2STakashi Sakamoto .clock = &saffirepro_26_clk_spec,
27725784ec2STakashi Sakamoto .rate = &saffirepro_both_rate_spec,
27825784ec2STakashi Sakamoto .meter = NULL
27925784ec2STakashi Sakamoto };
28025784ec2STakashi Sakamoto /* Saffire Pro 10 I/O */
2816b9866c8SJulia Lawall static const struct snd_bebob_clock_spec saffirepro_10_clk_spec = {
282ba517713STakashi Sakamoto .num = ARRAY_SIZE(saffirepro_10_clk_src_types),
283ba517713STakashi Sakamoto .types = saffirepro_10_clk_src_types,
28425784ec2STakashi Sakamoto .get = &saffirepro_both_clk_src_get,
28525784ec2STakashi Sakamoto };
2866b9866c8SJulia Lawall const struct snd_bebob_spec saffirepro_10_spec = {
28725784ec2STakashi Sakamoto .clock = &saffirepro_10_clk_spec,
28825784ec2STakashi Sakamoto .rate = &saffirepro_both_rate_spec,
28925784ec2STakashi Sakamoto .meter = NULL
29025784ec2STakashi Sakamoto };
29125784ec2STakashi Sakamoto
2926b9866c8SJulia Lawall static const struct snd_bebob_rate_spec saffire_both_rate_spec = {
29325784ec2STakashi Sakamoto .get = &snd_bebob_stream_get_rate,
29425784ec2STakashi Sakamoto .set = &snd_bebob_stream_set_rate,
29525784ec2STakashi Sakamoto };
2966b9866c8SJulia Lawall static const struct snd_bebob_clock_spec saffire_both_clk_spec = {
297ba517713STakashi Sakamoto .num = ARRAY_SIZE(saffire_both_clk_src_types),
298ba517713STakashi Sakamoto .types = saffire_both_clk_src_types,
29925784ec2STakashi Sakamoto .get = &saffire_both_clk_src_get,
30025784ec2STakashi Sakamoto };
30125784ec2STakashi Sakamoto /* Saffire LE */
3026b9866c8SJulia Lawall static const struct snd_bebob_meter_spec saffire_le_meter_spec = {
30325784ec2STakashi Sakamoto .num = ARRAY_SIZE(saffire_le_meter_labels),
30425784ec2STakashi Sakamoto .labels = saffire_le_meter_labels,
30525784ec2STakashi Sakamoto .get = &saffire_meter_get,
30625784ec2STakashi Sakamoto };
3076b9866c8SJulia Lawall const struct snd_bebob_spec saffire_le_spec = {
30825784ec2STakashi Sakamoto .clock = &saffire_both_clk_spec,
30925784ec2STakashi Sakamoto .rate = &saffire_both_rate_spec,
31025784ec2STakashi Sakamoto .meter = &saffire_le_meter_spec
31125784ec2STakashi Sakamoto };
31225784ec2STakashi Sakamoto /* Saffire */
3136b9866c8SJulia Lawall static const struct snd_bebob_meter_spec saffire_meter_spec = {
31425784ec2STakashi Sakamoto .num = ARRAY_SIZE(saffire_meter_labels),
31525784ec2STakashi Sakamoto .labels = saffire_meter_labels,
31625784ec2STakashi Sakamoto .get = &saffire_meter_get,
31725784ec2STakashi Sakamoto };
3186b9866c8SJulia Lawall const struct snd_bebob_spec saffire_spec = {
31925784ec2STakashi Sakamoto .clock = &saffire_both_clk_spec,
32025784ec2STakashi Sakamoto .rate = &saffire_both_rate_spec,
32125784ec2STakashi Sakamoto .meter = &saffire_meter_spec
32225784ec2STakashi Sakamoto };
323