Cannot set sample rate using Scarlet 4i4

I am trying to get Ardour to record using different sample rates, but I’m stuck with 48kHz. I understand that Ardour gets the sample rate from JACK, but right now I’m confused as to where the issue is.

  • Scarlett 4i4 officially supports up to 192kHz
  • I switched to Windows and use the Focusrite control software to set the sample rate to 192kHz
  • Restarted in Windows again to confirm that the rate has been saved, indeed it is 192kHz
  • Made a recording with Audacity in Windows, in 192kHz
  • VLC codec information of the exported file says 192kHz
  • Switched to Linux
  • Made a recording with Audacity using ALSA. Initially, all sample rates up to 96kHz are accepted. Trying to use more than that resulted in audio being recorded but no sound during playback. Later efforts were successful though all the way up to 192kHz, so let’s say it was a temporary glitch.
  • VLC codec information of the exported file displays the correct sample rate i.e. the one used during recording.
  • Started qJackCtl. In the settings, I set the sample rate to 192kHz, accepted. ALSA is used as the driver.
  • Stopped and started the JACK server using the qJackCtl stop/start buttons, to be sure that the changes take effect.
  • The qJackCtl panel still displays 48kHz. Ardour is locked to the same sample rate.
  • In Audacity, I select to use JACK from the dropdown in the project.
  • I record in 192kHz, accepted, confirmed with VLC the coded information. Not sure if this is just a file header that could be incorrectly written, but I used ffprobe as well to analyze and the files recorded using 192kHz have double the kb/s compared to files recorded using 96kHz, so the recordings do seem to have the correct sample rate.
  • In qJackCtl, I select 44.1kHz. Stop/start, qJackCtl panel still stuck in 48kHz.
  • Ardour always follows what the qJackCtl panel says, i.e. always 48kHz.

Lots of questions here:

  • I’ve read that if JACK thinks that the sound card does not support the requested sample rate, it will use the one closest to it. I look at the rates in /proc/asound/PCH/codec#0 and /proc/asound/PCH/codec#2. Most of them have various sample rates all the way up to 192kHz. While I’m unsure which of the items listed are the ones from sound card, there are a couple of them that only have 44.1kHz and 48kHz. But then, even when I switch to 44.1kHz, JACK still stays stuck to 48kHz. There is no item listed that only has 48kHz.
  • Even then, if it’s not JACK and it’s the card saying it does not support higher sample rates, would that be a driver issue? But then why is Audacity able to record in any sample rate, whether directly using ALSA or using JACK?
  • Lastly, at the beginning and using the Focusrite control software I set the sample rate to 192kHz and never changed it. I thought that this would set the sample rate in the hardware, but then I was able to record in different sample rates. Would Audacity/Ardour be downsampling it at the software level?

I’m on linux kernel 6+, from what I read the drivers for Focusrite Scarlett including 4i4 have been included in kernel since 5+.

So, I’m a bit confused. It’s not Ardour, it’s not JACK, it’s not ALSA, it’s not the drivers … thoughts?

It may set the sample rate that is running when the hardware first starts up, but the operating system driver determines whether to keep the default value or request a different sample rate. That would typically be because another software component requested a specific value, e.g. Ardour running with the ALSA backend will request the sample rate you select, jackd will use the sample rate specified on the command line arguments or in the RC file depending on how it is started.

Some USB interfaces are displayed using very generic names. Are you absolutely certain that you properly selected the Focusrite as the interface used, and did not accidentally select an internal audio interface?

This may help determine that for sure. While using the audio devices as before, run this command in a terminal window:
cd /tmp && wget https://ardour.org/files/adevices.sh && bash ./adevices.sh

That is a script created by the Ardour developers to display all of the audio devices available in your system, the current settings, and which program is using each device.
Paste the output back to this posting thread and someone may notice something which explains your problem.

Out of curiosity, is there a reason you don’t use ALSA with Ardour and potentially avoid the issue?

   Seablade
1 Like

Thank you for the responses.

The internal sound card is inactive, I believe I disabled it some time ago. Here is a screenshot. Moreover, the microphone is connected to Scarlett 4i4 from which I am successfully recording. It displays as Analog Surround 4.0 Out + Analog Surround 2.1 In with a number of other options, but if I select in the Recording Devices Analog Surround 2.1 only, for example, the Playback Devices disappear and only Recording Devices is available; even in that case qJackCtl displays 48kHz.

