[alsa-devel] [FFADO-devel] [RFC][PATCH 32/37] ALSA: firewire-motu: add stream functionality

Jonathan Woithe jwoithe at just42.net
Mon Jul 13 13:23:21 CEST 2015


On Sat, Jul 11, 2015 at 11:12:43PM +0900, Takashi Sakamoto wrote:
> +enum snd_motu_clock {
> +	SND_MOTU_CLOCK_INTERNAL = 0,
> +	SND_MOTU_CLOCK_OPT,		/* S/PDIF or ADAT */
> +	SND_MOTU_CLOCK_SPDIF_COAX,
> +	SND_MOTU_CLOCK_SPH,		/* SMPTE */
> +	SND_MOTU_CLOCK_ADAT_DSUB,
> +	SND_MOTU_CLOCK_AESEBU_XLR,
> +	SND_MOTU_CLOCK_WORD_BNC,
>  };

I'm not convinced that perpending the physical interface connection is all
that necessary because generally speaking the clock source uniquely implies
the physical connection.  Word clock is always on BNC, AES/EBU is always on
XRL, an SPDIF clock is assumed to be on coax and an "ADAT clock" is always
on the D-sub (it is common knowledge that this is different from an optical
clock).  I will concede that for qualifying the ADAT clock is justifiable to
avoid confusion (in FFADO I used ADAT_9PIN).  I also think that it is
unnecessary to abbreviate "optical" to "opt": there's no reason not to use 4
additional letters and "OPTICAL" is much clearer than "OPT" (the latter is
ambiguous and could be taken to be short for "optional" for example). 
Finally, the SMTPE clock should be called just this: the fact that it
happens to be transported via the SPH is largely irrelevant.  Using SMTPE in
the identifer makes the source entirely clear as to what's being done,
whereas SPH is rather vague.

Therefore I would suggest the following set of clock identifiers would be
perfectly adequate:

  SND_MOTU_CLOCK_INTERNAL
  SND_MOTU_CLOCK_OPTICAL
  SND_MOTU_CLOCK_SPDIF
  SND_MOTU_CLOCK_SMPTE
  SND_MOTU_CLOCK_ADAT_DSUB
  SND_MOTU_CLOCK_AESEBU
  SND_MOTU_CLOCK_WORDCLOCK

Regards
  jonathan


More information about the Alsa-devel mailing list