2 * bebob_terratec.c - a part of driver for BeBoB based devices
4 * Copyright (c) 2013-2014 Takashi Sakamoto
6 * Licensed under the terms of the GNU General Public License, version 2.
11 static char *const phase88_rack_clk_src_labels
[] = {
12 SND_BEBOB_CLOCK_INTERNAL
, "Digital In", "Word Clock"
15 phase88_rack_clk_src_get(struct snd_bebob
*bebob
, unsigned int *id
)
17 unsigned int enable_ext
, enable_word
;
20 err
= avc_audio_get_selector(bebob
->unit
, 0, 9, &enable_ext
);
23 err
= avc_audio_get_selector(bebob
->unit
, 0, 8, &enable_word
);
29 else if (enable_word
== 0)
37 static char *const phase24_series_clk_src_labels
[] = {
38 SND_BEBOB_CLOCK_INTERNAL
, "Digital In"
41 phase24_series_clk_src_get(struct snd_bebob
*bebob
, unsigned int *id
)
43 return avc_audio_get_selector(bebob
->unit
, 0, 4, id
);
46 static struct snd_bebob_rate_spec phase_series_rate_spec
= {
47 .get
= &snd_bebob_stream_get_rate
,
48 .set
= &snd_bebob_stream_set_rate
,
51 /* PHASE 88 Rack FW */
52 static struct snd_bebob_clock_spec phase88_rack_clk
= {
53 .num
= ARRAY_SIZE(phase88_rack_clk_src_labels
),
54 .labels
= phase88_rack_clk_src_labels
,
55 .get
= &phase88_rack_clk_src_get
,
57 struct snd_bebob_spec phase88_rack_spec
= {
58 .clock
= &phase88_rack_clk
,
59 .rate
= &phase_series_rate_spec
,
63 /* 'PHASE 24 FW' and 'PHASE X24 FW' */
64 static struct snd_bebob_clock_spec phase24_series_clk
= {
65 .num
= ARRAY_SIZE(phase24_series_clk_src_labels
),
66 .labels
= phase24_series_clk_src_labels
,
67 .get
= &phase24_series_clk_src_get
,
69 struct snd_bebob_spec phase24_series_spec
= {
70 .clock
= &phase24_series_clk
,
71 .rate
= &phase_series_rate_spec
,