[pulseaudio-discuss] Switching output ports across sound cards will cause the Headphone to be silent.

赵成义 zhaochengyi at uniontech.com
Mon Nov 20 07:03:41 UTC 2023


> OK, so your custom client application is deliberately changing the
> default sink? Note that just changing the default sink will not move
> existing sink input streams. You will need to do that yourself, for
> example with the pa_context_move_sink_input_by_index function.



Hi Sean,


In fact, the sink-input has been moved correctly. If the speaker port is closed, this problem will not occur.



I think this is a kernel problem. At that time, the speaker was always on and switching between sound cards 

was performed when the headphone was plugged and unplugged.



logs:
-----------

11月 20 13:40:10.689190 uos60-PC pulseaudio[8944]: I: [pulseaudio] core.c: configured_default_sink: alsa_output.pci-0000_00_1f.3.analog-stereo -> alsa_output.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00.analog-stereo
11月 20 13:40:10.689190 uos60-PC pulseaudio[8944]: I: [pulseaudio] core.c: default_sink: alsa_output.pci-0000_00_1f.3.analog-stereo -> alsa_output.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00.analog-stereo
11月 20 13:40:10.689623 uos60-PC pulseaudio[8944]: D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1f.3.analog-stereo becomes idle, timeout in 2 seconds.
11月 20 13:40:10.689623 uos60-PC pulseaudio[8944]: D: [pulseaudio] sink-input.c: Starting to move sink input 0 from 'alsa_output.pci-0000_00_1f.3.analog-stereo'


BR,


Chengyi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20231120/4a8e2541/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Switching-across-cards.txt
Type: application/octet-stream
Size: 28962 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20231120/4a8e2541/attachment-0001.obj>


More information about the pulseaudio-discuss mailing list