The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Issue with sound card that have multiple device
#1
Hi,

I have install moode-r760 on a RPi3 and use it with the Asus Xonar U7 MKII. It have analog and spdif out which I want to use the spdif to output the sound to a Sony PHA3. On aplay -l the card appear like this

Quote:card 2: MKII [Xonar U7 MKII], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: MKII [Xonar U7 MKII], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: MKII [Xonar U7 MKII], device 2: USB Audio [USB Audio #2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
The SPDIF port is on device 1. I tried to change the output in web GUI but they do not have the option to choose the device, only allow to change the card. I tried to looking for a solution and come up with some post mentioned that changing /etc/alsa/conf.d/_audioout.conf will allow to change the output device so I manually changed it to


Quote:pcm._audioout {
type copy
slave.pcm "plughw:2,1"
}
and


Quote:pcm._audioout {
type copy
slave.pcm "hw:2,1"
}
but MPD and spotify still output on the old device.
After a while i figured that by changing /www/inc/playerlib.php in the below place

Quote:sysCmd("sed -i '/slave.pcm/c\slave.pcm \"" . $output_mode . ':' . $cardnum . ",0\"' " . ALSA_PLUGIN_PATH . '/_audioout.conf');
sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm \"" . $output_mode . ':' . $cardnum . ",0\" }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
and swap ",0\" to ",1\" and then using the web GUI to change the sound card I can output the sound to the spdif port. and when I took a look at the _audioout.conf file it changed to the same value that I manually inputted before
Quote:pcm._audioout {
type copy
slave.pcm "plughw:2,1"
}

So my question is what happened? Why manually changed the /etc/alsa/conf.d/_audioout.conf did not changed the output of the sound card? And if possible please add the ability to choose the device to your wonderful program in some future release.
Thank.
Reply


Messages In This Thread
Issue with sound card that have multiple device - by beanxinh - 12-11-2021, 04:30 PM

Forum Jump: