3

Good day everybody,
Today I was able to connect my WiiU to my computer using a PCI TV Tuner with a RCA input, only yellow. Thanks to VLC and video4linux I can play games flawlessly. I bought a cable adapter to connect the red and white wires, from the RCA, to the microphone input. Then I run this command in order to hear audio:

pactl load-module module-loopback latency_msec=1

And run VLC:

vlc -vvv v4l2:// --v4l2-dev=/dev/video1 --v4l2-input=1 --v4l2-chroma=YUY2 --v4l2-width=720 --v4l2-height=576 --v4l2-aspect-ratio=16\:9 --v4l2-fps=25 --live-caching=1 --aspect-ratio 16\:9

Once I finish playing, I run this to disable Microphone listening:

pactl unload-module module-loopback

Now my problem is: I have a Logitech webcam with microphone connected via USB, and this is my default microphone, and I have to go to System Preferences > Sound > Input and change the sound input device to Rear Microphone. My microphones Can I do this by commands? Yes, I need to run this command to switch to Rear Microphone:

pacmd set-default-source alsa_input.pci-0000_00_1b.0.analog-stereo

And this one to switch back to webcam microphone:

pacmd set-default-source alsa_input.usb-046d_0823_0C629EC0-00-U0x46d0x823.iec958-stereo

I can see in input sources that the mic is switched, but the sound doesn't change, I keep listening the same sound source... if I do it by clicking on debian's preferences, it switches correctly. Am I missing something with those commands? And what will I need in order to switch the Rear Microphone to mono? (Commands or a forever configuration) I have followed these instructions https://wiki.archlinux.org/index.php/PulseAudio/Examples#Remap_stereo_to_mono but I ended with no sound.

Any help will be greatly appreciated.

2 Answers 2

4

The OP post mentions changing the input to mono, but the other solution changes the output to mono.

To change the input to mono (this was necessary when I connected my mic to the Lexicon Alpha xlr input because by default the mic is recorded as stereo right only), you have to instead remap the source and not the sink:

List available sources:

pacmd list-sources | grep name:
        name: <alsa_output.pci-0000_08_00.1.hdmi-stereo-extra2.monitor>
        name: <alsa_output.pci-0000_0a_00.3.iec958-stereo.monitor>
        name: <alsa_output.usb-Lexicon_Lexicon_Alpha-00.analog-stereo.monitor>
        name: <alsa_input.usb-Lexicon_Lexicon_Alpha-00.iec958-stereo>

In my case, the mic input source was alsa_input.usb-Lexicon_Lexicon_Alpha-00.iec958-stereo. So, we can create a new source, now with mono input. I named it alpha_mono but you can change that:

pacmd load-module module-remap-source source_name=alpha_mono master=alsa_input.usb-Lexicon_Lexicon_Alpha-00.iec958-stereo channels=2 channel_map=mono,mono

If desired, set new source as default (useful but not necessary):

pacmd set-default-source alpha_mono
1
  • If you don't have pacmd, try pactl. You can also use the verbose pactl list sources or the compact pactl list short sources. Sep 27, 2023 at 10:10
1

Finally got everything by myself. Seems it's a bug, because there shouldn't be no application using the audio (neither playing to headphones nor recording from the mic) and I can run this command:

pacmd list-sources | grep alsa_input

Output:

name: alsa_input.pci-0000_00_1b.0.analog-stereo
name: alsa_input.usb-046d_0823_0C629EC0-00-U0x46d0x823.iec958-stereo
name: alsa_input.pci-0000_08_00.0.analog-stereo

And running the following command changes the input source if no application is using the sound currently:

pacmd set-default-source alsa_input.pci-0000_00_1b.0.analog-stereo

To revert back to the webcam's microphone:

pacmd set-default-source alsa_input.usb-046d_0823_0C629EC0-00-U0x46d0x823.iec958-stereo


Finally, the output as mono, same as above: Nothing using the audio sources and I run this command first:

pacmd list-sinks | grep name:

Output:

name: alsa_output.pci-0000_01_00.1.hdmi-stereo
name: alsa_output.pci-0000_00_1b.0.analog-stereo

And I run the command, choosing the analog-stereo:

pacmd load-module module-remap-sink sink_name=mono master=alsa_output.pci-0000_00_1b.0.analog-stereo channels=2 channel_map=mono,mono

To revert:

pacmd unload-module module-remap-sink


Just wondering if using a 4.5 kernel from Jessie/Backports affects the audio output.

2
  • sudo pacmd list-sinks | grep name returns me: " No PulseAudio daemon running, or not running as session daemon."
    – DiaJos
    Dec 16, 2019 at 2:04
  • @Webwoman I don't know why, but running this command without sudo works. Mar 16, 2021 at 11:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .