I have managed to fix the issue with the Creative USB FXi Sound Blaster. But still no lock with HDMI or the PCIe devices.
To be honest I don’t know what I did that it suddenly started to function, so I can not give an informed way to fix the issue, as I was playing with different options, pulseaudio config files .config/pulse and settings, loading modules etc. However, my final bet is, a whole system reboot (and not just Matlab) with those settings may have fixed the issue.
here is the screenshot of how it looks now:
The 5.1 setting on the sound setting on the computer works fine with no issue for the USB FX Sound card:
The output of PsychPortAudio ‘GetDevices’ command:
0 8 'ALSA' 'HDA Intel PCH: ALC897 Analog (hw:0,0)' 2 2 0.00870748299319728 0.0348299319727891 0.00870748299319728 0.0348299319727891 44100
1 8 'ALSA' 'HDA Intel PCH: ALC897 Digital (hw:0,1)' 0 2 -1 -1 0.00870748299319728 0.0348299319727891 44100
2 8 'ALSA' 'HDA Intel PCH: ALC897 Alt Analog (hw:0,2)' 2 0 0.00870748299319728 0.0348299319727891 -1 -1 44100
3 8 'ALSA' 'SB X-Fi Surround 5.1 Pro: USB Audio (hw:1,0)' 2 6 0.00800000000000000 0.0320000000000000 0.00800000000000000 0.0320000000000000 48000
4 8 'ALSA' 'SB X-Fi Surround 5.1 Pro: USB Audio #1 (hw:1,1)' 0 2 -1 -1 0.00870748299319728 0.0348299319727891 44100
5 8 'ALSA' 'HDA ATI HDMI: 0 (hw:2,3)' 0 8 -1 -1 0.00870748299319728 0.0348299319727891 44100
6 8 'ALSA' 'HDA ATI HDMI: 1 (hw:2,7)' 0 8 -1 -1 0.00870748299319728 0.0348299319727891 44100
7 8 'ALSA' 'HDA ATI HDMI: 2 (hw:2,8)' 0 8 -1 -1 0.00870748299319728 0.0348299319727891 44100
8 8 'ALSA' 'HDA ATI HDMI: 3 (hw:2,9)' 0 8 -1 -1 0.00870748299319728 0.0348299319727891 44100
9 8 'ALSA' 'HDA ATI HDMI: 4 (hw:2,10)' 0 8 -1 -1 0.00870748299319728 0.0348299319727891 44100
10 8 'ALSA' 'HDA Creative: ALC898 Analog (hw:3,0)' 2 6 0.00870748299319728 0.0348299319727891 0.00870748299319728 0.0348299319727891 44100
11 8 'ALSA' 'HDA Creative: ALC898 Alt Analog (hw:3,2)' 2 0 0.00870748299319728 0.0348299319727891 -1 -1 44100
12 8 'ALSA' 'sysdefault' 128 128 0.0213333333333333 0.0213333333333333 0.0213333333333333 0.0213333333333333 48000
13 8 'ALSA' 'front' 0 2 -1 -1 0.00870748299319728 0.0348299319727891 44100
14 8 'ALSA' 'surround40' 0 2 -1 -1 0.00870748299319728 0.0348299319727891 44100
15 8 'ALSA' 'surround51' 0 2 -1 -1 0.00870748299319728 0.0348299319727891 44100
16 8 'ALSA' 'surround71' 0 2 -1 -1 0.00870748299319728 0.0348299319727891 44100
17 8 'ALSA' 'iec958' 0 2 -1 -1 0.00870748299319728 0.0348299319727891 44100
18 8 'ALSA' 'spdif' 0 2 -1 -1 0.00870748299319728 0.0348299319727891 44100
19 8 'ALSA' 'samplerate' 128 128 0.00775510204081633 0.0232199546485261 0.00775510204081633 0.0232199546485261 44100
20 8 'ALSA' 'speexrate' 128 128 0.00775510204081633 0.0232199546485261 0.00775510204081633 0.0232199546485261 44100
21 8 'ALSA' 'pulse' 32 32 0.00870748299319728 0.0348299319727891 0.00870748299319728 0.0348299319727891 44100
22 8 'ALSA' 'upmix' 8 8 0.00870748299319728 0.0348299319727891 0.00870748299319728 0.0348299319727891 44100
23 8 'ALSA' 'vdownmix' 6 6 0.00870748299319728 0.0348299319727891 0.00870748299319728 0.0348299319727891 44100
24 8 'ALSA' 'dmix' 0 2 -1 -1 0.0213333333333333 0.0213333333333333 48000
25 8 'ALSA' 'default' 32 32 0.00870748299319728 0.0348299319727891 0.00870748299319728 0.0348299319727891 44100
while matlab is running (from bash), on the terminal I get the following messages:
Gtk-Message: 14:42:51.486: Failed to load module "canberra-gtk-module"
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
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
Cannot connect to server socket err = No such file or directory
The output of PsychPortAudio(‘Open’) when openning the PCIe device (5.1 settings)
ahandle = PsychPortAudio('Open',10,[],[],48000,6);
PTB-INFO: Trying to suspend potentially running PulseAudio server... ... status 0
PTB-DEBUG: PortAudio library lacks PaUtil_SetDebugPrintFunction(). Low-Level PortAudio debugging output unavailable.
PTB-INFO: Using PortAudio V19.7.0-devel, revision 147dd722548358763a8b649b3e4b41dfffbcfbb6
PTB-ERROR: Desired audio parameters for device 10 unsupported by audio device: Illegal combination of I/O devices
PTB-ERROR: This could be, e.g., due to an unsupported combination of audio sample rate, audio channel count/allocation, or audio sample format.
PTB-ERROR: On Linux you may be able to use ALSA audio converter plugins to make this work.
Error in function Open: Usage error
Failed to open PortAudio audio device due to unsupported combination of audio parameters.
Error using PsychPortAudio
Usage:
pahandle = PsychPortAudio('Open' [, deviceid][, mode][, reqlatencyclass][, freq][, channels][, buffersize][,
suggestedLatency][, selectchannels][, specialFlags=0]);
The funny thing is this command works fine with the PCIe device, playing the sound on every individual speaker (all 6 channels) correctly:
myself@EEG-Lab:~$ speaker-test --buffer 100000 -D surround51:2,0 -c 6 -t wav
The Alsamixer with PCIe acrd chosen looks like this:
I used to have the HDMI and the PCIe both present in pavucontrol, however, since the FXi is working, they have disappeared:
It will work fine for the purpose of my experiment with this system now , as my experiment doesn’t reply on the exact onset of the stimulus (I have a hardware bit sent to the EEG trigger when sound is present, a bit of electronics involved there), and technically I would like to have some randomness in the start of the stimulus (though just relying on the soundcard delays, it is not detectable by a human). But I am curious how to fix the issue with the PCIe card for future references (?!).