Out of curiosity, is there a reason you don’t use ALSA with Ardour and potentially avoid the issue?

I have used JACK in the past and I liked the routing capabilities, let me try Alsa and how it works with it, at least I’ll know if it happens with Alsa as well.

Here is the output of the adevices.sh script.

========================================
Part I: ALSA
Advanced Linux Sound Architecture Driver Version k6.4.12-200.fc38.x86_64.

Card 0 (USB):
  * Playback Device 0 (USB Audio):
    - Subdevice 0 (hw:USB,0,0):
      closed

  * Recording Device 0 (USB Audio):
    - Subdevice 0 (hw:USB,0,0):
      closed

Card 1 (PCH):
  * Playback Device 0 (ALC3246 Analog):
    - Subdevice 0 (hw:PCH,0,0):
      closed

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

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

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

  * Recording Device 0 (ALC3246 Analog):
    - Subdevice 0 (hw:PCH,0,0):
      closed

========================================
Part II: jack processes
   2718 ?        Sl     0:05 /usr/bin/qjackctl -session 1021e1ac1ae16c000169314888300000025920002_1693156555_588830

From these, I believe that the Scarlett 4i4 is Card 0 (USB) hw:USB,0,0. under /proc/asound/card0 I did not find anything mentioning sample rates. I found a mention in another thread about checking the following as indicating what rates the card say to JACK that they support. I’m not sure if these include the ones for the external sound card and which ones they are.

/proc/asound/PCH/codec#0

Codec: Realtek ALC3246
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0256
Subsystem Id: 0x10280810
Revision Id: 0x100002
No Modem Function Group found
Default PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
  Power: setting=D0, actual=D0
