ALSA: hda/hdmi: Add quirk to force connectivity
[ Upstream commit cd72c317a0
]
HDMI on some platforms doesn't enable audio support because its Port
Connectivity [31:30] is set to AC_JACK_PORT_NONE:
Node 0x05 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0b000094: OUT Detect HBR HDMI DP
Pin Default 0x58560010: [N/A] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Power states: D0 D3 EPSS
Power: setting=D0, actual=D0
Devices: 0
Connection: 3
0x02 0x03* 0x04
For now, use a quirk to force connectivity based on SSID. If there are
more platforms affected by the same issue, we can eye for a more generic
solution.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200804155836.16252-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
266d21a570
commit
b45944e2b3
|
@ -176,6 +176,7 @@ struct hdmi_spec {
|
||||||
bool use_jack_detect; /* jack detection enabled */
|
bool use_jack_detect; /* jack detection enabled */
|
||||||
bool use_acomp_notifier; /* use eld_notify callback for hotplug */
|
bool use_acomp_notifier; /* use eld_notify callback for hotplug */
|
||||||
bool acomp_registered; /* audio component registered in this driver */
|
bool acomp_registered; /* audio component registered in this driver */
|
||||||
|
bool force_connect; /* force connectivity */
|
||||||
struct drm_audio_component_audio_ops drm_audio_ops;
|
struct drm_audio_component_audio_ops drm_audio_ops;
|
||||||
int (*port2pin)(struct hda_codec *, int); /* reverse port/pin mapping */
|
int (*port2pin)(struct hda_codec *, int); /* reverse port/pin mapping */
|
||||||
|
|
||||||
|
@ -1711,7 +1712,8 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
|
||||||
* all device entries on the same pin
|
* all device entries on the same pin
|
||||||
*/
|
*/
|
||||||
config = snd_hda_codec_get_pincfg(codec, pin_nid);
|
config = snd_hda_codec_get_pincfg(codec, pin_nid);
|
||||||
if (get_defcfg_connect(config) == AC_JACK_PORT_NONE)
|
if (get_defcfg_connect(config) == AC_JACK_PORT_NONE &&
|
||||||
|
!spec->force_connect)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1815,11 +1817,18 @@ static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t cvt_nid)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const struct snd_pci_quirk force_connect_list[] = {
|
||||||
|
SND_PCI_QUIRK(0x103c, 0x871a, "HP", 1),
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
static int hdmi_parse_codec(struct hda_codec *codec)
|
static int hdmi_parse_codec(struct hda_codec *codec)
|
||||||
{
|
{
|
||||||
|
struct hdmi_spec *spec = codec->spec;
|
||||||
hda_nid_t start_nid;
|
hda_nid_t start_nid;
|
||||||
unsigned int caps;
|
unsigned int caps;
|
||||||
int i, nodes;
|
int i, nodes;
|
||||||
|
const struct snd_pci_quirk *q;
|
||||||
|
|
||||||
nodes = snd_hda_get_sub_nodes(codec, codec->core.afg, &start_nid);
|
nodes = snd_hda_get_sub_nodes(codec, codec->core.afg, &start_nid);
|
||||||
if (!start_nid || nodes < 0) {
|
if (!start_nid || nodes < 0) {
|
||||||
|
@ -1827,6 +1836,11 @@ static int hdmi_parse_codec(struct hda_codec *codec)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
q = snd_pci_quirk_lookup(codec->bus->pci, force_connect_list);
|
||||||
|
|
||||||
|
if (q && q->value)
|
||||||
|
spec->force_connect = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* hdmi_add_pin() assumes total amount of converters to
|
* hdmi_add_pin() assumes total amount of converters to
|
||||||
* be known, so first discover all converters
|
* be known, so first discover all converters
|
||||||
|
|
Loading…
Reference in New Issue