Screen goes blank after changing sound card

#1

I have built a Zynthian (v2 kit) using Hifiberry Dac+, PiScreen 3.5 v2 display. Software was updated today.

I’ve tried connecting a USB audio class compliant device. The device enumerates correctly on the Zynth, and is recognized by ALSA.

When I changed the sound card through the Zynthian web config, the Zynthian rebooted, the initial Zynthian screen showed momentarily, and then the screen went blank ie no UI.

I was still able to access the Zynthian via ssh, and also using the web config.

Any ideas to correct this? Thanks!

#2

Pls stop the Zynthian service and start the script manually so that we see the messages when it boots up

#3

Thank you. What is the preferred way to provide a console dump?

For a quick trial, I have performed a manual stop / restart from a ssh session, I believe that jackd is failing to start with the usb audio card selected.

I also failed to mention in my original post that the screen restores if I set the audio device back to the Hifiberry Dac+ via the web conf.

Am I right in thinking that Zynthian is specifically set up to support multiple sound devices, even if they are not to be used simultaneously?

#4

It’s probably this permissions issue with cards that are not card0

1 Like
#5

Well now!

As I have a Hifiberry installed, I thought I would try adding a section to system-local.conf, rather than change the existing entry. (Although I have absolutely no idea about the workings of dbus).

Now, the Zynthian boots to the gui as normal, and when I check what jack is doing (ps ax | grep jack), I now see this:

root@zynthian:~# ps ax | grep jack
444 ? SLsl 1:51 /usr/bin/jackd -P 70 -t 2000 -s -d alsa -d hw:1 -r 44100 -p 256 -n 2 -X raw
697 pts/0 SLsl+ 0:59 /usr/local/bin/fluidsynth -p fluidsynth -a jack -m jack -g 1 -j -o synth.midi-bank-select mma -o synth.cpu-cores 3 -o synth.polyphony 64
6123 pts/1 S+ 0:00 grep jack

Previously, jack would fail when hw:1 was the specified audio device.

I am now able to select either device and Zynthian starts as expected.

Thank you for this helpful suggestion!

3 Likes
#6

No. Currently Zynthian is not designed nor tested to be used with several audio devices connected simultaneously. In fact, you should find problems when trying to do it :wink:

Anyway, your use case (HifiBerry DAc+ / USB compliat audio device) should work. The problem probably is that the system is not configuring the device as the first one.

Regards,

#7

Thanks. I meant to say not set up for multiple sound devices!

In any event, the dbus hack seems to have resolved my issue, but I will need to test this with audio.

#8

Zynthian depends on using the specified audio interface. It is (currently) not configured for hot-plugging, i.e. replugging USB devices may change the device names. It may be possible to improve this by using ALSA aliases because each device will have a name that should differ from others (unless using the same kind of device, e.g. plugging in two UCA222 devices). The right way to deal with this is to use udev rules to map each device to a known name. It is possible to define unique names based on the device type and where it is plugged, e.g. UCA222 device plugged into USB hub 1, port 1 could be UCA222_1_1 whilst UCA222 device plugged into USB hub 1, port 2 could be UCA222_1_2. This allows for consistent behaviour. Of course you do need to ensure you plug your identical devices to the right ports!

At the moment Zynthian only really supports stereo output and mono (I think) input. Enhancements to that my be considered in the future after some work around the audio path are considered and implemented. :slight_smile:

#9

Input can be stereo too :wink:

#10

But I thought I saw that autoconnect only connects first channel of input. I was going to raise a change request around it.