[Linux on Mac] Ardour + alsa/jack do not play sound [solved]

Solved by rgareus.

So the issues -

  1. I had set up Jack (jack 1 and jack 2) and everything on my computer, tried compiling Jack2 from source even.
  2. I had installed the jack-pulseaudio bridge, which worked fine.
  3. I had installed QjackCtl
  4. Pulseaudio could play audio on my computer fine, and so could pipewire (from source).
  5. Pipewire liked ardour5 but crashed in ardour6
  6. Ardour6 could play audio with pulseaudio so long as everything was connected properly.
  7. Ardour6 could not play audio with Jack or Alsa, but could record with them.
  8. Everything looked good to Jack, QjackCtl, and Ardour
  9. I was running generic LTS Ubuntu 20 (Linux zyth 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux)
  10. Important: I’m using Linux on a macbook from 2015, (the sound card is the source of my issues).

How rgareus diagnosed it:

cd /tmp && wget https://community.ardour.org/files/adevices.sh && bash ./adevices.sh

They had me run that command with the Alsa backend running and then with pulseaudio running, which led to the following pastes

Alsa backend:

========================================
Part I: ALSA
Advanced Linux Sound Architecture Driver Version k5.8.0-48-generic.

Card 0 (HDMI):
  * Playback Device 3 (HDMI 0):
    - Subdevice 0 (hw:HDMI,3,0):
      closed

  * Playback Device 7 (HDMI 1):
    - Subdevice 0 (hw:HDMI,7,0):
      closed

  * Playback Device 8 (HDMI 2):
    - Subdevice 0 (hw:HDMI,8,0):
      closed

  * Playback Device 9 (HDMI 3):
    - Subdevice 0 (hw:HDMI,9,0):
      closed

  * Playback Device 10 (HDMI 4):
    - Subdevice 0 (hw:HDMI,10,0):
      closed

Card 1 (PCH):
  * Playback Device 0 (CS4208 Analog):
    - Subdevice 0 (hw:PCH,0,0):
      used by: ArdourGUI (PID 177021)
      access: MMAP_INTERLEAVED
      format: S32_LE
      subformat: STD
      channels: 4
      rate: 44100 (44100/1)
      period_size: 1024
      buffer_size: 2048

  * Playback Device 1 (CS4208 Digital):
    - Subdevice 0 (hw:PCH,1,0):
      closed

  * Recording Device 0 (CS4208 Analog):
    - Subdevice 0 (hw:PCH,0,0):
      used by: ArdourGUI (PID 177021)
      access: MMAP_INTERLEAVED
      format: S32_LE
      subformat: STD
      channels: 2
      rate: 44100 (44100/1)
      period_size: 1024
      buffer_size: 2048

========================================
Part II: jack processes
  33080 ?        SLs    0:14 /usr/bin/jackdbus auto
 175702 ?        Sl     0:05 qjackctl
========================================
Part III: jack-dbus config
--- status
stopped

Pulseaudio backend:

========================================
Part I: ALSA
Advanced Linux Sound Architecture Driver Version k5.8.0-48-generic.
 
Card 0 (HDMI):
  * Playback Device 3 (HDMI 0):
    - Subdevice 0 (hw:HDMI,3,0):
      closed
 
  * Playback Device 7 (HDMI 1):
    - Subdevice 0 (hw:HDMI,7,0):
      closed
 
  * Playback Device 8 (HDMI 2):
    - Subdevice 0 (hw:HDMI,8,0):
      closed
 
  * Playback Device 9 (HDMI 3):
    - Subdevice 0 (hw:HDMI,9,0):
      closed
 
  * Playback Device 10 (HDMI 4):
    - Subdevice 0 (hw:HDMI,10,0):
      closed
 
Card 1 (PCH):
  * Playback Device 0 (CS4208 Analog):
    - Subdevice 0 (hw:PCH,0,0):
      used by: pulseaudio (PID 179720)
      access: MMAP_INTERLEAVED
      format: S16_LE
      subformat: STD
      channels: 2
      rate: 44100 (44100/1)
      period_size: 44100
      buffer_size: 88200
 
  * Playback Device 1 (CS4208 Digital):
    - Subdevice 0 (hw:PCH,1,0):
      closed
 
  * Recording Device 0 (CS4208 Analog):
    - Subdevice 0 (hw:PCH,0,0):
      closed
 
========================================
Part II: jack processes
  33080 ?        SLs    0:14 /usr/bin/jackdbus auto
========================================
Part III: jack-dbus config
--- status
stopped

You’ll note that the differences are 2 vs 4 channels and S16_LE vs S32_LE.

So next rgareus had me try: ZITA_ALSA_PCMI_DEBUG=768 Ardour6 which actually worked and played audio (again I had to connect master bus → output 1+2). ZITA_ALSA_PCMI_DEBUG=256 Ardour6 did not work and ZITA_ALSA_PCMI_DEBUG=512 did work. By work I mean I was able to launch the Alsa backend in Ardour and play audio I could hear.

To break down what that means rgareus explains: FORCE_16B = 256, FORCE_2CH = 512. (And 768 is 256 | 512).

From my understanding this means that forcing two channels was the thing that led to the success because just 256 failed. I believe rgareus concluded this as well because next he had me run jackd with --channels 2. I instead used QjackCtl and set output channels to 2 (I left input channels at (default)). I did have to set my sound card for input and output to PCH (the non HDMI one), because I am just trying to play out of my laptop speakers. And yes, Jack worked with this setting.

So next up is either grabbing more debug info out of Ardour6 by manually rebuilding it:

if you want to get to the bottom of it add | 15  for extra debug info https://github.com/Ardour/ardour/blob/master/libs/backends/alsa/zita-alsa-pcmi.h#L55-L64                                                  

or looking into more details at More Notes on HD-Audio Driver — The Linux Kernel documentation

Personally I’m probably going to file a bug to Alsa about this, but on another night.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.