GPIO: io=3, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x57 0x57]
  Converter: stream=0, channel=0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ALC3246 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x04 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x05 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x06 [Audio Output] wcaps 0x611: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x07 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x97 0x97]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x24
Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="ALC3246 Analog", type="Audio", device=0
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x3f 0x3f]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x23
Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x97 0x97]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x22
Node 0x0a [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0b [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0c [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0d [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0e [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0f [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x12 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Control: name="Internal Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x03 0x03]
  Pincap 0x00000020: IN
  Pin Default 0x90a60180: [Fixed] Mic at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0x8, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x13 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000020: IN
  Pin Default 0x40000000: [N/A] Line Out at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0x0, Sequence = 0x0
  Pin-ctls: 0x00:
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x00010014: OUT EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x90170150: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x5, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x02
Node 0x15 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x16 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x17 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x18 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003724: IN Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x19 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Control: name="Headset Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003724: IN Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1a [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Control: name="Headphone Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003724: IN Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x00013734: IN OUT EAPD Detect
    Vref caps: HIZ 50 GRD 80 100
  EAPD 0x2: EAPD
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x02* 0x03
Node 0x1c [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x1d [Pin Complex] wcaps 0x400400: Mono
  Pincap 0x00000020: IN
  Pin Default 0x40700001: [N/A] Modem Hand at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0x0, Sequence = 0x1
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1e [Pin Complex] wcaps 0x400781: Stereo Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x06
Node 0x1f [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
  Processing caps: benign=0, ncoeff=91
Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x02211030: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x02 0x03*
Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 5
     0x18 0x19 0x1a 0x1b 0x1d
Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x00 0x00]
  Connection: 6
     0x18 0x19 0x1a 0x1b 0x1d 0x12
Node 0x24 [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x12* 0x13

/proc/asound/PCH/codec#2

Codec: Realtek ALC3246
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0256
Subsystem Id: 0x10280810
Revision Id: 0x100002
No Modem Function Group found
Default PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
  Power: setting=D0, actual=D0
GPIO: io=3, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x57 0x57]
  Converter: stream=0, channel=0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ALC3246 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x04 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x05 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x06 [Audio Output] wcaps 0x611: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x07 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x97 0x97]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x24
Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="ALC3246 Analog", type="Audio", device=0
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x3f 0x3f]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x23
Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
  Amp-In vals:  [0x97 0x97]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x22
Node 0x0a [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0b [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0c [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0d [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0e [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0f [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x12 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Control: name="Internal Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x03 0x03]
  Pincap 0x00000020: IN
  Pin Default 0x90a60180: [Fixed] Mic at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0x8, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x13 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00000020: IN
  Pin Default 0x40000000: [N/A] Line Out at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0x0, Sequence = 0x0
  Pin-ctls: 0x00:
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x00010014: OUT EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x90170150: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x5, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x02
Node 0x15 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x16 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x17 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x18 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003724: IN Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x19 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Control: name="Headset Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003724: IN Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1a [Pin Complex] wcaps 0x40048b: Stereo Amp-In
  Control: name="Headphone Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00003724: IN Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x00013734: IN OUT EAPD Detect
    Vref caps: HIZ 50 GRD 80 100
  EAPD 0x2: EAPD
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x02* 0x03
Node 0x1c [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x1d [Pin Complex] wcaps 0x400400: Mono
  Pincap 0x00000020: IN
  Pin Default 0x40700001: [N/A] Modem Hand at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0x0, Sequence = 0x1
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x1e [Pin Complex] wcaps 0x400781: Stereo Digital
  Pincap 0x00000014: OUT Detect
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x06
Node 0x1f [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
  Processing caps: benign=0, ncoeff=91
Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x02211030: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x02 0x03*
Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
  Connection: 5
     0x18 0x19 0x1a 0x1b 0x1d
Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x00 0x00]
  Connection: 6
     0x18 0x19 0x1a 0x1b 0x1d 0x12
Node 0x24 [Audio Selector] wcaps 0x300101: Stereo
  Connection: 2
     0x12* 0x13

You need to run the script while Ardour (or JACK) is running and uses the device.

Also note that JACK can silently fall back to the nearest supported sample-rate without warning. It is a common problem. e.g. configure JACK to use 44.1k and with most HDA-Intel soundcards JACK effectively uses 48k and only prints that in the log window.

Ardour/ALSA fails in this case and informs the user.

I had JACK running when I ran the script. Regardless, I now started Ardour and ran it again:

========================================
Part I: ALSA
Advanced Linux Sound Architecture Driver Version k6.4.12-200.fc38.x86_64.

Card 0 (USB):
  * Playback Device 0 (USB Audio):
    - Subdevice 0 (hw:USB,0,0):
      closed

  * Recording Device 0 (USB Audio):
    - Subdevice 0 (hw:USB,0,0):
      used by: pipewire (PID 1942)
      access: MMAP_INTERLEAVED
      format: S32_LE
      subformat: STD
      channels: 6
      rate: 48000 (48000/1)
      period_size: 512
      buffer_size: 32768

Card 1 (PCH):
  * Playback Device 0 (ALC3246 Analog):
    - Subdevice 0 (hw:PCH,0,0):
      closed

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

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

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

  * Recording Device 0 (ALC3246 Analog):
    - Subdevice 0 (hw:PCH,0,0):
      closed

========================================
Part II: jack processes
   6345 ?        Sl     0:02 /usr/bin/qjackctl

Also note that JACK can silently fall back to the nearest supported sample-rate without warning. It is a common problem. e.g. configure JACK to use 44.1k and with most HDA-Intel soundcards JACK effectively uses 48k and only prints that in the log window.

Understood. I did all the experiments that I listed above to find out what is not supporting what.

  • The sound card does support the sample rate with certainty.
  • The unofficial drivers are in linux kernel. Not sure if there could be an issue with those. However,
  • With Audacity on Linux using either JACK or Alsa I can record in sample rates other than 48kHz.

I now observe: used by: pipewire (PID 1942)

I do not believe I intentionally installed or configured pipewire, is it possible that it interferes somehow? should I uninstall it?

I uninstalled pipewire and that uninstalled pipewire-utils and rtkit as well. Restarted the laptop. No sound devices are now found by the operating system, at least as shown in the UI. JACK refuses to start via qJackCtl with message:

15:33:15.980 JACK is starting...
15:33:15.981 jackd -dalsa -dhw:USB -r48000 -p128
15:33:15.987 Could not start JACK. Sorry.
15:33:18.572 JACK was stopped

I installed the packages removed. Things back to normal. I reviewed JACK settings exposed via qJackCtl and I do not see any setting related to pipewire, so I’m not sure why JACK stopped working when I uninstalled pipewire.

What version of jackd is being used ?

you probably already know but,
in the terminal : jackd --version

My ubuntu fell back to using jackd 0.125 for some reason. I had to install jackd2, which is also installed jackd 1.9.2 on my system.

I could not run JACK or QjackCTL until 1.9.2 was back on the sytem.

An update, I set Ardour to use ALSA or PulseAudio in the Audio/MIDI setup window. The sample rate dropdown is disabled with 48kHz as the only option.

JACK is not running i.e. I stopped it and quit qJackCtl as well. ps -aux | grep jack returns nothing.

What version of jackd is being used ?

Aha. It seems that JACK is not even installed, I took for granted that with qJackCtl I would get JACK as the backend and didn’t even look. Searching a bit it seems that pipewire might be emulating JACK and qJackCtl might be running on pipewire.

I’ll uninstall pipewire, install jackd, and see what happens.

Is there a reason you want to use JACK?

What distro are you using? I haven’t used Pipewire yet, but from what I’ve read it may be possible you don’t have JACK installed, and it just appears you do because of Pipewire. I think Pipewire sets the sample rate, and there is a file you have to configure to change it because it loads with the operating system and overrides other settings, but I could be wrong.

Pipewire IS JACK, or at least, it is a new implementation of JACK, just like JACK2 was.

I wanted to use the routing capabilities of qJackCtl i.e. Graph UI, because in some cases I want to route external plugins that may or may not run within Ardour, for example in live performances, and send them to Ardour for recording etc.

I’m open to alternatives.

I’ll learn how to configure pipewire and test that as well. If I can work with pipewire and qJackCtl I’d be happy with that. I’m on Fedora Jam distribution, apparently there was a pipewire-jack package providing JACK emulation by pipewire but the jack-audio-connection-kit package itself was not installed.

I think it is pipewire having this locked to 48kHz.

It looks like qpwgraph is by the same author as qjactl and is supposed to work pretty much the same way.

You can replace the pipewire-jack packages with the traditional jack2 packages using the swap command of dnf. You may have to experiment a little to find the exact syntax, but I think it would be:
dnf swap pipewire-jack-audio-connection-kit jack-audio-connection-kit

As you noticed you lose all desktop system audio when you remove pipewire.
If you do not want to fully use pipewire for audio routing (it can be done, but has a considerable learning curve for production use case) then just remove the pipewire jack emulation and install the traditional jack2 server, and when you start jackd (either using qjackctl or from a terminal) the jackd server will request use of the audio device, and pipewire will gracefully hand over control.

Uninstalled pipewire, installed jackd v1.9.22, qJackCtl now accepts the sample rate that I select. Ardour, however, crashes or refuses to start with an error: Cannot use real-time scheduling (operation not permitted).

Installed again pipewire (and pipewire-utils, rtkit, and pipewire-jack-audio-connection-kit) and removed jack-audio-connection-kit, hoping to bring it back to the previous state and try qpwgraph that was suggested. Set the sample rate for pipewire using pw-metadata -n settings 0 clock.force-rate 44100. Now qJackCtl refuses to start, and Ardour as well, I broke everything, jeje.

I’ll continue on another day, at least I think I have a better understanding of how pipewire relates to jack, ardour and qJackCtl, so I hope to get somewhere.

Thanks everybody.

Your system was likely relying on rtkit or some other Fedora-y mechanism to provide access to realtime scheduling, and that’s now gone away.

Manual configuration of this is covered in the JACK FAQ:

1 Like

That was because you uninstalled rtkit, which is what configures realtime permissions for users.

Those packages are modular for a reason. See my previous post, for your use the best combination is to keep all of the default pipewire related packages, but selectively replace pipewire-jack-audio-connection kit with jack-audio-connection-kit. Audio production with jackd will then work as you expect, and normal desktop audio will work as you expect when not running jackd.

If Ardour still generates an error related to realtime permissions, keep in mind that when you re-install rtkit you may need to log out and log in again before the permissions take effect.

1 Like

I replaced pipewire-jack-audio-connection-kit with jack-audio-connection-kit as Chris suggested, and I added my user to the @jackuser group following the instructions in the link that Paul Davis posted. I was able to run JACK with 88.2kHz, for example, and successfully start an Ardour session with that sample rate and make a test recording i.e. things seem to work.

Thanks everybody!

1 Like