Configure Xonar Essence STX II sound card

Glad you found a solution. That’s the correct way to override such things. You can also name it something like pcm.asusXonar { … or something descriptive instead of pcm.device {

The auto-selection of input device had a bug in PsychPortAudio, as i discovered now (https://github.com/kleinerm/Psychtoolbox-3/commit/44908bcdacc541bdbf7c53aa55b31d31d4df91ed). It worked by accident, because the only sound cards i had for testing for the last six years were two cheap USB soundcards and the built in HDA audio chips of a couple of laptops and computers. I haven’t touched a dedicated not-dirt-cheap sound card in quite a while. These HDA chips do playback and capture on the same device, so this bug didn’t happen here.

Apart from that, the selection of default device by Portaudio is not especially clever. It just gets the list of available devices from ALSA and chooses the first one with at least one output or input channel for playback/capture. On top of that, PsychPortAudio’s default device selection filters out devices (by name-matching) which look like they are either related to Pulseaudio (because of the hang problem) or audio over DisplayPort or HDMI, as most people probably don’t want to output sound via their graphics cards/monitors by default if there is also a dedicated sound card or a builtin standard sound chip. There’s still room for improvement here.

It is a bit puzzling how ALSA exposes the capture devices for your card by default. Maybe the output of the “alsa-info” command would be useful. Also the output from PsychPortAudio(‘GetDevices’)