On Tue, 2016-10-25 at 18:02 -0400, Allan Wind wrote: > Hi Tanu, > > Thanks for looking into this for me. > > On 2016-10-25 17:15:57, Tanu Kaskinen wrote: > > If there are profiles with more channels, they will anyway be surround > > oriented, but that's still better than having just a 2-channel sink > > available. If such profiles aren't available, you'll have to write the > > profile configuration yourself. > > Here are the existing profiles which did not look interesting: Yeah, only stereo profiles available. > input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 60, available: yes) > input:iec958-stereo: Digital Stereo (IEC958) Input (sinks: 0, sources: 1, priority: 55, available: yes) > output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6000, available: yes) > output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6060, available: yes) > output:analog-stereo+input:iec958-stereo: Analog Stereo Output + Digital Stereo (IEC958) Input (sinks: 1, sources: 1, priority: 6055, available: yes) > output:iec958-stereo: Digital Stereo (IEC958) Output (sinks: 1, sources: 0, priority: 5500, available: yes) > output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5560, available: yes) > output:iec958-stereo+input:iec958-stereo: Digital Stereo Duplex (IEC958) (sinks: 1, sources: 1, priority: 5555, available: yes) > off: Off (sinks: 0, sources: 0, priority: 0, available: yes) > > I had already looked through the user documentation and was not > able to find > <https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles/> > which appears to the relevant information. Should there be > something in the faq? Well, this isn't really a frequently asked question, so I wouldn't use the word "should", but someone certainly could write something to the FAQ. If you want an account for the wiki, send me private email. > Anyways, I wrote the attached udev rule for my device, then > /usr/share/pulseaudio/alsa-mixer/profile-sets/rme-babyface-pro.conf: > > [General] > auto-profiles = no > > [Mapping headphone] > device-strings = hw:%f > channel-map = left,right > paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono > paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headset-mic > priority = 2 > > [Mapping speaker] > device-strings = hw:%f > channel-map = left,right > paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono > paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headset-mic > priority = 1 > > The device strings you get from `aplay -L`, right? Right. > I know there > is no (alsa) mixer support for the device, so should I leave > path-input blank or leave it out? If the mapping is only meant for output, mark it as such with "direction = output", and leave paths-input out. If there's no mixer support at all, leave also paths-output out, because paths are only used to configure the mixer settings. > How do I know what > paths-output should be? You should know how the card mixer settings should be set (in this case they apparently don't need to be set at all), and then you can either use the pre-existing path configuration files, or write your own. Now, some additional comments about your mapping configuration: Since you want headphones to use channels 3 and 4, your current mapping configuration won't work, because you configure the device with just two channels, and those will be channels 1 and 2. You have to provide a channel map that has at least 4 channels (the first two can be aux1 and aux2, in which case applications won't use them). If the card doesn't support a 4-channel mode, you have to use more channels. Evidently using the card in 12-channel mode works. Use additional aux channels as necessary. > There is a reference in the "pulseaudio > paths" to /usr/share/lib/pulseaudio/alsa-mixer/paths which I > don't have on my system. Oops, the wiki has an incorrect path. Fixed now. You should have the directory, just drop "lib" from the path. > There is also no > /proc/asound/card1/codec* files. > > The configuration (in pavucontrol) remains unchanged even after I > `devadm control --reload-rules`, replug the device, and > restart pulseaudio. > > In the debugging section it says `udevadm info -qall -p > /sys/class/sound/card1` should tell me which profile is being > used. What am I looking for specifically? I think the output should have PULSE_PROFILE_SET visible, if your udev configuration was loaded and the card matched. If udev is problematic, you can at first test the profile configuration with pactl load-module module-alsa-card name=test device_id=X profile_set=rme-babyface-pro.conf Replace X with the alsa card index. Before doing this, however, set the profile of the automatically loaded instance of the card to "off" to avoid the two instances from trying to access the card simultaneously. > P: /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/sound/card1 > E: > DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/sound/card1 > E: ID_BUS=usb > E: ID_FOR_SEAT=sound-pci-0000_00_14_0-usb-0_6_1_0 > E: ID_ID=usb-RME_Babyface_Pro__70793162__926E13156329DC8-00 > E: ID_MODEL=Babyface_Pro__70793162_ > E: ID_MODEL_ENC=Babyface\x20Pro\x20\x2870793162\x29 > E: ID_MODEL_ID=3fb0 > E: ID_PATH=pci-0000:00:14.0-usb-0:6:1.0 > E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_6_1_0 > E: ID_REVISION=0001 > E: ID_SERIAL=RME_Babyface_Pro__70793162__926E13156329DC8 > E: ID_SERIAL_SHORT=926E13156329DC8 > E: ID_TYPE=audio > E: ID_USB_CLASS_FROM_DATABASE=Miscellaneous Device > E: ID_USB_DRIVER=snd-usb-audio > E: ID_USB_INTERFACES=:010120:010220:010300: > E: ID_USB_INTERFACE_NUM=00 > E: ID_USB_PROTOCOL_FROM_DATABASE=Interface Association > E: ID_VENDOR=RME > E: ID_VENDOR_ENC=RME > E: ID_VENDOR_ID=2a39 > E: SOUND_INITIALIZED=1 > E: SUBSYSTEM=sound > E: SYSTEMD_WANTS=sound.target > E: TAGS=:systemd:seat: > E: USEC_INITIALIZED=1139682166673 > > Is it not problematic that a customization has to live in > /usr/share (opposed to /etc)? I don't get the whole /lib > containing config files either but that is a different tree. I guess the reason for this is that this stuff wasn't originally really intended to be edited by end-users. But in practice users sometimes have to do customizations, and I agree that it should be possible to do that in /etc or the home directory. Another thing is that working with udev is often difficult, so it would be better to not use udev configuration for choosing the profile set. > > Once you have a 4-channel sink available, you'll need to use module- > > remap-sink to create virtual stereo sinks on top of the 4-channel sink. > > There's an example for doing that in the module-remap-sink > > documentation: > > > > https://wiki.freedesktop.org/www/Software/PulseAudio/Documentation/User/Modules/#index12h3 > > With that suggestion, I think that I just need to use > surround40:%f instead of hw:%f Yes, except that your card probably doesn't support surround40, because otherwise there would have been surround profiles available in the first place. -- Tanu