Re: Switching output ports across sound cards will cause the Headphone to be silent.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



------------------ Original ------------------
Date:  Mon, Nov 20, 2023 11:10 AM
To:  "pulseaudio-discuss"<pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx>;
Subject:  Re: [pulseaudio-discuss] Switching output ports across sound cards will cause the Headphone to be silent.
 
> > In the following scenario, switching output ports across sound cards will cause the Headphone to be silent.
> > (Tips: USB speakers or Bluetooth earphones use independent sound cards, and the device uses an onboard sound card.)
> >
> >
> > 1. headphone is unplugged, automatically change port: headphone -&gt; speaker-&gt; usb speaker (or Bluetooth earphone)
> > 2. headphone is plugged, automatically change port: usb speaker(or Bluetooth earphone) -&gt; headphone
> >
> >
> > Step 1. When the headphone is unplugged, the port is automatically switched from the headphone to the speaker.&nbsp;
> > The following configuration items in the analog-output-speaker.conf file will be applied, and then the port is&nbsp;
> > switched to the USB speaker.
> > Close Headphone volume
> > [Element Headphone]
> > switch=off
> > volume=off
> >
> >
> > Step 2, when the headphone is plugged in, the port is automatically switched from the USB speaker to the headphone,&nbsp;
> > and the following configuration items in the analog-output-headphone.conf file will be applied.
> > [Element Headphone]
> > required-any = any
> > switch = mute
> > volume=merge
> > override-map.1 = all
> > override-map.2 = all-left,all-right
> >
> >
> > As you can see through alsamixer, the volume of the Headphone has been restored, but the Headphone is silent.
> >
> >
> >
> > Could you please help slove this issue, thanks!
>
> Hi, Chengyi.
>
> Your question is somewhat unclear. The behavior you're describing is not
> how pulseaudio operates by default, but the config file snippets you
> provide are not modified from the defaults. By default, unplugging the
> headphones should switch to the speaker channel of the same ALSA card.
> Have you made any modifications to the various pulseaudo alsa-mixer
> paths conf files? If so, please show what you have changed.
>

Hi Sean,

Thanks for your reply.

Yes, at first, unplugging theheadphones should switch to the speaker channel of
the same ALSA card,  but then the client sends "command_set_default_sink_or_source"
to switth to USB Speaker, so the following switching sequence occurs.
headphone -> speaker-> usb speaker (or Bluetooth earphone)

Part of the log is as follows:
----------------------------------
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
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

...

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

BR,

Chengyi

[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux