[pulseaudio-discuss] configure a soundcard?

Tanu Kaskinen tanuk at iki.fi
Sat Apr 27 10:26:18 UTC 2019


On Fri, 2019-04-26 at 07:37 -0500, Matt Zagrabelny wrote:
> On Fri, Apr 26, 2019 at 4:28 AM Tanu Kaskinen <tanuk at iki.fi> wrote:
> 
> > > Card #1
> > >         Name: alsa_card.pci-0000_00_14.2
> > 
> > ...
> > 
> > >         Ports:
> > 
> > ...
> > 
> > >                 analog-output-lineout: Line Out (priority: 9900, latency
> > > offset: 0 usec, not available)
> > >                         Part of profile(s): output:analog-stereo,
> > > output:analog-stereo+input:analog-stereo, output:analog-surround-21,
> > > output:analog-surround-21+input:analog-stereo, output:analog-surround-40,
> > > output:analog-surround-40+input:analog-stereo, output:analog-surround-41,
> > > output:analog-surround-41+input:analog-stereo, output:analog-surround-50,
> > > output:analog-surround-50+input:analog-stereo, output:analog-surround-51,
> > > output:analog-surround-51+input:analog-stereo, output:analog-surround-71,
> > > output:analog-surround-71+input:analog-stereo
> > >                 analog-output-headphones: Headphones (priority: 9000,
> > > latency offset: 0 usec, not available)
> > >                         Properties:
> > >                                 device.icon_name = "audio-headphones"
> > >                         Part of profile(s): output:analog-stereo,
> > > output:analog-stereo+input:analog-stereo
> > >                 iec958-stereo-output: Digital Output (S/PDIF) (priority:
> > 0,
> > > latency offset: 0 usec)
> > >                         Part of profile(s): output:iec958-stereo,
> > > output:iec958-stereo+input:analog-stereo
> > 
> > Both analog ports are marked as "not available", which means that to
> > PulseAudio looks like nothing is plugged in in either connector. This
> > is the reason why PulseAudio always picks the digital output on boot.
> > Broken jack detection is is a hardware or driver issue, which can be
> > worked around, see below.
> > 
> 
> Ahhh. Understood.
> 
> 
> > > >     while read -r line; do amixer -c0 cget "$line"; done <<< $(amixer
> > -c0
> > > > controls | grep Jack)
> > > > 
> > > 
> > > numid=1,iface=CARD,name='HDMI/DP,pcm=3 Jack'
> > >   ; type=BOOLEAN,access=r-------,values=1
> > >   : values=on
> > > numid=7,iface=CARD,name='HDMI/DP,pcm=7 Jack'
> > >   ; type=BOOLEAN,access=r-------,values=1
> > >   : values=off
> > 
> > It seems that I guessed wrong the card number. Card 0 seems to be the
> > HDMI card, while we're interested in the analog sound card, which is
> > alsa card 1. So change the script to this:
> > 
> >     while read -r line; do amixer -c0 cget "$line"; done <<< $(amixer -c0
> > controls | grep Jack)
> > 
> 
> I'm guessing I should change the above -c0's to -c1's.

Oops! Yes, that's what I meant.

> Here is that output:
> 
> numid=44,iface=CARD,name='CD Phantom Jack'
>   ; type=BOOLEAN,access=r-------,values=1
>   : values=on
> numid=49,iface=CARD,name='Front Headphone Jack'
>   ; type=BOOLEAN,access=r-------,values=1
>   : values=off
> numid=42,iface=CARD,name='Front Mic Jack'
>   ; type=BOOLEAN,access=r-------,values=1
>   : values=off
> numid=43,iface=CARD,name='Line Jack'
>   ; type=BOOLEAN,access=r-------,values=1
>   : values=off
> numid=47,iface=CARD,name='Line Out CLFE Jack'
>   ; type=BOOLEAN,access=r-------,values=1
>   : values=off
> numid=45,iface=CARD,name='Line Out Front Jack'
>   ; type=BOOLEAN,access=r-------,values=1
>   : values=off
> numid=48,iface=CARD,name='Line Out Side Jack'
>   ; type=BOOLEAN,access=r-------,values=1
>   : values=off
> numid=46,iface=CARD,name='Line Out Surround Jack'
>   ; type=BOOLEAN,access=r-------,values=1
>   : values=off
> numid=41,iface=CARD,name='Rear Mic Jack'
>   ; type=BOOLEAN,access=r-------,values=1
>   : values=off
> numid=50,iface=CARD,name='SPDIF Jack'
>   ; type=BOOLEAN,access=r-------,values=1
>   : values=off

Okay, the relevant jacks are "Front Headphone" and "Line Out Front". I
don't know if you're trying to use the headphone or the line out port,
but if you can disable jack detection for both:

In /usr/share/pulseaudio/alsa-mixer/paths/analog-output-
headphones.conf, change these lines:

[Jack Front Headphone]
required-any = any

to

[Jack Front Headphone]
required-any = any
state.plugged = unknown
state.unplugged = unknown

and similarly in /usr/share/pulseaudio/alsa-mixer/paths/analog-output-
lineout.conf change these lines:

[Jack Line Out Front]
required-any = any

to

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

These changes will be overwritten whenever your distribution updates
pulseaudio (yes, this sucks, hopefully this will be improved some day;
I think George Chini already has something prepared related to
disabling jack detection).

-- 
Tanu

https://www.patreon.com/tanuk
https://liberapay.com/tanuk



More information about the pulseaudio-discuss mailing list