<div dir="ltr"><div>Hello,</div><div><br></div><div>I've been able to fix something that has been driving me crazy for days and wanted to share it with you. <br></div><div><br></div><div>I've a audio device that expose 2 different ports in Pulseaudio, Speaker and Headphone : <br></div><div><br></div><div><span style="font-family:monospace">      ports:<br>                analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)<br>                        properties:<br>                                device.icon_name = "audio-speakers"<br>                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: unknown)<br>                        properties:<br>                                device.icon_name = "audio-headphones"<br>        active port: <analog-output-headphones></span></div><div><br></div><div>Unfortunately, this audio device itself does not have a Speaker 3.5mm jack, but only a Headphone 3.5mm jack.</div><div><br></div><div>Hence the default priority being higher for the Speaker port, a new user connected to this workstation will always miss sound and need to change the active port to be the Headphones manually.</div><div><br></div><div>Following is how I fixed this problem.</div><div>It's probably not the best way to do things, but my knowledge is limited in this subject, and it just works ! <br></div><div>I would love to receive some feedback from the experts though.<br></div><div><br></div><div>First, I've created a udev rule to match my audio device and use a user-defined pulseaudio profile <br></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">SUBSYSTEM!="sound", GOTO="pulseaudio_end"<br>ACTION!="change", GOTO="pulseaudio_end"<br>KERNEL!="card*", GOTO="pulseaudio_end"<br>ATTRS{vendor}=="0x6549", ATTRS{device}=="0x2200", ENV{PULSE_PROFILE_SET}="teradici.conf"<br>LABEL="pulseaudio_end"</span></div><div><br></div><div>Then, I created this user-defined profile, <i>teradici.conf</i>, by copying <i>/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf </i>and removing <i>analog-output-speaker</i> from the <i>paths-output</i>.</div><div><br></div><div><span style="font-family:monospace">--- default.conf        2020-11-23 17:33:37.000000000 +0100<br>+++ teradici.conf  2023-04-12 09:01:03.345338558 +0200<br>@@ -112,7 +112,7 @@<br> [Mapping analog-stereo]<br> device-strings = front:%f<br> channel-map = left,right<br>-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2<br>+paths-output = analog-output analog-output-lineout analog-output-headphones analog-output-headphones-2<br> paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic<br> priority = 15</span></div><div><span style="font-family:monospace"><br></span></div><div><font face="arial,sans-serif">After a reboot, this audio device no longer exposes the "missing" Speaker port and the Headphones port is always selected.<br></font></div><div><font face="arial,sans-serif"><br></font></div><div><font face="arial,sans-serif">Cheers,<br></font></div></div>