Skip to content

Commit 573892b

Browse files
kv2019ibroonie
authored andcommitted
ASoC: hdac_hdmi: Drop support for Icelake
This reverts commit 019033c ("ASoC: Intel: hdac_hdmi: add Icelake support"). Icelake HDMI audio is supported by the HDMI codec driver, which can be used both in non-DSP (legacy HDA) and with DSP (SOF) configurations. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191126145304.24204-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent e3d8f8a commit 573892b

File tree

1 file changed

+9
-54
lines changed

1 file changed

+9
-54
lines changed

sound/soc/codecs/hdac_hdmi.c

Lines changed: 9 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,8 @@ struct hdac_hdmi_dai_port_map {
115115
struct hdac_hdmi_cvt *cvt;
116116
};
117117

118-
/*
119-
* pin to port mapping table where the value indicate the pin number and
120-
* the index indicate the port number with 1 base.
121-
*/
122-
static const int icl_pin2port_map[] = {0x4, 0x6, 0x8, 0xa, 0xb};
123-
124118
struct hdac_hdmi_drv_data {
125119
unsigned int vendor_nid;
126-
const int *port_map; /* pin to port mapping table */
127-
int port_num;
128120
};
129121

130122
struct hdac_hdmi_priv {
@@ -1374,12 +1366,11 @@ static int hdac_hdmi_add_pin(struct hdac_device *hdev, hda_nid_t nid)
13741366
return 0;
13751367
}
13761368

1377-
#define INTEL_VENDOR_NID_0x2 0x02
1378-
#define INTEL_VENDOR_NID_0x8 0x08
1379-
#define INTEL_VENDOR_NID_0xb 0x0b
1369+
#define INTEL_VENDOR_NID 0x08
1370+
#define INTEL_GLK_VENDOR_NID 0x0b
13801371
#define INTEL_GET_VENDOR_VERB 0xf81
13811372
#define INTEL_SET_VENDOR_VERB 0x781
1382-
#define INTEL_EN_DP12 0x02 /* enable DP 1.2 features */
1373+
#define INTEL_EN_DP12 0x02 /* enable DP 1.2 features */
13831374
#define INTEL_EN_ALL_PIN_CVTS 0x01 /* enable 2nd & 3rd pins and convertors */
13841375

13851376
static void hdac_hdmi_skl_enable_all_pins(struct hdac_device *hdev)
@@ -1566,26 +1557,7 @@ static int hdac_hdmi_parse_and_map_nid(struct hdac_device *hdev,
15661557

15671558
static int hdac_hdmi_pin2port(void *aptr, int pin)
15681559
{
1569-
struct hdac_device *hdev = aptr;
1570-
struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev);
1571-
const int *map = hdmi->drv_data->port_map;
1572-
int i;
1573-
1574-
if (!hdmi->drv_data->port_num)
1575-
return pin - 4; /* map NID 0x05 -> port #1 */
1576-
1577-
/*
1578-
* looking for the pin number in the mapping table and return
1579-
* the index which indicate the port number
1580-
*/
1581-
for (i = 0; i < hdmi->drv_data->port_num; i++) {
1582-
if (pin == map[i])
1583-
return i + 1;
1584-
}
1585-
1586-
/* return -1 if pin number exceeds our expectation */
1587-
dev_err(&hdev->dev, "Can't find the port for pin %d\n", pin);
1588-
return -1;
1560+
return pin - 4; /* map NID 0x05 -> port #1 */
15891561
}
15901562

15911563
static void hdac_hdmi_eld_notify_cb(void *aptr, int port, int pipe)
@@ -1596,18 +1568,9 @@ static void hdac_hdmi_eld_notify_cb(void *aptr, int port, int pipe)
15961568
struct hdac_hdmi_port *hport = NULL;
15971569
struct snd_soc_component *component = hdmi->component;
15981570
int i;
1599-
hda_nid_t pin_nid;
1600-
1601-
if (!hdmi->drv_data->port_num) {
1602-
/* for legacy platforms */
1603-
pin_nid = port + 0x04;
1604-
} else if (port < hdmi->drv_data->port_num) {
1605-
/* get pin number from the pin2port mapping table */
1606-
pin_nid = hdmi->drv_data->port_map[port - 1];
1607-
} else {
1608-
dev_err(&hdev->dev, "Can't find the pin for port %d\n", port);
1609-
return;
1610-
}
1571+
1572+
/* Don't know how this mapping is derived */
1573+
hda_nid_t pin_nid = port + 0x04;
16111574

16121575
dev_dbg(&hdev->dev, "%s: for pin:%d port=%d\n", __func__,
16131576
pin_nid, pipe);
@@ -2025,18 +1988,12 @@ static int hdac_hdmi_get_spk_alloc(struct hdac_device *hdev, int pcm_idx)
20251988
return port->eld.info.spk_alloc;
20261989
}
20271990

2028-
static struct hdac_hdmi_drv_data intel_icl_drv_data = {
2029-
.vendor_nid = INTEL_VENDOR_NID_0x2,
2030-
.port_map = icl_pin2port_map,
2031-
.port_num = ARRAY_SIZE(icl_pin2port_map),
2032-
};
2033-
20341991
static struct hdac_hdmi_drv_data intel_glk_drv_data = {
2035-
.vendor_nid = INTEL_VENDOR_NID_0xb,
1992+
.vendor_nid = INTEL_GLK_VENDOR_NID,
20361993
};
20371994

20381995
static struct hdac_hdmi_drv_data intel_drv_data = {
2039-
.vendor_nid = INTEL_VENDOR_NID_0x8,
1996+
.vendor_nid = INTEL_VENDOR_NID,
20401997
};
20411998

20421999
static int hdac_hdmi_dev_probe(struct hdac_device *hdev)
@@ -2216,8 +2173,6 @@ static const struct hda_device_id hdmi_list[] = {
22162173
&intel_glk_drv_data),
22172174
HDA_CODEC_EXT_ENTRY(0x8086280d, 0x100000, "Geminilake HDMI",
22182175
&intel_glk_drv_data),
2219-
HDA_CODEC_EXT_ENTRY(0x8086280f, 0x100000, "Icelake HDMI",
2220-
&intel_icl_drv_data),
22212176
{}
22222177
};
22232178

0 commit comments

Comments
 (0)