The ζ1 Audio Widget asynchronous USB-I²S module

Linux tips

When the ζ1 module (and its mated main board) is connected to a computer's USB port, the kernel syslog (on most systems this would be /var/log/messages, you could also use the dmesg command) should show something like the following if the ζ1 is set to UAC1 mode (note that it's detected as a "full-speed USB device"):

Jan 31 23:13:51 lolo kernel: [84795.143031] usb 6-1: new full-speed USB device number 2 using ohci_hcd
Jan 31 23:13:51 lolo kernel: [84795.294049] usb 6-1: New USB device found, idVendor=16d0, idProduct=098b
Jan 31 23:13:51 lolo kernel: [84795.294052] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 31 23:13:51 lolo kernel: [84795.294054] usb 6-1: Product: AMB zeta1 USB-I2S Audio-Widget
Jan 31 23:13:51 lolo kernel: [84795.294056] usb 6-1: Manufacturer: AMB Laboratories
Jan 31 23:13:51 lolo kernel: [84795.294057] usb 6-1: SerialNumber: 2014041800AMB
Jan 31 23:13:51 lolo kernel: [84795.305100] input: AMB Laboratories AMB zeta1 USB-I2S Audio-Widget as /devices/pci0000:00/0000:00:13.1/usb6/6-1/6-1:1.1/input/input10
Jan 31 23:40:51 lolo kernel: [84795.305180] generic-usb 0003:16D0:098B.0007: input,hidraw4: USB HID v1.11 Device [AMB Laboratories AMB zeta1 USB-I2S Audio-Widget] on usb-0000:00:13.1-1/input1

Similarly, below is the syslog entries for the ζ1 in UAC2 mode ("high-speed USB device"):

Jan 31 23:14:26 lolo kernel: [85210.487092] usb 2-4: new high-speed USB device number 3 using ehci_hcd
Jan 31 23:14:27 lolo kernel: [85210.603102] usb 2-4: New USB device found, idVendor=16d0, idProduct=098c
Jan 31 23:14:27 lolo kernel: [85210.603105] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 31 23:14:27 lolo kernel: [85210.603107] usb 2-4: Product: AMB zeta1 USB-I2S Audio-Widget
Jan 31 23:14:27 lolo kernel: [85210.603109] usb 2-4: Manufacturer: AMB Laboratories
Jan 31 23:14:27 lolo kernel: [85210.603110] usb 2-4: SerialNumber: 2014041800AMB
Jan 31 23:14:27 lolo kernel: [85210.608521] input: AMB Laboratories AMB zeta1 USB-I2S Audio-Widget as /devices/pci0000:00/0000:00:13.2/usb2/2-4/2-4:1.3/input/input9
Jan 31 23:14:27 quattro kernel: [85210.608609] generic-usb 0003:16D0:098C.0006: input,hidraw4: USB HID v1.11 Device [AMB Laboratories AMB zeta1 USB-I2S Audio-Widget] on usb-0000:00:13.2-4/input3

The SerialNumber line is a date code in the format YYYYMMDDXXAMB (where YYYY is the year, MM is the month, DD is the day, and XX is a sequence number). It is used as the ζ1 firmware version number.

You can look at some interesting information about the ζ1 under the /proc/asound/AudioWidget directory hierarchy. For example, when in UAC1 mode, with no music playing, typing the following command at a shell prompt
cat /proc/asound/AudioWidget/stream0 should result in the following output:

AMB Laboratories AMB zeta1 USB-I2S Audio-Widget at usb-0000:00:13.1-1, full spe : USB Audio

Playback:
  Status: Stop
  Interface 3
    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 4 OUT (ASYNC)
    Rates: 44100, 48000

Notice that in UAC1 mode, ζ1 is a 24 bit ASYNC device supporting 44.1KHz and 48KHz sample rates.

Here is the output from the same command for UAC2 mode:

AMB Laboratories AMB zeta1 USB-I2S Audio-Widget at usb-0000:00:13.2-4, high spe : USB Audio

Playback:
  Status: Stop
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 2 OUT (ASYNC)
    Rates: 44100, 88200, 132300, 176400, 48000, 96000, 144000, 192000
    Data packet interval: 250 us

In UAC2 mode, ζ1 is a 32 bit ASYNC device supporting standard sample rates from 44.1KHz to 192KHz. Note that 132.3KHz and 144KHz do not work on most DACs.

While music is playing, typing the same command as above will result in more information. Here is the ζ1 in UAC2 mode playing a file with 192KHz sample rate:

AMB Laboratories AMB zeta1 USB-I2S Audio-Widget at usb-0000:00:13.2-4, high spe : USB Audio

Playback:
  Status: Running
    Interface = 2
    Altset = 1
    URBs = 8 [ 8 8 8 8 8 8 8 8 ]
    Packet Size = 392
    Momentary freq = 191965 Hz (0x17.fee0)
    Feedback Format = 15.17
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 2 OUT (ASYNC)
    Rates: 44100, 88200, 132300, 176400, 48000, 96000, 144000, 192000
    Data packet interval: 250 us

In asynchronous transfer mode, the DAC is the clock master, and ζ1 tells the host to speed up or slow down the data rate in order for the keep the data stream perfectly timed. The Momentary freq field is of particular interest, because a change in transfer rate is synonymous with changing the sample rate, so this number is the real-time host-side sample rate.

Typing the following command while music is playing
cat /proc/asound/AudioWidget/pcm0p/sub0/hw_params would give you the following output (here is an example playing audio with 44.1KHz sample rate in UAC2 mode):

access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 44100
buffer_size: 88200

All of the above lets you get a more in-depth look at the ζ1's actual operating parameters. They may be useful to check the device recognition, or to determine whether there is any resampling in software (such as in ALSA or PulseAudio).


Main: ζ1 Main | Prev: Design integration | Next: History & acknowledgements