ALSA: cannot set period size to 1024 frames for capture with sofhdadsp [sof-hda-dsp] Instead buffer sizes of 1008, 240, 120 work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
jackd-defaults (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This was first reported in Bug #1872244 by John Smith on 2020-04-11
That bug report was converted into a question: question #692397: I reported this on that thread however have heard no response.
However, I consider it to be a bug as it is not possible to configure the standard power of 2 buffer sizes.
Instead buffer sizes of 1008, 240, 120 work.
The man page states that they should be powers of 2, and most jack audio software fails to work properly.
My card is a
card 1: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
Subdevices: 0/1
Subdevice #0: subdevice #0
uname -a
Linux rtx 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
All software has been updated to the latest versions.
apt-cache policy jackd
jackd:
Installed: 5+nmu1
Candidate: 5+nmu1
Version table:
*** 5+nmu1 500
500 http://
500 http://
100 /var/lib/
With the default configuration
jackd -R -d alsa -d hw:1,0
...
ALSA: cannot set period size to 1024 frames for capture
ALSA: cannot configure capture channel
As reported jackd starts with a buffer size of 1008, a non standard, non power of 2
jackd -R -d alsa -d hw:1,0 -p 1008
creating alsa driver ... hw:1,0|
configuring for 48000Hz, period = 1008 frames (21.0 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 24bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 24bit little-endian
ALSA: use 2 periods for playback
I consider this a bug as the manual page for jackd states
-p, --period int
Specify the number of frames between JACK process() calls. This value must be a power of 2, and the default is 1024.
And the current situation is that the only way jackd starts is with a non power of 2.
Also buffer sizes of 240, 120 works
jackd -R -d alsa -d hw:1,0 -p 240
creating alsa driver ... hw:1,0|
configuring for 48000Hz, period = 240 frames (5.0 ms), buffer = 2 periods
jackd -R -d alsa -d hw:1,0 -p 120
creating alsa driver ... hw:1,0|
configuring for 48000Hz, period = 120 frames (2.5 ms), buffer = 2 periods
FYI a buffer size of 48 also works however I get another message (maybe because I am not running with a low latency kernel ... yet)
Please see attachment for details.
Status changed to 'Confirmed' because the bug affects multiple users.