~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/firewire/bebob/bebob_terratec.c

Version: ~ [ linux-5.2-rc6 ] ~ [ linux-5.1.15 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.56 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.130 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.183 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.183 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.69 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * bebob_terratec.c - a part of driver for BeBoB based devices
  3  *
  4  * Copyright (c) 2013-2014 Takashi Sakamoto
  5  *
  6  * Licensed under the terms of the GNU General Public License, version 2.
  7  */
  8 
  9 #include "./bebob.h"
 10 
 11 static enum snd_bebob_clock_type phase88_rack_clk_src_types[] = {
 12         SND_BEBOB_CLOCK_TYPE_INTERNAL,
 13         SND_BEBOB_CLOCK_TYPE_EXTERNAL,  /* S/PDIF */
 14         SND_BEBOB_CLOCK_TYPE_EXTERNAL,  /* Word Clock */
 15 };
 16 static int
 17 phase88_rack_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
 18 {
 19         unsigned int enable_ext, enable_word;
 20         int err;
 21 
 22         err = avc_audio_get_selector(bebob->unit, 0, 9, &enable_ext);
 23         if (err < 0)
 24                 goto end;
 25         err = avc_audio_get_selector(bebob->unit, 0, 8, &enable_word);
 26         if (err < 0)
 27                 goto end;
 28 
 29         if (enable_ext == 0)
 30                 *id = 0;
 31         else if (enable_word == 0)
 32                 *id = 1;
 33         else
 34                 *id = 2;
 35 end:
 36         return err;
 37 }
 38 
 39 static const struct snd_bebob_rate_spec phase_series_rate_spec = {
 40         .get    = &snd_bebob_stream_get_rate,
 41         .set    = &snd_bebob_stream_set_rate,
 42 };
 43 
 44 /* PHASE 88 Rack FW */
 45 static const struct snd_bebob_clock_spec phase88_rack_clk = {
 46         .num    = ARRAY_SIZE(phase88_rack_clk_src_types),
 47         .types  = phase88_rack_clk_src_types,
 48         .get    = &phase88_rack_clk_src_get,
 49 };
 50 const struct snd_bebob_spec phase88_rack_spec = {
 51         .clock  = &phase88_rack_clk,
 52         .rate   = &phase_series_rate_spec,
 53         .meter  = NULL
 54 };
 55 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp