Eu pesquisei há muito tempo, mas ainda não encontrei uma solução.
Conectei dois dispositivos de saída diferentes à minha placa de som onboard:
Na guia 'configuração', os dois perfis são listados para 'áudio interno'. O perfil para o primeiro é 'saída estéreo analógica', para a última saída 'estéreo digital (IEC958)'
Para alternar entre esses dois dispositivos, eu não altero o perfil da placa de som.
pacmd list-sinks
fornece saídas diferentes para as duas configurações:
Analógico
name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause:
priority: 9959
volume: front-left: 51910 / 79% / -6,07 dB, front-right: 51910 / 79% / -6,07 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 16,01 ms
max request: 2 KiB
max rewind: 64 KiB
monitor source: 6
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 1
linked by: 1
configured latency: 16,00 ms; range is 16,00 .. 371,52 ms
card: 1 <alsa_card.pci-0000_00_1b.0>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC892 Analog"
alsa.id = "ALC892 Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xfb620000 irq 51"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "1c20"
device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
device.form_factor = "internal"
device.string = "front:0"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Internes Audio Analog Stereo"
alsa.mixer_name = "Realtek ALC892"
alsa.components = "HDA:10ec0892,10438410,00100302"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
analog-output-lineout: Line-Ausgang (priority 9900, latency offset 0 usec, available: yes)
properties:
analog-output-headphones: Kopfhörer (priority 9000, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-headphones"
active port: <analog-output-lineout>
Digital
name: <alsa_output.pci-0000_00_1b.0.iec958-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause:
priority: 9958
volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 10,97 ms
max request: 2 KiB
max rewind: 64 KiB
monitor source: 9
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 3
linked by: 7
configured latency: 11,61 ms; range is 0,50 .. 371,52 ms
card: 1 <alsa_card.pci-0000_00_1b.0>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC892 Digital"
alsa.id = "ALC892 Digital"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "1"
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xfb620000 irq 51"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "1c20"
device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
device.form_factor = "internal"
device.string = "iec958:0"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
device.profile.name = "iec958-stereo"
device.profile.description = "Digital Stereo (IEC958)"
device.description = "Internes Audio Digital Stereo (IEC958)"
alsa.mixer_name = "Realtek ALC892"
alsa.components = "HDA:10ec0892,10438410,00100302"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
iec958-stereo-output: Digitaler Ausgang (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
properties:
active port: <iec958-stereo-output>
Como posso registrar ou declarar essas duas fontes independentes para que eu não seja forçado a usar apenas um dos dois dispositivos? Pulseaudio me dá a vantagem para que eu possa executar aplicativos diferentes em diferentes caixas de som.
É possível usar os alto-falantes analógicos para um aplicativo e o digital para outro aplicativo ou o limite de hardware está definido?
Eu também joguei um pouco com module-remap-sink
, mas isso não tem efeito.
Muito obrigado antecipadamente!