0
votes

I have a working Raspberry Pi 3B. The OS is Raspbian Stretch.

Default on-board Broadcom audio disabled.

USB SoundBlasterG1 audio card plugged in and configured as hw:0

nano /etc/asound.conf

pcm.!default { type plug slave { pcm "hw:0" } }

ctl.!default { type hw card 0 }

I am able to play wav sound file using aplay like this

> aplay hello.wav

Playing WAVE 'hello.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono

I am able to record wav sound file using arecord like this

> arecord foo.wav

Recording WAVE 'foo.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono

I am able to run Jack server like this

> jackd -d alsa

loading driver ..
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback

However Jack doesn't seem to capture any signal from the microphone:

if I run

> jackd -v -d alsa

I get the following additional output

new buffer size 1024
resizing port buffer segment for type 0, one buffer = 4096 bytes
resizing port buffer segment for type 1, one buffer = 2048 bytes
registered port system:capture_1, offset = 4096
registered port system:capture_2, offset = 8192
registered port system:playback_1, offset = 0
registered port system:playback_2, offset = 0
++ jack_sort_graph
++ jack_rechain_graph():
-- jack_rechain_graph()
-- jack_sort_graph
1160 waiting for signals
load = 0.0452 max usecs: 21.000, spare = 23198.000
load = 0.0678 max usecs: 21.000, spare = 23198.000
load = 0.0791 max usecs: 21.000, spare = 23198.000
(..etc)

What do I need to setup Jack to capture data from my USB audiocard microphone using ALSA driver on Raspberry PI.

1

1 Answers

0
votes

With Jack, capture and playback ports are not connected automatically.

One can connect ports either via UI app qjackctl or via cli using jack_connect.

Qjackctl package is usually listed as dependency for jackd, jack_connect script is bundled with jackd.