ASoC: Intel: Skylake: Enable Geminilake support
Subsystems (4)
cover ASoC: Intel: Skylake: Enable Geminilake support
Geminilake is next gen SoC, enable audio for Geminilake.
Geminilake has two different devices connected to the same SSP, so use device_type check to get correct device configuration.
Senthilnathan Veppur (1):
ASoC: Intel: Skylake: Check device type to get endpoint configuration
Vinod Koul (3):
ASoC: rt298: Add DMI match for Geminilake reference platform
ASoC: Intel: Skylake: Add Geminlake IDs
ASoC: hdac_hdmi: Add device id for Geminilake
sound/soc/codecs/hdac_hdmi.c | 1 + sound/soc/codecs/rt298.c | 7 +++++++ sound/soc/intel/skylake/skl-messages.c | 7 +++++++ sound/soc/intel/skylake/skl-nhlt.c | 16 ++++++++++------ sound/soc/intel/skylake/skl-topology.c | 32 ++++++++++++++++++++++++++++++-- sound/soc/intel/skylake/skl.c | 7 +++++++ sound/soc/intel/skylake/skl.h | 3 ++- 7 files changed, 64 insertions(+), 9 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/4 ASoC: Intel: Skylake: Check device type to get endpoint configuration
From: Senthilnathan Veppur <[email protected]>
Geminilake has two different devices connected to the same SSP, so use device_type check to get correct device configuration.
--- sound/soc/intel/skylake/skl-nhlt.c | 16 ++++++++++------ sound/soc/intel/skylake/skl-topology.c | 32 ++++++++++++++++++++++++++++++-- sound/soc/intel/skylake/skl.h | 3 ++- 3 files changed, 42 insertions(+), 9 deletions(-)
sound/soc/intel/skylake/skl-nhlt.c +10 -6
@@ -102,14 +102,16 @@ static void dump_config(struct device *dev, u32 instance_id, u8 linktype, }static bool skl_check_ep_match (struct device *dev,struct nhlt_endpoint *epnt, -u32 instance_id,u8 link_type,u8 dirn) +u32 instance_id,u8 link_type,u8 dirn,u8 dev_type) { -dev_dbg (dev,"vbus_id=%d link_type=%d dir=%d\n" , - epnt->virtual_bus_id, epnt->linktype, epnt->direction); +dev_dbg (dev,"vbus_id=%d link_type=%d dir=%d dev_type = %d\n" , + epnt->virtual_bus_id, epnt->linktype, + epnt->direction, epnt->device_type);if ((epnt->virtual_bus_id == instance_id) && (epnt->linktype == link_type) && - (epnt->direction == dirn)) + (epnt->direction == dirn) && + (epnt->device_type == dev_type))return true;else return false;
@@ -117,7 +119,8 @@ static bool skl_check_ep_match(struct device *dev, struct nhlt_endpoint *epnt,struct nhlt_specific_cfg *skl_get_ep_blob (struct skl *skl,u32 instance,u8 link_type, -u8 s_fmt,u8 num_ch,u32 s_rate,u8 dirn) +u8 s_fmt,u8 num_ch,u32 s_rate, +u8 dirn,u8 dev_type) {struct nhlt_fmt *fmt;struct nhlt_endpoint *epnt;
@@ -135,7 +138,8 @@ struct nhlt_specific_cfgdev_dbg (dev,"endpoint count =%d\n" , nhlt->endpoint_count);for (j =0 ; j < nhlt->endpoint_count; j++) { -if (skl_check_ep_match (dev, epnt, instance, link_type, dirn)) { +if (skl_check_ep_match (dev, epnt, instance, link_type, + dirn, dev_type)) { fmt = (struct nhlt_fmt *)(epnt->config.caps + epnt->config.size); sp_config = skl_get_specific_cfg(dev, fmt, num_ch,
sound/soc/intel/skylake/skl-topology.c +30 -2
@@ -330,6 +330,31 @@ static void skl_tplg_update_buffer_size(struct skl_sst *ctx, multiplier; } +static u8 skl_tplg_be_dev_type (int dev_type) +{ +int ret; + +switch (dev_type) { +case SKL_DEVICE_BT : + ret =NHLT_DEVICE_BT ; +break ; + +case SKL_DEVICE_DMIC : + ret =NHLT_DEVICE_DMIC ; +break ; + +case SKL_DEVICE_I2S : + ret =NHLT_DEVICE_I2S ; +break ; + +default : + ret =NHLT_DEVICE_INVALID ; +break ; + } + +return ret; +} +static int skl_tplg_update_be_blob (struct snd_soc_dapm_widget *w,struct skl_sst *ctx) {
@@ -338,6 +363,7 @@ static int skl_tplg_update_be_blob(struct snd_soc_dapm_widget *w,u32 ch, s_freq, s_fmt;struct nhlt_specific_cfg *cfg;struct skl *skl =get_skl_ctx (ctx->dev); +u8 dev_type =skl_tplg_be_dev_type (m_cfg->dev_type);/* check if we already have blob */ if (m_cfg->formats_config.caps_size >0 )
@@ -374,7 +400,7 @@ static int skl_tplg_update_be_blob(struct snd_soc_dapm_widget *w,/* update the blob based on virtual bus_id and default params */ cfg =skl_get_ep_blob (skl, m_cfg->vbus_id, link_type, - s_fmt, ch, s_freq, dir); + s_fmt, ch, s_freq, dir, dev_type);if (cfg) { m_cfg->formats_config.caps_size = cfg->size; m_cfg->formats_config.caps = (u32 *) &cfg->caps;
@@ -1448,6 +1474,7 @@ static int skl_tplg_be_fill_pipe_params(struct snd_soc_dai *dai,struct nhlt_specific_cfg *cfg;struct skl *skl =get_skl_ctx (dai->dev);int link_type =skl_tplg_be_link_type (mconfig->dev_type); +u8 dev_type =skl_tplg_be_dev_type (mconfig->dev_type);skl_tplg_fill_dma_id (mconfig, params);
@@ -1457,7 +1484,8 @@ static int skl_tplg_be_fill_pipe_params(struct snd_soc_dai *dai,/* update the blob based on virtual bus_id*/ cfg =skl_get_ep_blob (skl, mconfig->vbus_id, link_type, params->s_fmt, params->ch, - params->s_freq, params->stream); + params->s_freq, params->stream, + dev_type);if (cfg) { mconfig->formats_config.caps_size = cfg->size; mconfig->formats_config.caps = (u32 *) &cfg->caps;
sound/soc/intel/skylake/skl.h +2 -1
@@ -118,7 +118,8 @@ struct skl_dsp_ops {struct nhlt_acpi_table *skl_nhlt_init (struct device *dev);void skl_nhlt_free (struct nhlt_acpi_table *addr);struct nhlt_specific_cfg *skl_get_ep_blob (struct skl *skl,u32 instance, -u8 link_type,u8 s_fmt,u8 no_ch,u32 s_rate,u8 dirn); +u8 link_type,u8 s_fmt,u8 no_ch, +u32 s_rate,u8 dirn,u8 dev_type);int skl_get_dmic_geo (struct skl *skl);int skl_nhlt_update_topology_bin (struct skl *skl);
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Check device type to get endpoint configuration" to the asoc tree
The patch
ASoC: Intel: Skylake: Check device type to get endpoint configuration
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
db2f586b803eb6a7974098dd8ce1201f048071d0Mon Sep 17 00:00:00 2001
From: Senthilnathan Veppur <[email protected]>
Date: Thu, 9 Feb 2017 16:44:01 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Check device type to get endpoint
configuration
Geminilake has two different devices connected to the same SSP, so use device_type check to get correct device configuration.
--- sound/soc/intel/skylake/skl-nhlt.c | 16 ++++++++++------ sound/soc/intel/skylake/skl-topology.c | 32 ++++++++++++++++++++++++++++++-- sound/soc/intel/skylake/skl.h | 3 ++- 3 files changed, 42 insertions(+), 9 deletions(-)
sound/soc/intel/skylake/skl-nhlt.c +10 -6
@@ -102,14 +102,16 @@ static void dump_config(struct device *dev, u32 instance_id, u8 linktype, }static bool skl_check_ep_match (struct device *dev,struct nhlt_endpoint *epnt, -u32 instance_id,u8 link_type,u8 dirn) +u32 instance_id,u8 link_type,u8 dirn,u8 dev_type) { -dev_dbg (dev,"vbus_id=%d link_type=%d dir=%d\n" , - epnt->virtual_bus_id, epnt->linktype, epnt->direction); +dev_dbg (dev,"vbus_id=%d link_type=%d dir=%d dev_type = %d\n" , + epnt->virtual_bus_id, epnt->linktype, + epnt->direction, epnt->device_type);if ((epnt->virtual_bus_id == instance_id) && (epnt->linktype == link_type) && - (epnt->direction == dirn)) + (epnt->direction == dirn) && + (epnt->device_type == dev_type))return true;else return false;
@@ -117,7 +119,8 @@ static bool skl_check_ep_match(struct device *dev, struct nhlt_endpoint *epnt,struct nhlt_specific_cfg *skl_get_ep_blob (struct skl *skl,u32 instance,u8 link_type, -u8 s_fmt,u8 num_ch,u32 s_rate,u8 dirn) +u8 s_fmt,u8 num_ch,u32 s_rate, +u8 dirn,u8 dev_type) {struct nhlt_fmt *fmt;struct nhlt_endpoint *epnt;
@@ -135,7 +138,8 @@ struct nhlt_specific_cfgdev_dbg (dev,"endpoint count =%d\n" , nhlt->endpoint_count);for (j =0 ; j < nhlt->endpoint_count; j++) { -if (skl_check_ep_match (dev, epnt, instance, link_type, dirn)) { +if (skl_check_ep_match (dev, epnt, instance, link_type, + dirn, dev_type)) { fmt = (struct nhlt_fmt *)(epnt->config.caps + epnt->config.size); sp_config = skl_get_specific_cfg(dev, fmt, num_ch,
sound/soc/intel/skylake/skl-topology.c +30 -2
@@ -330,6 +330,31 @@ static void skl_tplg_update_buffer_size(struct skl_sst *ctx, multiplier; } +static u8 skl_tplg_be_dev_type (int dev_type) +{ +int ret; + +switch (dev_type) { +case SKL_DEVICE_BT : + ret =NHLT_DEVICE_BT ; +break ; + +case SKL_DEVICE_DMIC : + ret =NHLT_DEVICE_DMIC ; +break ; + +case SKL_DEVICE_I2S : + ret =NHLT_DEVICE_I2S ; +break ; + +default : + ret =NHLT_DEVICE_INVALID ; +break ; + } + +return ret; +} +static int skl_tplg_update_be_blob (struct snd_soc_dapm_widget *w,struct skl_sst *ctx) {
@@ -338,6 +363,7 @@ static int skl_tplg_update_be_blob(struct snd_soc_dapm_widget *w,u32 ch, s_freq, s_fmt;struct nhlt_specific_cfg *cfg;struct skl *skl =get_skl_ctx (ctx->dev); +u8 dev_type =skl_tplg_be_dev_type (m_cfg->dev_type);/* check if we already have blob */ if (m_cfg->formats_config.caps_size >0 )
@@ -374,7 +400,7 @@ static int skl_tplg_update_be_blob(struct snd_soc_dapm_widget *w,/* update the blob based on virtual bus_id and default params */ cfg =skl_get_ep_blob (skl, m_cfg->vbus_id, link_type, - s_fmt, ch, s_freq, dir); + s_fmt, ch, s_freq, dir, dev_type);if (cfg) { m_cfg->formats_config.caps_size = cfg->size; m_cfg->formats_config.caps = (u32 *) &cfg->caps;
@@ -1448,6 +1474,7 @@ static int skl_tplg_be_fill_pipe_params(struct snd_soc_dai *dai,struct nhlt_specific_cfg *cfg;struct skl *skl =get_skl_ctx (dai->dev);int link_type =skl_tplg_be_link_type (mconfig->dev_type); +u8 dev_type =skl_tplg_be_dev_type (mconfig->dev_type);skl_tplg_fill_dma_id (mconfig, params);
@@ -1457,7 +1484,8 @@ static int skl_tplg_be_fill_pipe_params(struct snd_soc_dai *dai,/* update the blob based on virtual bus_id*/ cfg =skl_get_ep_blob (skl, mconfig->vbus_id, link_type, params->s_fmt, params->ch, - params->s_freq, params->stream); + params->s_freq, params->stream, + dev_type);if (cfg) { mconfig->formats_config.caps_size = cfg->size; mconfig->formats_config.caps = (u32 *) &cfg->caps;
sound/soc/intel/skylake/skl.h +2 -1
@@ -118,7 +118,8 @@ int skl_platform_register(struct device *dev);struct nhlt_acpi_table *skl_nhlt_init (struct device *dev);void skl_nhlt_free (struct nhlt_acpi_table *addr);struct nhlt_specific_cfg *skl_get_ep_blob (struct skl *skl,u32 instance, -u8 link_type,u8 s_fmt,u8 no_ch,u32 s_rate,u8 dirn); +u8 link_type,u8 s_fmt,u8 no_ch, +u32 s_rate,u8 dirn,u8 dev_type);int skl_get_dmic_geo (struct skl *skl);int skl_nhlt_update_topology_bin (struct skl *skl);
Signature · 1 line
2.11.0
PATCH 2/4 ASoC: rt298: Add DMI match for Geminilake reference platform
In reply to Subhransu S. PrustyFrom: Vinod Koul <[email protected]>
Geminilake reference platform also uses combo jack for audio connector so we need to set codec pdata to use this based on DMI match for this board.
--- sound/soc/codecs/rt298.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/codecs/rt298.c +7 -0
@@ -1163,6 +1163,13 @@ static int rt298_resume(struct snd_soc_codec *codec) DMI_MATCH(DMI_PRODUCT_NAME, "Broxton P") } }, + { + .ident = "Intel Gemini Lake", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Intel Corp" ), + DMI_MATCH(DMI_PRODUCT_NAME, "Geminilake") + } + }, { } };
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: rt298: Add DMI match for Geminilake reference platform" to the asoc tree
The patch
ASoC: rt298: Add DMI match for Geminilake reference platform
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
06a99ddd2049e2697de32a9435c4d5c5b5c78360Mon Sep 17 00:00:00 2001
From: Vinod Koul <[email protected]>
Date: Thu, 9 Feb 2017 16:44:02 +0530
Subject: [PATCH] ASoC: rt298: Add DMI match for Geminilake reference platform
Geminilake reference platform also uses combo jack for audio connector so we need to set codec pdata to use this based on DMI match for this board.
--- sound/soc/codecs/rt298.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/codecs/rt298.c +7 -0
@@ -1163,6 +1163,13 @@ static const struct dmi_system_id force_combo_jack_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Broxton P") } }, + { + .ident = "Intel Gemini Lake", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Intel Corp" ), + DMI_MATCH(DMI_PRODUCT_NAME, "Geminilake") + } + }, { } };
Signature · 1 line
2.11.0
PATCH 3/4 ASoC: Intel: Skylake: Add Geminlake IDs
In reply to Subhransu S. PrustyFrom: Vinod Koul <[email protected]>
Geminilake is next gen SoC, so add the IDs for Geminilake.
--- sound/soc/intel/skylake/skl-messages.c | 7 +++++++ sound/soc/intel/skylake/skl.c | 7 +++++++ 2 files changed, 14 insertions(+)
sound/soc/intel/skylake/skl-messages.c +7 -0
@@ -220,6 +220,13 @@ static struct skl_dsp_loader_ops bxt_get_loader_ops(void) .init_fw = bxt_sst_init_fw, .cleanup = bxt_sst_dsp_cleanup }, + { + .id = 0x3198, + .loader_ops = bxt_get_loader_ops, + .init = bxt_sst_dsp_init, + .init_fw = bxt_sst_init_fw, + .cleanup = bxt_sst_dsp_cleanup + }, };const struct skl_dsp_ops *skl_get_dsp_ops (int pci_id)
sound/soc/intel/skylake/skl.c +7 -0
@@ -883,6 +883,10 @@ static void skl_remove(struct pci_dev *pci) {} }; +static struct sst_acpi_mach sst_glk_devdata[] = { + {"INT343A" ,"glk_alc298s_i2s" ,"intel/dsp_fw_glk.bin" ,NULL ,NULL ,NULL }, +}; +/* PCI IDs */ static const struct pci_device_id skl_ids[] = {/* Sunrise Point-LP */
@@ -894,6 +898,9 @@ static void skl_remove(struct pci_dev *pci)/* KBL */ { PCI_DEVICE(0x8086, 0x9D71), .driver_data = (unsigned long)&sst_kbl_devdata}, + /* GLK */ + { PCI_DEVICE(0x8086, 0x3198), + .driver_data = (unsigned long)&sst_glk_devdata}, { 0, } };MODULE_DEVICE_TABLE (pci, skl_ids);
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Add Geminlake IDs" to the asoc tree
The patch
ASoC: Intel: Skylake: Add Geminlake IDs
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
255048634366c9aee87d7ab801fa530c34f10b9fMon Sep 17 00:00:00 2001
From: Vinod Koul <[email protected]>
Date: Thu, 9 Feb 2017 16:44:03 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Add Geminlake IDs
Geminilake is next gen SoC, so add the IDs for Geminilake.
--- sound/soc/intel/skylake/skl-messages.c | 7 +++++++ sound/soc/intel/skylake/skl.c | 7 +++++++ 2 files changed, 14 insertions(+)
sound/soc/intel/skylake/skl-messages.c +7 -0
@@ -220,6 +220,13 @@ static const struct skl_dsp_ops dsp_ops[] = { .init_fw = bxt_sst_init_fw, .cleanup = bxt_sst_dsp_cleanup }, + { + .id = 0x3198, + .loader_ops = bxt_get_loader_ops, + .init = bxt_sst_dsp_init, + .init_fw = bxt_sst_init_fw, + .cleanup = bxt_sst_dsp_cleanup + }, };const struct skl_dsp_ops *skl_get_dsp_ops (int pci_id)
sound/soc/intel/skylake/skl.c +7 -0
@@ -883,6 +883,10 @@ static struct sst_acpi_mach sst_kbl_devdata[] = { {} }; +static struct sst_acpi_mach sst_glk_devdata[] = { + {"INT343A" ,"glk_alc298s_i2s" ,"intel/dsp_fw_glk.bin" ,NULL ,NULL ,NULL }, +}; +/* PCI IDs */ static const struct pci_device_id skl_ids[] = {/* Sunrise Point-LP */
@@ -894,6 +898,9 @@ static const struct pci_device_id skl_ids[] = {/* KBL */ { PCI_DEVICE(0x8086, 0x9D71), .driver_data = (unsigned long)&sst_kbl_devdata}, + /* GLK */ + { PCI_DEVICE(0x8086, 0x3198), + .driver_data = (unsigned long)&sst_glk_devdata}, { 0, } };MODULE_DEVICE_TABLE (pci, skl_ids);
Signature · 1 line
2.11.0
PATCH 4/4 ASoC: hdac_hdmi: Add device id for Geminilake
In reply to Subhransu S. PrustyFrom: Vinod Koul <[email protected]>
Geminilake is new Intel SoC, so add codec entry for HDMI
--- sound/soc/codecs/hdac_hdmi.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/codecs/hdac_hdmi.c +1 -0
@@ -1843,6 +1843,7 @@ static int hdac_hdmi_runtime_resume(struct device *dev)HDA_CODEC_EXT_ENTRY (0x80862809 ,0x100000 ,"Skylake HDMI" ,0 ),HDA_CODEC_EXT_ENTRY (0x8086280a ,0x100000 ,"Broxton HDMI" ,0 ),HDA_CODEC_EXT_ENTRY (0x8086280b ,0x100000 ,"Kabylake HDMI" ,0 ), + HDA_CODEC_EXT_ENTRY(0x8086280d, 0x100000, "Geminilake HDMI", 0), {} };
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: hdac_hdmi: Add device id for Geminilake" to the asoc tree
The patch
ASoC: hdac_hdmi: Add device id for Geminilake
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
e3efb2ad834b50cb9c8625155e3e2674f5bc443bMon Sep 17 00:00:00 2001
From: Vinod Koul <[email protected]>
Date: Thu, 9 Feb 2017 16:44:04 +0530
Subject: [PATCH] ASoC: hdac_hdmi: Add device id for Geminilake
Geminilake is new Intel SoC, so add codec entry for HDMI
--- sound/soc/codecs/hdac_hdmi.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/codecs/hdac_hdmi.c +1 -0
@@ -2127,6 +2127,7 @@ static const struct hda_device_id hdmi_list[] = {HDA_CODEC_EXT_ENTRY (0x80862809 ,0x100000 ,"Skylake HDMI" ,0 ),HDA_CODEC_EXT_ENTRY (0x8086280a ,0x100000 ,"Broxton HDMI" ,0 ),HDA_CODEC_EXT_ENTRY (0x8086280b ,0x100000 ,"Kabylake HDMI" ,0 ), + HDA_CODEC_EXT_ENTRY(0x8086280d, 0x100000, "Geminilake HDMI", 0), {} };
Signature · 1 line
2.11.0