How to play a sound both on headphone and speaker and line-out?

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

 



Hm, if you find an answer, I'd be interested.  You may not be able to.
Your device is like mine.    amixer shows headphones as a mixer
option, but aplay -Ll doesn't show head phones as a specific device or
port you can output to.  It might be that your device exposes no
software interface, and the switching is done internally in hardware,
which means you can't do anything about it.

It's a stretch, but maybe whatever sound module you are using supports
disabling polling for the headphone jack switch.   lmsod | grep snd
For me, I'm using snd_hda_intel
I don't have an option to turn off that polling, it's using something
called an unsolicited event, so at this point I'd be jumping into the
source code to see if it's writing registers to disable\enable the
built in speakers on that event and try editing the module's source.

Maybe someone else can correct me if I am wrong.

At this point, if it was that important, I'd probably be looking at
bluetooth headphones and either using pulse or alsa to mix them,
Bluetooth headphones would show as a separate device where headphones
are not for you.



On Mon, Jul 16, 2018 at 6:34 AM, Ali Shirvani <aj.shirvani at gmail.com> wrote:
> Dear Dylan,
>
> Thanks for your reply. I followed the link and create `~/.asoundrc` file
> with following content:
>
> pcm.quad {
>     type multi
>     slaves.a.pcm "dmix:ALC282,0"
>     slaves.a.channels 2
>     slaves.b.pcm "dmix:ALC282,2"
>     slaves.b.channels 2
>     bindings.0 { slave a; channel 0; }
>     bindings.1 { slave a; channel 1; }
>     bindings.2 { slave b; channel 0; }
>     bindings.3 { slave b; channel 1; }
> }
> pcm.stereo2quad {
>     type route
>     slave.pcm "quad"
>     ttable.0.0 1
>     ttable.1.1 1
>     ttable.0.2 1
>     ttable.1.3 1
> }
> pcm.!default {
>     type asym
>     playback.pcm "plug:stereo2quad"
>     capture.pcm "plug:dsnoop:ALC282"
> }
>
> And here is the output of `aplay -l`, I want to play sound on both headphone
> and speaker on analog card #1.
>
> **** List of PLAYBACK Hardware Devices ****
> card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
>   Subdevices: 0/1
>   Subdevice #0: subdevice #0
> card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 1: PCH [HDA Intel PCH], device 0: ALC282 Analog [ALC282 Analog]
>   Subdevices: 0/1
>   Subdevice #0: subdevice #0
>
> Regards,
>
> Ali
>
>
>
> On Sun, Jul 15, 2018 at 6:14 PM Dylan Taft <dylanetaft at gmail.com> wrote:
>>
>> You probably want to touch ~/.asoundrc not the system file
>>
>>
>> https://stackoverflow.com/questions/43939191/alsa-how-to-duplicate-a-stream-on-2-outputs-and-save-system-configs
>>
>>
>> On Sunday, July 15, 2018, Ali Shirvani <aj.shirvani at gmail.com> wrote:
>>>
>>> Hi all,
>>>
>>> I want to play sound on all output ports of sound card, includes
>>> headphone, speaker and line out. I found that I should define new profile
>>> for the sound card that includes all required output ports.
>>>
>>> I changed `/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf`
>>> file and uncommented last lines and changed the `auto-profile = no`, but
>>> unfortunately it doesn't work.
>>>
>>> Would you please help me to define a custom profile to play sound on all
>>> output ports?
>>>
>>> Regards,
>>> Ali Shirvani
>>
>> _______________________________________________
>> pulseaudio-discuss mailing list
>> pulseaudio-discuss at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>


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

  Powered by Linux