You are very close you need to run two commands:
- Create your null-sink.
pactl load-module module-null-sink sink_name=Redirected_Audio sink_properties=device.description=Redirected_Audio
- Redirect your new null-sink "Redirected_Audio" into your headphones.
pactl load-module module-loopback source=Redirected_Audio.monitor sink=name_of_headphones
Notice that there is .monitor
after the name of my null sink Redirected_Audio
, this is necessary. If you change the name of your sink be sure to include .monitor
in this command.
But what is the name of your headphones?
Run pactl list sinks
and find the one that is your speakers, the attribute is just called Name
it can be quite long but depends entirely on the model, for example my headphones appear as:
Sink #1
State: RUNNING
Name: alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo
Description: PCM2902 Audio Codec Analogue Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 23
Mute: no
Volume: front-left: 11796 / 18% / -44.68 dB, front-right: 11796 / 18% / -44.68 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo.monitor
Latency: 22938 usec, configured 26000 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "USB Audio"
alsa.id = "USB Audio"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "USB Audio CODEC"
alsa.long_card_name = "Burr-Brown from TI USB Audio CODEC at usb-0000:2a:00.1-5, full speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:2a:00.1-usb-0:5:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:01.2/0000:20:00.0/0000:21:08.0/0000:2a:00.1/usb1/1-5/1-5:1.0/sound/card1"
udev.id = "usb-Burr-Brown_from_TI_USB_Audio_CODEC-00"
device.bus = "usb"
device.vendor.id = "08bb"
device.vendor.name = "Texas Instruments"
device.product.id = "2902"
device.product.name = "PCM2902 Audio Codec"
device.serial = "Burr-Brown_from_TI_USB_Audio_CODEC"
device.string = "front:1"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analogue Stereo"
device.description = "PCM2902 Audio Codec Analogue Stereo"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
Ports:
analog-output: Analogue Output (priority: 9900)
Active Port: analog-output
Formats:
pcm
The name is alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo