MAC: No alsa driver for Jack
Posted: Thu Mar 24, 2022 8:22 pm
I am trying to run openMHA on my M1 Macbook Pro. I try to run a simple sine generator..
(my3.9) macbook2020@DansMacBook-Pro-2022 Poz_tools % python3.9 new_gen_sin.py
Enter host name for sine generator: localhost
select L, R or Both headset from hearingpi to the desired Mic (L R B): B
Traceback (most recent call last):
File "/Users/macbook2020/projects/Hearing-Aid-Prototype/Experiment/Poz/Poz_tools/new_gen_sin.py", line 106, in <module>
mha_PI.set_val('cmd','prepare')
File "/Users/macbook2020/projects/Hearing-Aid-Prototype/Experiment/openMHA-4.17.0-master/mha/tools/python/openMHA/MHAConnection.py", line 237, in set_val
return self.set_val_raw(path, value).decode()
File "/Users/macbook2020/projects/Hearing-Aid-Prototype/Experiment/openMHA-4.17.0-master/mha/tools/python/openMHA/MHAConnection.py", line 202, in set_val_raw
return self._send_command(cmd)
File "/Users/macbook2020/projects/Hearing-Aid-Prototype/Experiment/openMHA-4.17.0-master/mha/tools/python/openMHA/MHAConnection.py", line 123, in _send_command
raise ValueError(
ValueError: Error sending message b'cmd=prepare\n' with error code 1:
Response: b"\n(mhafw_lib) IO error: (mhajack) Unable to connect to JACK server 'default' as client 'MHA'.\n(MHA:failure)"
(my3.9) macbook2020@DansMacBook-Pro-2022 Poz_tools %
I attempted to start Jack and I get a complaint about no alsa driver. I also don't know what to specify for sound card.
+ SOUNDSTREAM=0
+ SOUNDCHANNELS=1,2
+ SAMPLERATE=48000
+ FRAGSIZE=48
+ NPERIODS=2
+ MHACONFIG=/home/pi/hearingaid-prototype/openMHA.cfg
+ MHAIP=0.0.0.0
+ MHAPORT=33337
+ echo 'killall mha'
killall mha
+ killall mha -9
+ echo 'killall jackd'
killall jackd
+ killall jackd -9
+ sleep 1
+ echo 'start jackd'
start jackd
+ jackd --realtime -d alsa -d hw:,0 -p 48 -r 48000 -n 2 -s
+ sleep 2
+ sed 's/^/[JACKD] /'
[JACKD] Unknown driver "alsa"
[JACKD] jackdmp 1.9.16
[JACKD] Copyright 2001-2005 Paul Davis and others.
[JACKD] Copyright 2004-2016 Grame.
[JACKD] Copyright 2016-2020 Filipe Coelho.
[JACKD] jackdmp comes with ABSOLUTELY NO WARRANTY
[JACKD] This is free software, and you are welcome to redistribute it
[JACKD] under certain conditions; see the file COPYING for details
+ jack_connect MHA:out_1 system:playback_2
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
jack server not running?
+ jack_connect MHA:out_2 system:playback_1
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
jack server not running?
+ echo 'start network command server'
start network command server
(my3.9) macbook2020@DansMacBook-Pro-2022 Poz % ps -el|grep jack
501 13592 1406 4006 0 31 0 408637584 1696 - S+ 0 ttys005 0:00.00 grep jack
(my3.9) macbook2020@DansMacBook-Pro-2022 Poz %
Any suggestions? I haven't been able to find alsa drivers on the web. Is my M1 Apple chip an issue?
(my3.9) macbook2020@DansMacBook-Pro-2022 Poz_tools % python3.9 new_gen_sin.py
Enter host name for sine generator: localhost
select L, R or Both headset from hearingpi to the desired Mic (L R B): B
Traceback (most recent call last):
File "/Users/macbook2020/projects/Hearing-Aid-Prototype/Experiment/Poz/Poz_tools/new_gen_sin.py", line 106, in <module>
mha_PI.set_val('cmd','prepare')
File "/Users/macbook2020/projects/Hearing-Aid-Prototype/Experiment/openMHA-4.17.0-master/mha/tools/python/openMHA/MHAConnection.py", line 237, in set_val
return self.set_val_raw(path, value).decode()
File "/Users/macbook2020/projects/Hearing-Aid-Prototype/Experiment/openMHA-4.17.0-master/mha/tools/python/openMHA/MHAConnection.py", line 202, in set_val_raw
return self._send_command(cmd)
File "/Users/macbook2020/projects/Hearing-Aid-Prototype/Experiment/openMHA-4.17.0-master/mha/tools/python/openMHA/MHAConnection.py", line 123, in _send_command
raise ValueError(
ValueError: Error sending message b'cmd=prepare\n' with error code 1:
Response: b"\n(mhafw_lib) IO error: (mhajack) Unable to connect to JACK server 'default' as client 'MHA'.\n(MHA:failure)"
(my3.9) macbook2020@DansMacBook-Pro-2022 Poz_tools %
I attempted to start Jack and I get a complaint about no alsa driver. I also don't know what to specify for sound card.
+ SOUNDSTREAM=0
+ SOUNDCHANNELS=1,2
+ SAMPLERATE=48000
+ FRAGSIZE=48
+ NPERIODS=2
+ MHACONFIG=/home/pi/hearingaid-prototype/openMHA.cfg
+ MHAIP=0.0.0.0
+ MHAPORT=33337
+ echo 'killall mha'
killall mha
+ killall mha -9
+ echo 'killall jackd'
killall jackd
+ killall jackd -9
+ sleep 1
+ echo 'start jackd'
start jackd
+ jackd --realtime -d alsa -d hw:,0 -p 48 -r 48000 -n 2 -s
+ sleep 2
+ sed 's/^/[JACKD] /'
[JACKD] Unknown driver "alsa"
[JACKD] jackdmp 1.9.16
[JACKD] Copyright 2001-2005 Paul Davis and others.
[JACKD] Copyright 2004-2016 Grame.
[JACKD] Copyright 2016-2020 Filipe Coelho.
[JACKD] jackdmp comes with ABSOLUTELY NO WARRANTY
[JACKD] This is free software, and you are welcome to redistribute it
[JACKD] under certain conditions; see the file COPYING for details
+ jack_connect MHA:out_1 system:playback_2
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
jack server not running?
+ jack_connect MHA:out_2 system:playback_1
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
jack server not running?
+ echo 'start network command server'
start network command server
(my3.9) macbook2020@DansMacBook-Pro-2022 Poz % ps -el|grep jack
501 13592 1406 4006 0 31 0 408637584 1696 - S+ 0 ttys005 0:00.00 grep jack
(my3.9) macbook2020@DansMacBook-Pro-2022 Poz %
Any suggestions? I haven't been able to find alsa drivers on the web. Is my M1 Apple chip an issue?