<includetail><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div></includetail><div><includetail><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "Sean Greenslade"<sean@seangreenslade.com>;</div><div><b>Date: </b> Mon, Nov 20, 2023 11:10 AM</div><div><b>To: </b> "pulseaudio-discuss"<pulseaudio-discuss@lists.freedesktop.org>; <wbr></div><div><b>Subject: </b> Re: [pulseaudio-discuss] Switching output ports across sound cards will cause the Headphone to be silent.</div></div><div> </div>> > In the following scenario, switching output ports across sound cards will cause the Headphone to be silent.<br>> > (Tips: USB speakers or Bluetooth earphones use independent sound cards, and the device uses an onboard sound card.)<br>> ><br>> ><br>> > 1. headphone is unplugged, automatically change port: headphone -&gt; speaker-&gt; usb speaker (or Bluetooth earphone)<br>> > 2. headphone is plugged, automatically change port: usb speaker(or Bluetooth earphone) -&gt; headphone<br>> ><br>> ><br>> > Step 1. When the headphone is unplugged, the port is automatically switched from the headphone to the speaker.&nbsp;<br>> > The following configuration items in the analog-output-speaker.conf file will be applied, and then the port is&nbsp;<br>> > switched to the USB speaker.<br>> > Close Headphone volume<br>> > [Element Headphone]<br>> > switch=off<br>> > volume=off<br>> ><br>> ><br>> > Step 2, when the headphone is plugged in, the port is automatically switched from the USB speaker to the headphone,&nbsp;<br>> > and the following configuration items in the analog-output-headphone.conf file will be applied.<br>> > [Element Headphone]<br>> > required-any = any<br>> > switch = mute<br>> > volume=merge<br>> > override-map.1 = all<br>> > override-map.2 = all-left,all-right<br>> ><br>> ><br>> > As you can see through alsamixer, the volume of the Headphone has been restored, but the Headphone is silent.<br>> ><br>> ><br>> ><br>> > Could you please help slove this issue, thanks!<br>><br>> Hi, Chengyi.<br>><br>> Your question is somewhat unclear. The behavior you're describing is not<br>> how pulseaudio operates by default, but the config file snippets you<br>> provide are not modified from the defaults. By default, unplugging the<br>> headphones should switch to the speaker channel of the same ALSA card.<br>> Have you made any modifications to the various pulseaudo alsa-mixer<br>> paths conf files? If so, please show what you have changed.<br>></div><div style="font:Verdana normal 14px;color:#000;"><br></div><div style="font:Verdana normal 14px;color:#000;">Hi Sean,</div><div style="font:Verdana normal 14px;color:#000;"><br></div><div style="font:Verdana normal 14px;color:#000;">Thanks for your reply.<br><br>Yes, at first, unplugging theheadphones should switch to the speaker channel of <br></div><div style="font:Verdana normal 14px;color:#000;">the same ALSA card,  but then the client sends "command_set_default_sink_or_source" <br></div><div style="font:Verdana normal 14px;color:#000;">to switth to USB Speaker, so the following switching sequence occurs.</div><div style="font:Verdana normal 14px;color:#000;"><includetail><div style="font:Verdana normal 14px;color:#000;"><pre>headphone -> speaker-> usb speaker (or Bluetooth earphone)<br><br><span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Part of the log is as follows:</span></span></span><br>----------------------------------<br>11月 20 13:40:10.686234 uos60-PC pulseaudio[8944]: I: [pulseaudio] sink.c: Changed port of sink 1 "alsa_output.pci-0000_00_1f.3.analog-stereo" to analog-output-speaker<br>11月 20 13:40:10.686234 uos60-PC pulseaudio[8944]: I: [pulseaudio] core.c: default_sink: alsa_output.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00.analog-stereo -> alsa_output.pci-0000_00_1f.3.analog-stereo<br><br>...<br><br>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<br>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<br><br></pre></div></includetail></div></includetail><includetail><div style="font:Verdana normal 14px;color:#000;">BR,</div><div style="font:Verdana normal 14px;color:#000;"><br></div><div style="font:Verdana normal 14px;color:#000;">Chengyi<br></div><!--<![endif]--></includetail></div>