Firewire (IEEE1394) Audio Device and Linux

orpheus_f

I suppose it was in 2009 when I stared using a firewire audio interface for listening to music. At that time, with Ubuntu 9.04 or so, you needed to install some libraries such as Juju, FFADO, and Jack by yourself. (I was not very interested in Ubuntu Studio.)

Now, the year is 2015, and what do I have to do with Ubuntu 14.04 TLS?

I asked Google, and found this article: https://lists.ubuntu.com/archives/ubuntu-studio-devel/2014-May/005797.html.

And in the file, https://github.com/takaswie/snd-firewire-improve/blob/master/sound/firewire/bebob/bebob.c, it says:

/*
 * bebob.c - a part of driver for BeBoB based devices
 *
 * Copyright (c) 2013-2014 Takashi Sakamoto
 *
 * Licensed under the terms of the GNU General Public License, version 2.
 */

#define VEN_PRISMSOUND	0x00001198

static const struct ieee1394_device_id bebob_id_table[] = {
	/* PrismSound, Orpheus */
	SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x00010048, &spec_normal),

So there are some developments going on. Let’see what happens in my environment.

% ffado-diag
=== CHECK ===
 Base system...
  kernel version............ 3.13.0-49-generic
    Preempt (low latency)... False
    RT patched.............. False
  old 1394 stack present.... Falsehttp://qjackctl.sourceforge.net/
  old 1394 stack loaded..... False
  old 1394 stack active..... False
  new 1394 stack present.... True
  new 1394 stack loaded..... True
  new 1394 stack active..... True
  /dev/raw1394 node present. False
  /dev/fw* permissions:
crw-------  1 root root  250, 0 Apr 21 14:59 /dev/fw0
crw-rw----+ 1 root video 250, 1 Apr 21 16:56 /dev/fw1
% ffado-test ListDevices
=== 1394 PORT 0 ===
  Node id  GUID                  VendorId     ModelId   Vendor - Model
   0       0x00119800010001f9  0x00001198  0x00010048   Prism Media Products  - Orpheus
   1       0x0010dc0001bad8cf  0x000010DC  0x00000000   Linux Firewire - 
no message buffer overruns

Let’s try Audacity with QjackCtl.

audacityfirewire

Or from CLI using aplay:

% cat .asoundrc
pcm.rawjack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
    }
    capture_ports {
        0 system:capture_1
        1 system:capture_2
    }
}

pcm.jack {
    type plug
    slave { pcm "rawjack" }
    hint {
    description "JACK Audio Connection Kit"
    }
}

pcm.!default {
    type plug
    slave { pcm "rawjack" }
}
% jackd -R -dfirewire -r44100 -p4096 -n3
% aplay -D pcm.jack Music/01-Taking_Chances.wav

Or using alsaplayer:

% alsaplayer -i text -o jack -d "system:playback_1,system:playback_2" Music/01-Taking_Chances.wav

/proc/asound/card?/stream?

alsa

I do not know (and forget) many things.

% arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: ALC889 Analog [ALC889 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: MID [HDA Intel MID], device 2: ALC889 Alt Analog [ALC889 Alt Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 2: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

O.K. Now my device (IC-7410) is hw:2,0. (It depends on the sequence you power on your devices.)

% sprigmm /dev/ttyUSB1 hw:2,0 16000 1 hw:0,0 48000 2 <- note the bitrate

Run my program with the bitrate of hw:2,0 to be 16000bps.

% cat /proc/asound/card2/stream0
Burr-Brown from TI USB Audio CODEC at usb-0000:00:1a.0-1.3.1, full speed : USB Audio

Playback:
  Status: Stop
  Interface 1
    Altset 1
    Format: S16_LE
    Channels: 2
    Endpoint: 2 OUT (ADAPTIVE)
    Rates: 32000, 44100, 48000
  Interface 1
    Altset 2
    Format: S16_LE
    Channels: 1
    Endpoint: 2 OUT (ADAPTIVE)
    Rates: 32000, 44100, 48000
  Interface 1
    Altset 3
    Format: S8
    Channels: 2
    Endpoint: 2 OUT (ADAPTIVE)
    Rates: 32000, 44100, 48000
  Interface 1
    Altset 4
    Format: S8
    Channels: 1
    Endpoint: 2 OUT (ADAPTIVE)
    Rates: 32000, 44100, 48000
  Interface 1
    Altset 5
    Format: U8
    Channels: 2
    Endpoint: 2 OUT (ADAPTIVE)
    Rates: 32000, 44100, 48000
  Interface 1
    Altset 6
    Format: U8
    Channels: 1
    Endpoint: 2 OUT (ADAPTIVE)
    Rates: 32000, 44100, 48000

Capture:
  Status: Running <- ### this is it! ###
    Interface = 2
    Altset = 10
    Packet Size = 34
    Momentary freq = 16000 Hz (0x10.0000)
  Interface 2
    Altset 1
    Format: S16_LE
    Channels: 2
    Endpoint: 4 IN (ASYNC)
    Rates: 48000
  Interface 2
    Altset 2
    Format: S16_LE
    Channels: 1
    Endpoint: 4 IN (ASYNC)
    Rates: 48000
  Interface 2
    Altset 3
    Format: S16_LE
    Channels: 2
    Endpoint: 4 IN (ASYNC)
    Rates: 44100
  Interface 2
    Altset 4
    Format: S16_LE
    Channels: 1
    Endpoint: 4 IN (ASYNC)
    Rates: 44100
  Interface 2
    Altset 5
    Format: S16_LE
    Channels: 2
    Endpoint: 4 IN (ASYNC)
    Rates: 32000
  Interface 2
    Altset 6
    Format: S16_LE
    Channels: 1
    Endpoint: 4 IN (ASYNC)
    Rates: 32000
  Interface 2
    Altset 7
    Format: S16_LE
    Channels: 2
    Endpoint: 4 IN (ASYNC)
    Rates: 22050
  Interface 2
    Altset 8
    Format: S16_LE
    Channels: 1
    Endpoint: 4 IN (ASYNC)
    Rates: 22050
  Interface 2
    Altset 9
    Format: S16_LE
    Channels: 2
    Endpoint: 4 IN (ASYNC)
    Rates: 16000
  Interface 2
    Altset 10
    Format: S16_LE
    Channels: 1
    Endpoint: 4 IN (ASYNC)
    Rates: 16000
  Interface 2
    Altset 11
    Format: S8
    Channels: 2
    Endpoint: 4 IN (ASYNC)
    Rates: 16000
  Interface 2
    Altset 12
    Format: S8
    Channels: 1
    Endpoint: 4 IN (ASYNC)
    Rates: 16000
  Interface 2
    Altset 13
    Format: S8
    Channels: 2
    Endpoint: 4 IN (ASYNC)
    Rates: 8000
  Interface 2
    Altset 14
    Format: S8
    Channels: 1
    Endpoint: 4 IN (ASYNC)
    Rates: 8000
  Interface 2
    Altset 15
    Format: S16_LE
    Channels: 2
    Endpoint: 4 IN (SYNC)
    Rates: 11025
  Interface 2
    Altset 16
    Format: S16_LE
    Channels: 1
    Endpoint: 4 IN (SYNC)
    Rates: 11025
  Interface 2
    Altset 17
    Format: S8
    Channels: 2
    Endpoint: 4 IN (SYNC)
    Rates: 11025
  Interface 2
    Altset 18
    Format: S8
    Channels: 1
    Endpoint: 4 IN (SYNC)
    Rates: 11025

http://alsa.opensrc.org/Proc_asound_documentation

See the first several lines after the “Capture:” line.