summaryrefslogtreecommitdiffstats
path: root/kernel/sound/firewire/bebob/bebob_yamaha.c
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-11 10:41:07 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-13 08:17:18 +0300
commite09b41010ba33a20a87472ee821fa407a5b8da36 (patch)
treed10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/sound/firewire/bebob/bebob_yamaha.c
parentf93b97fd65072de626c074dbe099a1fff05ce060 (diff)
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page. During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/sound/firewire/bebob/bebob_yamaha.c')
-rw-r--r--kernel/sound/firewire/bebob/bebob_yamaha.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/kernel/sound/firewire/bebob/bebob_yamaha.c b/kernel/sound/firewire/bebob/bebob_yamaha.c
index ef1fe3823..90d4404f7 100644
--- a/kernel/sound/firewire/bebob/bebob_yamaha.c
+++ b/kernel/sound/firewire/bebob/bebob_yamaha.c
@@ -28,22 +28,34 @@
* reccomend users to close ffado-mixer at 192.0kHz if mixer is needless.
*/
-static const char *const clk_src_labels[] = {SND_BEBOB_CLOCK_INTERNAL, "SPDIF"};
+static enum snd_bebob_clock_type clk_src_types[] = {
+ SND_BEBOB_CLOCK_TYPE_INTERNAL,
+ SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
+};
static int
clk_src_get(struct snd_bebob *bebob, unsigned int *id)
{
- return avc_audio_get_selector(bebob->unit, 0, 4, id);
+ int err;
+
+ err = avc_audio_get_selector(bebob->unit, 0, 4, id);
+ if (err < 0)
+ return err;
+
+ if (*id >= ARRAY_SIZE(clk_src_types))
+ return -EIO;
+
+ return 0;
}
-static struct snd_bebob_clock_spec clock_spec = {
- .num = ARRAY_SIZE(clk_src_labels),
- .labels = clk_src_labels,
+static const struct snd_bebob_clock_spec clock_spec = {
+ .num = ARRAY_SIZE(clk_src_types),
+ .types = clk_src_types,
.get = &clk_src_get,
};
-static struct snd_bebob_rate_spec rate_spec = {
+static const struct snd_bebob_rate_spec rate_spec = {
.get = &snd_bebob_stream_get_rate,
.set = &snd_bebob_stream_set_rate,
};
-struct snd_bebob_spec yamaha_go_spec = {
+const struct snd_bebob_spec yamaha_go_spec = {
.clock = &clock_spec,
.rate = &rate_spec,
.meter = NULL