#pulse_audio

الفجر الباسم lo2lo2a82@bassam.social
2024-08-27
/usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf


# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

[General]
priority = 90
description-key = analog-output-lineout

[Jack Line Out]
required-any = any

[Jack Line Out Phantom]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Jack Front Line Out]
required-any = any

[Jack Front Line Out Phantom]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Jack Rear Line Out]
required-any = any

[Jack Rear Line Out Phantom]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Jack Line Out Front]
required-any = any

[Jack Line Out Front Phantom]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Jack Line Out CLFE]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Jack Line Out CLFE Phantom]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Jack Line Out Surround]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Jack Line Out Surround Phantom]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Jack Line Out Side]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Jack Line Out Side Phantom]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Jack Dock Line Out]
required-any = any

[Jack Dock Line Out Phantom]
state.plugged = unknown
state.unplugged = unknown
required-any = any

[Element Hardware Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

[Element Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

[Element Speaker+LO]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
required-any = any

[Element Headphone+LO]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
required-any = any

[Element Master Mono]
switch = off
volume = off

[Element Line HP Swap]
switch = off
required-any = any

; This profile path is intended to control line out, let's mute headphones
; else there will be a spike when plugging in headphones
[Element Headphone]
switch = off
volume = off

[Element Headphone,1]
switch = off
volume = off

[Element Headphone2]
switch = off
volume = off

[Element Speaker]
switch = off
volume = off

[Element Desktop Speaker]
switch = off
volume = off

[Element Front]
switch = mute
volume = merge
override-map.1 = all-front
override-map.2 = front-left,front-right

[Element Rear]
switch = mute
volume = merge
override-map.1 = all-rear
override-map.2 = rear-left,rear-right

[Element Surround]
switch = mute
volume = merge
override-map.1 = all-rear
override-map.2 = rear-left,rear-right

[Element Side]
switch = mute
volume = merge
override-map.1 = all-side
override-map.2 = side-left,side-right

[Element Center]
switch = mute
volume = merge
override-map.1 = all-center
override-map.2 = all-center,all-center

[Element LFE]
switch = mute
volume = merge
override-map.1 = lfe
override-map.2 = lfe,lfe

[Element CLFE]
switch = mute
volume = merge
override-map.1 = all-center
override-map.2 = all-center,lfe

[Element Center/LFE]
switch = mute
volume = merge
override-map.1 = all-center
override-map.2 = all-center,lfe

[Element Bass Speaker]
switch = off
volume = off

[Element Speaker Front]
switch = off
volume = off

[Element Speaker Surround]
switch = off
volume = off

[Element Speaker Side]
switch = off
volume = off

[Element Speaker CLFE]
switch = off
volume = off

[Element Line Out]
switch = mute
volume = merge

[Element Line Out]
switch = off
volume = off



.include analog-output.conf.common
--------------------
#pulse_audio

تم بحمدالله
الفجر الباسم lo2lo2a82@bassam.social
2024-08-27
عندي كرت الصوت وانا حاطط السماعة الهيدفون في السوكت اللي قدام وحاطط السماعة السبيكر في السوكيت اللي وراء
المهم ع وندوز كان سهل الى حد مااني احول ما بين الاتنين- من غير ماشيل واحد فيهم واحط التاني -ببرنامج

لغاية استخدمت
#alt_linux
#alt
لقيت لما بشغل السماعة الهيدفون اللاسبيكر مش بتشتغل معاها فرحت اوي
كنت عاوز اكمل بقى واعرف احول بين الاتنين
لاني لما نت بشغل الاسبيكر الصوت بيبقى موجود في الهيدفون
المهم لقيت دا
التعليق ده
Having both speakers and headphones plugged in and switching in software on-the-fly

By design, Pulseaudio automatically turns off Line Out when headphones are plugged in and uses Headphone slider instead. You can observe this behavior in alsamixer. What we want is to have Headphone and Line Out sliders working separately and at the same time. This is extremely useful if you want to remap Realtek's jacks to have, say, Rear Green for headphones and Blue for speakers (with the help of hdajackretask from alsa-tools).

To achieve this, you should directly edit Pulseaudio mixer's configuration.
1. We tell pulseaudio that headphones are always plugged in.

Edit:

/usr/share/pulseaudio/alsa-mixer/paths/analog-output-lineout.conf

Find:

[Jack Headphone]
state.plugged = no
state.unplugged = unknown

Change no to yes.

If you're using the jacks on the front of your computer's case change [Jack Front Headphone] instead.
2. By default, Line Out's volume controlled only by Master, and not by Line Out slider itself.

We want to merge Line Out with Master. Add this snippet to the end of the file:

[Element Line Out]
switch = mute
volume = merge

3. We need to completely cut off Line Out when we use headphones.

Edit:

/usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf

Add this snippet to the end of the file:

[Element Line Out]
switch = off
volume = off

On some systems you may also need to disable Front by adding this snippet:

[Element Front]
switch = off
volume = off

4. Like Pulseaudio, Alsa itself cuts off speakers when headphones are plugged in.

Open alsamixer: alsamixer -c0 or alsamixer -c1

Use ←/→ to Auto-Mute mode. Disable Auto-Mute Mode with ↓. Close alsamixer with Esc.

Save your changes with: alsactl store
5. Restart Pulseaudio

$ pulseaudio -k
$ pulseaudio --start

Now you have two separate ports on the same sink in pulseaudio. They mute each other, so you can switch to headphones and this will mute Line Out, and vice versa. To switch between ports you can use Gnome or Plasma sound mixer, or install appropriate desktop extension.


أخدت
الخطوات 2 و 3 و4
الاولانية مااخدتش

وبس برنامج التحكم بتاع
pulse audio
اقدر احول بين الاتنين
وللاسف برنامج اسوتشر اللي نزلته مش شايف
حركة الدمج اللي حصلت بين ماستر وال
line out
اللي بقى اسمها
speaker
في
pulse audio control
ومكتوب جنبها اصلا غير متاح هههه

بس مش مهم المهم انه اشتغل والله انا مبسووووط

المصدر
https://askubuntu.com/questions/712517/how-to-switch-between-headphones-and-speakers-without-unplu...

دوروا ع العنوان ده في التعليقات
Having both speakers and headphones plugged in and switching in software on-the-fly

#troubleshooting
#pulse_audio
#sound
#switcher
#lo2lo2a82

في التعليق القادم بقى هحط الاعدادات الموجودة في
ملف
/usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf

واللي تم التعديل فيها زي ما وضح التعليق مع بعض التعديل مني اللي هو مش تعديل ولا حاجة انا بس حذفت خطوة ماكنش ليها لازمة بالنسبة لحالتي

تعديل

You shouldn't edit files directly in /usr/share. If pulseaudio receives an update (for example to fix bugs), your changes will get wiped out. Usually there's a mechanism to provide override files in /etc or similar, but I don't know about pulseaudio specifically.

يعني مع التحديث كل اللي عملته ممكن يطير عاااااااا

عامة مش مهم
المهم الوقت الحالي

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst