[Jack-Devel] jack_get_sample_rate

Adrian Knoth adi at drcomp.erfurt.thur.de
Tue Dec 13 19:02:20 CET 2016


On Tue, Dec 13, 2016 at 10:43:31AM +0100, Kjetil Matheussen wrote:

> It just says that it configures for 22050Hz, it doesn't say whether it
> succeeded.

Probably not:

> > control open "hw:PCH,0" (No such file or directory)

It's an Intel PCH (HDA) controller. I haven't looked at the specs, but
chances are the chip cannot do 22kHz.

$ cat /proc/asound/cards 
 0 [HDSPMxf1cd85   ]: HDSPM - RME RayDAT_f1cd85
                      RME RayDAT S/N 0xf1cd85 at 0xef300000, irq 26
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xef440000 irq 85
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xef080000 irq 36

Get the number (here: 1) and then

$ cat /proc/sound/card1/codec#0

[..]
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM


or even more direct:

$ grep rates /proc/asound/card1/codec#0
    rates [0x560]: 44100 48000 96000 192000
    rates [0x560]: 44100 48000 96000 192000
    rates [0x560]: 44100 48000 96000 192000
    rates [0x560]: 44100 48000 96000 192000
    rates [0x160]: 44100 48000 96000
    rates [0x160]: 44100 48000 96000
    rates [0x160]: 44100 48000 96000
    rates [0x560]: 44100 48000 96000 192000

See! No 22kHz for that chip, at least not for mine. If the card doesn't
support it, jackd cannot configure it.

Arguably, it shouldn't be able to start, but maybe that's fixed in newer
jackd versions. (I haven't looked in years)

And as others said: jack_get_sample_rate() is authoritative[0].


Cheers

[0] Some RME cards or anything with external clock sync can make the
card run at different rates than indicated by the driver, but that's
advanced territory and clearly not the case for Intel HDA PCH.

-- 
mail: adi at thur.de  	http://adi.thur.de	PGP/GPG: key via keyserver




More information about the Jackaudio mailing list