ASoC: hdac_hdmi: Drop support for Icelake

This reverts commit 019033c854 ("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>
This commit is contained in:
Kai Vehmanen 2019-11-26 08:53:04 -06:00 committed by Mark Brown
parent e3d8f8ae5b
commit 573892b6e6
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 8 additions and 53 deletions

View File

@ -115,16 +115,8 @@ struct hdac_hdmi_dai_port_map {
struct hdac_hdmi_cvt *cvt;
};
/*
* pin to port mapping table where the value indicate the pin number and
* the index indicate the port number with 1 base.
*/
static const int icl_pin2port_map[] = {0x4, 0x6, 0x8, 0xa, 0xb};
struct hdac_hdmi_drv_data {
unsigned int vendor_nid;
const int *port_map; /* pin to port mapping table */
int port_num;
};
struct hdac_hdmi_priv {
@ -1374,12 +1366,11 @@ static int hdac_hdmi_add_pin(struct hdac_device *hdev, hda_nid_t nid)
return 0;
}
#define INTEL_VENDOR_NID_0x2 0x02
#define INTEL_VENDOR_NID_0x8 0x08
#define INTEL_VENDOR_NID_0xb 0x0b
#define INTEL_VENDOR_NID 0x08
#define INTEL_GLK_VENDOR_NID 0x0b
#define INTEL_GET_VENDOR_VERB 0xf81
#define INTEL_SET_VENDOR_VERB 0x781
#define INTEL_EN_DP12 0x02 /* enable DP 1.2 features */
#define INTEL_EN_DP12 0x02 /* enable DP 1.2 features */
#define INTEL_EN_ALL_PIN_CVTS 0x01 /* enable 2nd & 3rd pins and convertors */
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,
static int hdac_hdmi_pin2port(void *aptr, int pin)
{
struct hdac_device *hdev = aptr;
struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev);
const int *map = hdmi->drv_data->port_map;
int i;
if (!hdmi->drv_data->port_num)
return pin - 4; /* map NID 0x05 -> port #1 */
/*
* looking for the pin number in the mapping table and return
* the index which indicate the port number
*/
for (i = 0; i < hdmi->drv_data->port_num; i++) {
if (pin == map[i])
return i + 1;
}
/* return -1 if pin number exceeds our expectation */
dev_err(&hdev->dev, "Can't find the port for pin %d\n", pin);
return -1;
return pin - 4; /* map NID 0x05 -> port #1 */
}
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)
struct hdac_hdmi_port *hport = NULL;
struct snd_soc_component *component = hdmi->component;
int i;
hda_nid_t pin_nid;
if (!hdmi->drv_data->port_num) {
/* for legacy platforms */
pin_nid = port + 0x04;
} else if (port < hdmi->drv_data->port_num) {
/* get pin number from the pin2port mapping table */
pin_nid = hdmi->drv_data->port_map[port - 1];
} else {
dev_err(&hdev->dev, "Can't find the pin for port %d\n", port);
return;
}
/* Don't know how this mapping is derived */
hda_nid_t pin_nid = port + 0x04;
dev_dbg(&hdev->dev, "%s: for pin:%d port=%d\n", __func__,
pin_nid, pipe);
@ -2025,18 +1988,12 @@ static int hdac_hdmi_get_spk_alloc(struct hdac_device *hdev, int pcm_idx)
return port->eld.info.spk_alloc;
}
static struct hdac_hdmi_drv_data intel_icl_drv_data = {
.vendor_nid = INTEL_VENDOR_NID_0x2,
.port_map = icl_pin2port_map,
.port_num = ARRAY_SIZE(icl_pin2port_map),
};
static struct hdac_hdmi_drv_data intel_glk_drv_data = {
.vendor_nid = INTEL_VENDOR_NID_0xb,
.vendor_nid = INTEL_GLK_VENDOR_NID,
};
static struct hdac_hdmi_drv_data intel_drv_data = {
.vendor_nid = INTEL_VENDOR_NID_0x8,
.vendor_nid = INTEL_VENDOR_NID,
};
static int hdac_hdmi_dev_probe(struct hdac_device *hdev)
@ -2216,8 +2173,6 @@ static const struct hda_device_id hdmi_list[] = {
&intel_glk_drv_data),
HDA_CODEC_EXT_ENTRY(0x8086280d, 0x100000, "Geminilake HDMI",
&intel_glk_drv_data),
HDA_CODEC_EXT_ENTRY(0x8086280f, 0x100000, "Icelake HDMI",
&intel_icl_drv_data),
{}
};