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

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

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  * bebob_yamaha.c - a part of driver for BeBoB based devices
  4  *
  5  * Copyright (c) 2013-2014 Takashi Sakamoto
  6  */
  7 
  8 #include "./bebob.h"
  9 
 10 /*
 11  * NOTE:
 12  * Yamaha GO44 is not designed to be used as stand-alone mixer. So any streams
 13  * must be accompanied. If changing the state, a LED on the device starts to
 14  * blink and its sync status is false. In this state, the device sounds nothing
 15  * even if streaming. To start streaming at the current sampling rate is only
 16  * way to recover this state. GO46 is better for stand-alone mixer.
 17  *
 18  * Both of them have a capability to change its sampling rate up to 192.0kHz.
 19  * At 192.0kHz, the device reports 4 PCM-in, 1 MIDI-in, 6 PCM-out, 1 MIDI-out.
 20  * But Yamaha's driver reduce 2 PCM-in, 1 MIDI-in, 2 PCM-out, 1 MIDI-out to use
 21  * 'Extended Stream Format Information Command - Single Request' in 'Additional
 22  * AVC commands' defined by BridgeCo.
 23  * This ALSA driver don't do this because a bit tiresome. Then isochronous
 24  * streaming with many asynchronous transactions brings sounds with noises.
 25  * Unfortunately current 'ffado-mixer' generated many asynchronous transaction
 26  * to observe device's state, mainly check cmp connection and signal format. I
 27  * recommend users to close ffado-mixer at 192.0kHz if mixer is needless.
 28  *
 29  * Terratec PHASE 24 FW and PHASE X24 FW are internally the same as
 30  * Yamaha GO 44 and GO 46. Yamaha and Terratec had cooperated for these models.
 31  */
 32 
 33 static const enum snd_bebob_clock_type clk_src_types[] = {
 34         SND_BEBOB_CLOCK_TYPE_INTERNAL,
 35         SND_BEBOB_CLOCK_TYPE_EXTERNAL,  /* S/PDIF */
 36 };
 37 static int
 38 clk_src_get(struct snd_bebob *bebob, unsigned int *id)
 39 {
 40         int err;
 41 
 42         err = avc_audio_get_selector(bebob->unit, 0, 4, id);
 43         if (err < 0)
 44                 return err;
 45 
 46         if (*id >= ARRAY_SIZE(clk_src_types))
 47                 return -EIO;
 48 
 49         return 0;
 50 }
 51 static const struct snd_bebob_clock_spec clock_spec = {
 52         .num    = ARRAY_SIZE(clk_src_types),
 53         .types  = clk_src_types,
 54         .get    = &clk_src_get,
 55 };
 56 static const struct snd_bebob_rate_spec rate_spec = {
 57         .get    = &snd_bebob_stream_get_rate,
 58         .set    = &snd_bebob_stream_set_rate,
 59 };
 60 const struct snd_bebob_spec yamaha_terratec_spec = {
 61         .clock  = &clock_spec,
 62         .rate   = &rate_spec,
 63         .meter  = NULL
 64 };
 65 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php