All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates
@ 2017-12-06 11:04 Guneshwor Singh
  2017-12-06 11:04 ` [PATCH v2 1/6] ASoC: Intel: Skylake: Remove second shim read in register_poll Guneshwor Singh
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Guneshwor Singh @ 2017-12-06 11:04 UTC (permalink / raw)
  To: ALSA, Mark Brown
  Cc: Takashi Iwai, Liam Girdwood, Vinod Koul, Guneshwor Singh, Patches Audio

This series includes fixes for HDMI widgets sysfs not updating, shim
read optimization, fixes for dmic dev_type check and feature to
configure DSP clock source.

Guneshwor Singh (1):
  ASoC: Intel: Skylake: Do not check dev_type for dmic link type

Pradeep Tewani (2):
  ASoC: Intel: Skylake: Parse vendor tokens to build A-State table
  ASoC: Intel: Skylake: Configure DSP clock source

Puneeth Prabhu (2):
  ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe
  ASoC: hdac_hdmi: Remove redundant assignments

Subhransu S. Prusty (1):
  ASoC: Intel: Skylake: Remove second shim read in register_poll

 include/uapi/sound/snd_sst_tokens.h    | 17 ++++++++++++-
 sound/soc/codecs/hdac_hdmi.c           |  8 ++-----
 sound/soc/intel/common/sst-dsp.c       |  4 +---
 sound/soc/intel/skylake/skl-messages.c | 18 ++++++++++++++
 sound/soc/intel/skylake/skl-nhlt.c     | 15 ++++++++----
 sound/soc/intel/skylake/skl-pcm.c      |  6 +++++
 sound/soc/intel/skylake/skl-sst-dsp.h  |  3 +++
 sound/soc/intel/skylake/skl-topology.c | 44 +++++++++++++++++++++++++++++++++-
 sound/soc/intel/skylake/skl.h          | 17 +++++++++++++
 9 files changed, 116 insertions(+), 16 deletions(-)

-- 
2.15.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 1/6] ASoC: Intel: Skylake: Remove second shim read in register_poll
  2017-12-06 11:04 [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Guneshwor Singh
@ 2017-12-06 11:04 ` Guneshwor Singh
  2017-12-06 11:04 ` [PATCH v2 2/6] ASoC: Intel: Skylake: Parse vendor tokens to build A-State table Guneshwor Singh
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Guneshwor Singh @ 2017-12-06 11:04 UTC (permalink / raw)
  To: ALSA, Mark Brown
  Cc: Takashi Iwai, Guneshwor Singh, Patches Audio, Liam Girdwood,
	Vinod Koul, Subhransu S. Prusty

From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>

No need to read the register again if the value read has already matched
the target during the loop. So remove the second shim read.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/common/sst-dsp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c
index 11c0805393ff..fd82f4b1d4a0 100644
--- a/sound/soc/intel/common/sst-dsp.c
+++ b/sound/soc/intel/common/sst-dsp.c
@@ -269,7 +269,7 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask,
 	 */
 
 	timeout = jiffies + msecs_to_jiffies(time);
-	while (((sst_dsp_shim_read_unlocked(ctx, offset) & mask) != target)
+	while ((((reg = sst_dsp_shim_read_unlocked(ctx, offset)) & mask) != target)
 		&& time_before(jiffies, timeout)) {
 		k++;
 		if (k > 10)
@@ -278,8 +278,6 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask,
 		usleep_range(s, 2*s);
 	}
 
-	reg = sst_dsp_shim_read_unlocked(ctx, offset);
-
 	if ((reg & mask) == target) {
 		dev_dbg(ctx->dev, "FW Poll Status: reg=%#x %s successful\n",
 					reg, operation);
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 2/6] ASoC: Intel: Skylake: Parse vendor tokens to build A-State table
  2017-12-06 11:04 [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Guneshwor Singh
  2017-12-06 11:04 ` [PATCH v2 1/6] ASoC: Intel: Skylake: Remove second shim read in register_poll Guneshwor Singh
@ 2017-12-06 11:04 ` Guneshwor Singh
  2017-12-06 11:04 ` [PATCH v2 3/6] ASoC: Intel: Skylake: Configure DSP clock source Guneshwor Singh
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Guneshwor Singh @ 2017-12-06 11:04 UTC (permalink / raw)
  To: ALSA, Mark Brown
  Cc: Pradeep Tewani, Takashi Iwai, Guneshwor Singh, Patches Audio,
	Liam Girdwood, Vinod Koul

From: Pradeep Tewani <pradeep.d.tewani@intel.com>

A-State table is a power management table which allows the driver to
configure the DSP clock source corresponding to various load thresholds.
The table contains upto 3 A-State entries. The patch adds and parses the
corresponding A-State tokens to build the table.

Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
---
 include/uapi/sound/snd_sst_tokens.h    | 17 ++++++++++++-
 sound/soc/intel/skylake/skl-topology.c | 44 +++++++++++++++++++++++++++++++++-
 sound/soc/intel/skylake/skl.h          | 17 +++++++++++++
 3 files changed, 76 insertions(+), 2 deletions(-)

diff --git a/include/uapi/sound/snd_sst_tokens.h b/include/uapi/sound/snd_sst_tokens.h
index 326054a72bc7..8ba0112e5336 100644
--- a/include/uapi/sound/snd_sst_tokens.h
+++ b/include/uapi/sound/snd_sst_tokens.h
@@ -222,6 +222,17 @@
  * %SKL_TKN_MM_U32_NUM_IN_FMT:  Number of input formats
  * %SKL_TKN_MM_U32_NUM_OUT_FMT: Number of output formats
  *
+ * %SKL_TKN_U32_ASTATE_IDX:     Table Index for the A-State entry to be filled
+ *                              with kcps and clock source
+ *
+ * %SKL_TKN_U32_ASTATE_COUNT:   Number of valid entries in A-State table
+ *
+ * %SKL_TKN_U32_ASTATE_KCPS:    Specifies the core load threshold (in kilo
+ *                              cycles per second) below which DSP is clocked
+ *                              from source specified by clock source.
+ *
+ * %SKL_TKN_U32_ASTATE_CLK_SRC: Clock source for A-State entry
+ *
  * module_id and loadable flags dont have tokens as these values will be
  * read from the DSP FW manifest
  *
@@ -309,7 +320,11 @@ enum SKL_TKNS {
 	SKL_TKN_MM_U32_NUM_IN_FMT,
 	SKL_TKN_MM_U32_NUM_OUT_FMT,
 
-	SKL_TKN_MAX = SKL_TKN_MM_U32_NUM_OUT_FMT,
+	SKL_TKN_U32_ASTATE_IDX,
+	SKL_TKN_U32_ASTATE_COUNT,
+	SKL_TKN_U32_ASTATE_KCPS,
+	SKL_TKN_U32_ASTATE_CLK_SRC,
+	SKL_TKN_MAX = SKL_TKN_U32_ASTATE_CLK_SRC,
 };
 
 #endif
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index a072bcf209d2..6a5f8462c380 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -3056,11 +3056,13 @@ static int skl_tplg_get_int_tkn(struct device *dev,
 		struct snd_soc_tplg_vendor_value_elem *tkn_elem,
 		struct skl *skl)
 {
-	int tkn_count = 0, ret;
+	int tkn_count = 0, ret, size;
 	static int mod_idx, res_val_idx, intf_val_idx, dir, pin_idx;
 	struct skl_module_res *res = NULL;
 	struct skl_module_iface *fmt = NULL;
 	struct skl_module *mod = NULL;
+	static struct skl_astate_param *astate_table;
+	static int astate_cfg_idx, count;
 	int i;
 
 	if (skl->modules) {
@@ -3093,6 +3095,46 @@ static int skl_tplg_get_int_tkn(struct device *dev,
 		mod_idx = tkn_elem->value;
 		break;
 
+	case SKL_TKN_U32_ASTATE_COUNT:
+		if (astate_table != NULL) {
+			dev_err(dev, "More than one entry for A-State count");
+			return -EINVAL;
+		}
+
+		if (tkn_elem->value > SKL_MAX_ASTATE_CFG) {
+			dev_err(dev, "Invalid A-State count %d\n",
+				tkn_elem->value);
+			return -EINVAL;
+		}
+
+		size = tkn_elem->value * sizeof(struct skl_astate_param) +
+				sizeof(count);
+		skl->cfg.astate_cfg = devm_kzalloc(dev, size, GFP_KERNEL);
+		if (!skl->cfg.astate_cfg)
+			return -ENOMEM;
+
+		astate_table = skl->cfg.astate_cfg->astate_table;
+		count = skl->cfg.astate_cfg->count = tkn_elem->value;
+		break;
+
+	case SKL_TKN_U32_ASTATE_IDX:
+		if (tkn_elem->value >= count) {
+			dev_err(dev, "Invalid A-State index %d\n",
+				tkn_elem->value);
+			return -EINVAL;
+		}
+
+		astate_cfg_idx = tkn_elem->value;
+		break;
+
+	case SKL_TKN_U32_ASTATE_KCPS:
+		astate_table[astate_cfg_idx].kcps = tkn_elem->value;
+		break;
+
+	case SKL_TKN_U32_ASTATE_CLK_SRC:
+		astate_table[astate_cfg_idx].clk_src = tkn_elem->value;
+		break;
+
 	case SKL_TKN_U8_IN_PIN_TYPE:
 	case SKL_TKN_U8_OUT_PIN_TYPE:
 	case SKL_TKN_U8_IN_QUEUE_COUNT:
diff --git a/sound/soc/intel/skylake/skl.h b/sound/soc/intel/skylake/skl.h
index 554ad6b5a823..46dda88ba139 100644
--- a/sound/soc/intel/skylake/skl.h
+++ b/sound/soc/intel/skylake/skl.h
@@ -29,6 +29,8 @@
 
 #define SKL_SUSPEND_DELAY 2000
 
+#define SKL_MAX_ASTATE_CFG		3
+
 #define AZX_PCIREG_PGCTL		0x44
 #define AZX_PGCTL_LSRMD_MASK		(1 << 4)
 #define AZX_PCIREG_CGCTL		0x48
@@ -46,6 +48,20 @@ struct skl_dsp_resource {
 
 struct skl_debug;
 
+struct skl_astate_param {
+	u32 kcps;
+	u32 clk_src;
+};
+
+struct skl_astate_config {
+	u32 count;
+	struct skl_astate_param astate_table[0];
+};
+
+struct skl_fw_config {
+	struct skl_astate_config *astate_cfg;
+};
+
 struct skl {
 	struct hdac_ext_bus ebus;
 	struct pci_dev *pci;
@@ -77,6 +93,7 @@ struct skl {
 	u8 nr_modules;
 	struct skl_module **modules;
 	bool use_tplg_pcm;
+	struct skl_fw_config cfg;
 };
 
 #define skl_to_ebus(s)	(&(s)->ebus)
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 3/6] ASoC: Intel: Skylake: Configure DSP clock source
  2017-12-06 11:04 [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Guneshwor Singh
  2017-12-06 11:04 ` [PATCH v2 1/6] ASoC: Intel: Skylake: Remove second shim read in register_poll Guneshwor Singh
  2017-12-06 11:04 ` [PATCH v2 2/6] ASoC: Intel: Skylake: Parse vendor tokens to build A-State table Guneshwor Singh
@ 2017-12-06 11:04 ` Guneshwor Singh
  2017-12-06 11:04 ` [PATCH v2 4/6] ASoC: Intel: Skylake: Do not check dev_type for dmic link type Guneshwor Singh
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Guneshwor Singh @ 2017-12-06 11:04 UTC (permalink / raw)
  To: ALSA, Mark Brown
  Cc: Pradeep Tewani, Takashi Iwai, Guneshwor Singh, Patches Audio,
	Liam Girdwood, Vinod Koul

From: Pradeep Tewani <pradeep.d.tewani@intel.com>

DSP clock source is configured by sending the A-State table to the FW.
Add the large config set IPC to configure the desired clock source

Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
---
 sound/soc/intel/skylake/skl-messages.c | 18 ++++++++++++++++++
 sound/soc/intel/skylake/skl-pcm.c      |  6 ++++++
 sound/soc/intel/skylake/skl-sst-dsp.h  |  3 +++
 3 files changed, 27 insertions(+)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index 61b5bfa79d13..81ee1118ed71 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -55,6 +55,19 @@ static int skl_free_dma_buf(struct device *dev, struct snd_dma_buffer *dmab)
 	return 0;
 }
 
+#define SKL_ASTATE_PARAM_ID	4
+
+void skl_dsp_set_astate_cfg(struct skl_sst *ctx, u32 cnt, void *data)
+{
+	struct skl_ipc_large_config_msg	msg = {0};
+
+	msg.large_param_id = SKL_ASTATE_PARAM_ID;
+	msg.param_data_size = (cnt * sizeof(struct skl_astate_param) +
+				sizeof(cnt));
+
+	skl_ipc_set_large_config(&ctx->ipc, &msg, data);
+}
+
 #define NOTIFICATION_PARAM_ID 3
 #define NOTIFICATION_MASK 0xf
 
@@ -409,6 +422,11 @@ int skl_resume_dsp(struct skl *skl)
 		return ret;
 
 	skl_dsp_enable_notification(skl->skl_sst, false);
+
+	if (skl->cfg.astate_cfg != NULL) {
+		skl_dsp_set_astate_cfg(skl->skl_sst, skl->cfg.astate_cfg->count,
+					skl->cfg.astate_cfg);
+	}
 	return ret;
 }
 
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 1dd97479e0c0..07150860680f 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -1351,6 +1351,12 @@ static int skl_platform_soc_probe(struct snd_soc_platform *platform)
 		skl_populate_modules(skl);
 		skl->skl_sst->update_d0i3c = skl_update_d0i3c;
 		skl_dsp_enable_notification(skl->skl_sst, false);
+
+		if (skl->cfg.astate_cfg != NULL) {
+			skl_dsp_set_astate_cfg(skl->skl_sst,
+					skl->cfg.astate_cfg->count,
+					skl->cfg.astate_cfg);
+		}
 	}
 	pm_runtime_mark_last_busy(platform->dev);
 	pm_runtime_put_autosuspend(platform->dev);
diff --git a/sound/soc/intel/skylake/skl-sst-dsp.h b/sound/soc/intel/skylake/skl-sst-dsp.h
index eba20d37ba8c..b8e799ed65ef 100644
--- a/sound/soc/intel/skylake/skl-sst-dsp.h
+++ b/sound/soc/intel/skylake/skl-sst-dsp.h
@@ -251,6 +251,9 @@ void skl_freeup_uuid_list(struct skl_sst *ctx);
 
 int skl_dsp_strip_extended_manifest(struct firmware *fw);
 void skl_dsp_enable_notification(struct skl_sst *ctx, bool enable);
+
+void skl_dsp_set_astate_cfg(struct skl_sst *ctx, u32 cnt, void *data);
+
 int skl_sst_ctx_init(struct device *dev, int irq, const char *fw_name,
 		struct skl_dsp_loader_ops dsp_ops, struct skl_sst **dsp,
 		struct sst_dsp_device *skl_dev);
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 4/6] ASoC: Intel: Skylake: Do not check dev_type for dmic link type
  2017-12-06 11:04 [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Guneshwor Singh
                   ` (2 preceding siblings ...)
  2017-12-06 11:04 ` [PATCH v2 3/6] ASoC: Intel: Skylake: Configure DSP clock source Guneshwor Singh
@ 2017-12-06 11:04 ` Guneshwor Singh
  2017-12-06 17:49   ` Applied "ASoC: Intel: Skylake: Do not check dev_type for dmic link type" to the asoc tree Mark Brown
  2017-12-06 11:04 ` [PATCH v2 5/6] ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe Guneshwor Singh
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Guneshwor Singh @ 2017-12-06 11:04 UTC (permalink / raw)
  To: ALSA, Mark Brown
  Cc: Takashi Iwai, Liam Girdwood, Vinod Koul, Guneshwor Singh, Patches Audio

Some BIOS have inconsistent dev_type value for DMIC link type.
Since there is only one device type for DMIC link type, remove device
type check if link type is NHLT_LINK_DMIC.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
---
 sound/soc/intel/skylake/skl-nhlt.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c
index afa557a1c031..e2121ddc8ef0 100644
--- a/sound/soc/intel/skylake/skl-nhlt.c
+++ b/sound/soc/intel/skylake/skl-nhlt.c
@@ -120,11 +120,16 @@ static bool skl_check_ep_match(struct device *dev, struct nhlt_endpoint *epnt,
 
 	if ((epnt->virtual_bus_id == instance_id) &&
 			(epnt->linktype == link_type) &&
-			(epnt->direction == dirn) &&
-			(epnt->device_type == dev_type))
-		return true;
-	else
-		return false;
+			(epnt->direction == dirn)) {
+		/* do not check dev_type for DMIC link type */
+		if (epnt->linktype == NHLT_LINK_DMIC)
+			return true;
+
+		if (epnt->device_type == dev_type)
+			return true;
+	}
+
+	return false;
 }
 
 struct nhlt_specific_cfg
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 5/6] ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe
  2017-12-06 11:04 [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Guneshwor Singh
                   ` (3 preceding siblings ...)
  2017-12-06 11:04 ` [PATCH v2 4/6] ASoC: Intel: Skylake: Do not check dev_type for dmic link type Guneshwor Singh
@ 2017-12-06 11:04 ` Guneshwor Singh
  2017-12-06 17:49   ` Applied "ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe" to the asoc tree Mark Brown
  2017-12-06 11:04 ` [PATCH v2 6/6] ASoC: hdac_hdmi: Remove redundant assignments Guneshwor Singh
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Guneshwor Singh @ 2017-12-06 11:04 UTC (permalink / raw)
  To: ALSA, Mark Brown
  Cc: Patches Audio, Takashi Iwai, Guneshwor Singh, Puneeth Prabhu,
	Liam Girdwood, Vinod Koul, Subhransu S . Prusty

From: Puneeth Prabhu <puneethx.prabhu@intel.com>

All nodes of hdmi codec widgets are not updated in sysfs interface
(/sys/bus/hdaudio/devices/<dev>/widgets/) as the vendor widget is not
programmed to enable all the converters and pins during init. So,
refresh the sysfs widget interface after enabling all pins and
converters.

Signed-off-by: Puneeth Prabhu <puneethx.prabhu@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
---
 sound/soc/codecs/hdac_hdmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 18bf959a3d59..ab1889f55227 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -2042,6 +2042,7 @@ static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev)
 			"Failed in parse and map nid with err: %d\n", ret);
 		return ret;
 	}
+	snd_hdac_refresh_widgets(hdev, true);
 
 	/* ASoC specific initialization */
 	ret = snd_soc_register_codec(&hdev->dev, &hdmi_hda_codec,
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 6/6] ASoC: hdac_hdmi: Remove redundant assignments
  2017-12-06 11:04 [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Guneshwor Singh
                   ` (4 preceding siblings ...)
  2017-12-06 11:04 ` [PATCH v2 5/6] ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe Guneshwor Singh
@ 2017-12-06 11:04 ` Guneshwor Singh
  2017-12-06 17:49   ` Applied "ASoC: hdac_hdmi: Remove redundant assignments" to the asoc tree Mark Brown
  2017-12-06 15:43 ` [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Vinod Koul
  2017-12-06 17:43 ` Mark Brown
  7 siblings, 1 reply; 13+ messages in thread
From: Guneshwor Singh @ 2017-12-06 11:04 UTC (permalink / raw)
  To: ALSA, Mark Brown
  Cc: Patches Audio, Takashi Iwai, Guneshwor Singh, Puneeth Prabhu,
	Liam Girdwood, Vinod Koul

From: Puneeth Prabhu <puneethx.prabhu@intel.com>

Assignments for start_nid, end_nid and num_nodes of hdac_device
structure are already done in init.  So, remove the redundant
assignments.

Signed-off-by: Puneeth Prabhu <puneethx.prabhu@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
---
 sound/soc/codecs/hdac_hdmi.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index ab1889f55227..69d7404dfbc4 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1465,10 +1465,7 @@ static int hdac_hdmi_parse_and_map_nid(struct hdac_ext_device *edev,
 		return -EINVAL;
 	}
 
-	hdev->num_nodes = num_nodes;
-	hdev->start_nid = nid;
-
-	for (i = 0; i < hdev->num_nodes; i++, nid++) {
+	for (i = 0; i < num_nodes; i++, nid++) {
 		unsigned int caps;
 		unsigned int type;
 
@@ -1494,8 +1491,6 @@ static int hdac_hdmi_parse_and_map_nid(struct hdac_ext_device *edev,
 		}
 	}
 
-	hdev->end_nid = nid;
-
 	if (!hdmi->num_pin || !hdmi->num_cvt) {
 		ret = -EIO;
 		goto free_widgets;
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates
  2017-12-06 11:04 [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Guneshwor Singh
                   ` (5 preceding siblings ...)
  2017-12-06 11:04 ` [PATCH v2 6/6] ASoC: hdac_hdmi: Remove redundant assignments Guneshwor Singh
@ 2017-12-06 15:43 ` Vinod Koul
  2017-12-06 17:43 ` Mark Brown
  7 siblings, 0 replies; 13+ messages in thread
From: Vinod Koul @ 2017-12-06 15:43 UTC (permalink / raw)
  To: Guneshwor Singh
  Cc: Takashi Iwai, Liam Girdwood, ALSA, Mark Brown, Patches Audio

On Wed, Dec 06, 2017 at 04:34:00PM +0530, Guneshwor Singh wrote:
> This series includes fixes for HDMI widgets sysfs not updating, shim
> read optimization, fixes for dmic dev_type check and feature to
> configure DSP clock source.

Acked-By: Vinod Koul <vinod.koul@intel.com>

-- 
~Vinod

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates
  2017-12-06 11:04 [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Guneshwor Singh
                   ` (6 preceding siblings ...)
  2017-12-06 15:43 ` [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Vinod Koul
@ 2017-12-06 17:43 ` Mark Brown
  2017-12-07 12:11   ` Singh, Guneshwor
  7 siblings, 1 reply; 13+ messages in thread
From: Mark Brown @ 2017-12-06 17:43 UTC (permalink / raw)
  To: Guneshwor Singh
  Cc: Takashi Iwai, Liam Girdwood, ALSA, Vinod Koul, Patches Audio


[-- Attachment #1.1: Type: text/plain, Size: 731 bytes --]

On Wed, Dec 06, 2017 at 04:34:00PM +0530, Guneshwor Singh wrote:
> This series includes fixes for HDMI widgets sysfs not updating, shim
> read optimization, fixes for dmic dev_type check and feature to
> configure DSP clock source.

Please don't throw together a bunch of unrelated things into a patch
series, if a patch is a standalone thing that isn't really related to
and doesn't depend on the rest of the series just send it separately.
This makes it much easier to follow what's going on and avoids changes
getting held up by other, unrelated, changes.  For example here the DSP
clock scaling stuff is a three patch series, if there were problems with
this probably the rest of the series would take longer to get looked at.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Applied "ASoC: hdac_hdmi: Remove redundant assignments" to the asoc tree
  2017-12-06 11:04 ` [PATCH v2 6/6] ASoC: hdac_hdmi: Remove redundant assignments Guneshwor Singh
@ 2017-12-06 17:49   ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2017-12-06 17:49 UTC (permalink / raw)
  To: Puneeth Prabhu
  Cc: alsa-devel, Patches Audio, Guneshwor Singh, Liam Girdwood,
	Takashi Iwai, Mark Brown, Vinod Koul

The patch

   ASoC: hdac_hdmi: Remove redundant assignments

has been applied to the asoc tree at

   https://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

>From 45a6008bfcdc3e620dcf1b2330766345097afe9c Mon Sep 17 00:00:00 2001
From: Puneeth Prabhu <puneethx.prabhu@intel.com>
Date: Wed, 6 Dec 2017 16:34:06 +0530
Subject: [PATCH] ASoC: hdac_hdmi: Remove redundant assignments

Assignments for start_nid, end_nid and num_nodes of hdac_device
structure are already done in init.  So, remove the redundant
assignments.

Signed-off-by: Puneeth Prabhu <puneethx.prabhu@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/hdac_hdmi.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index b706547c46d5..68a4a6b4e68e 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1465,10 +1465,7 @@ static int hdac_hdmi_parse_and_map_nid(struct hdac_ext_device *edev,
 		return -EINVAL;
 	}
 
-	hdev->num_nodes = num_nodes;
-	hdev->start_nid = nid;
-
-	for (i = 0; i < hdev->num_nodes; i++, nid++) {
+	for (i = 0; i < num_nodes; i++, nid++) {
 		unsigned int caps;
 		unsigned int type;
 
@@ -1494,8 +1491,6 @@ static int hdac_hdmi_parse_and_map_nid(struct hdac_ext_device *edev,
 		}
 	}
 
-	hdev->end_nid = nid;
-
 	if (!hdmi->num_pin || !hdmi->num_cvt) {
 		ret = -EIO;
 		goto free_widgets;
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Applied "ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe" to the asoc tree
  2017-12-06 11:04 ` [PATCH v2 5/6] ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe Guneshwor Singh
@ 2017-12-06 17:49   ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2017-12-06 17:49 UTC (permalink / raw)
  To: Puneeth Prabhu
  Cc: alsa-devel, Patches Audio, Guneshwor Singh, Liam Girdwood,
	Takashi Iwai, Mark Brown, Vinod Koul, Subhransu S . Prusty

The patch

   ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe

has been applied to the asoc tree at

   https://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

>From 0fb02ba36d01a04dab03c0a424607844ef4dadbf Mon Sep 17 00:00:00 2001
From: Puneeth Prabhu <puneethx.prabhu@intel.com>
Date: Wed, 6 Dec 2017 16:34:05 +0530
Subject: [PATCH] ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe

All nodes of hdmi codec widgets are not updated in sysfs interface
(/sys/bus/hdaudio/devices/<dev>/widgets/) as the vendor widget is not
programmed to enable all the converters and pins during init. So,
refresh the sysfs widget interface after enabling all pins and
converters.

Signed-off-by: Puneeth Prabhu <puneethx.prabhu@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/hdac_hdmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 3a35ede7027d..b706547c46d5 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -2042,6 +2042,7 @@ static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev)
 			"Failed in parse and map nid with err: %d\n", ret);
 		return ret;
 	}
+	snd_hdac_refresh_widgets(hdev, true);
 
 	/* ASoC specific initialization */
 	ret = snd_soc_register_codec(&hdev->dev, &hdmi_hda_codec,
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Applied "ASoC: Intel: Skylake: Do not check dev_type for dmic link type" to the asoc tree
  2017-12-06 11:04 ` [PATCH v2 4/6] ASoC: Intel: Skylake: Do not check dev_type for dmic link type Guneshwor Singh
@ 2017-12-06 17:49   ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2017-12-06 17:49 UTC (permalink / raw)
  To: Guneshwor Singh
  Cc: alsa-devel, Takashi Iwai, Patches Audio, Liam Girdwood,
	Vinod Koul, Mark Brown

The patch

   ASoC: Intel: Skylake: Do not check dev_type for dmic link type

has been applied to the asoc tree at

   https://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

>From e02b03303f13b6a571f01b4d84b69440696d2dde Mon Sep 17 00:00:00 2001
From: Guneshwor Singh <guneshwor.o.singh@intel.com>
Date: Wed, 6 Dec 2017 16:34:04 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Do not check dev_type for dmic link
 type

Some BIOS have inconsistent dev_type value for DMIC link type.
Since there is only one device type for DMIC link type, remove device
type check if link type is NHLT_LINK_DMIC.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/skylake/skl-nhlt.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c
index d14c50a60289..3eaac41090ca 100644
--- a/sound/soc/intel/skylake/skl-nhlt.c
+++ b/sound/soc/intel/skylake/skl-nhlt.c
@@ -119,11 +119,16 @@ static bool skl_check_ep_match(struct device *dev, struct nhlt_endpoint *epnt,
 
 	if ((epnt->virtual_bus_id == instance_id) &&
 			(epnt->linktype == link_type) &&
-			(epnt->direction == dirn) &&
-			(epnt->device_type == dev_type))
-		return true;
-	else
-		return false;
+			(epnt->direction == dirn)) {
+		/* do not check dev_type for DMIC link type */
+		if (epnt->linktype == NHLT_LINK_DMIC)
+			return true;
+
+		if (epnt->device_type == dev_type)
+			return true;
+	}
+
+	return false;
 }
 
 struct nhlt_specific_cfg
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates
  2017-12-06 17:43 ` Mark Brown
@ 2017-12-07 12:11   ` Singh, Guneshwor
  0 siblings, 0 replies; 13+ messages in thread
From: Singh, Guneshwor @ 2017-12-07 12:11 UTC (permalink / raw)
  To: Mark Brown; +Cc: Takashi Iwai, Liam Girdwood, ALSA, Vinod Koul, Patches Audio

On Wed, Dec 06, 2017 at 05:43:44PM +0000, Mark Brown wrote:
> On Wed, Dec 06, 2017 at 04:34:00PM +0530, Guneshwor Singh wrote:
> > This series includes fixes for HDMI widgets sysfs not updating, shim
> > read optimization, fixes for dmic dev_type check and feature to
> > configure DSP clock source.
> 
> Please don't throw together a bunch of unrelated things into a patch
> series, if a patch is a standalone thing that isn't really related to
> and doesn't depend on the rest of the series just send it separately.
> This makes it much easier to follow what's going on and avoids changes
> getting held up by other, unrelated, changes.  For example here the DSP
> clock scaling stuff is a three patch series, if there were problems with
> this probably the rest of the series would take longer to get looked at.

Makes sense. I will take care of this in my future posts.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-12-07 12:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 11:04 [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Guneshwor Singh
2017-12-06 11:04 ` [PATCH v2 1/6] ASoC: Intel: Skylake: Remove second shim read in register_poll Guneshwor Singh
2017-12-06 11:04 ` [PATCH v2 2/6] ASoC: Intel: Skylake: Parse vendor tokens to build A-State table Guneshwor Singh
2017-12-06 11:04 ` [PATCH v2 3/6] ASoC: Intel: Skylake: Configure DSP clock source Guneshwor Singh
2017-12-06 11:04 ` [PATCH v2 4/6] ASoC: Intel: Skylake: Do not check dev_type for dmic link type Guneshwor Singh
2017-12-06 17:49   ` Applied "ASoC: Intel: Skylake: Do not check dev_type for dmic link type" to the asoc tree Mark Brown
2017-12-06 11:04 ` [PATCH v2 5/6] ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe Guneshwor Singh
2017-12-06 17:49   ` Applied "ASoC: hdac_hdmi: Refresh sysfs during hdmi device probe" to the asoc tree Mark Brown
2017-12-06 11:04 ` [PATCH v2 6/6] ASoC: hdac_hdmi: Remove redundant assignments Guneshwor Singh
2017-12-06 17:49   ` Applied "ASoC: hdac_hdmi: Remove redundant assignments" to the asoc tree Mark Brown
2017-12-06 15:43 ` [PATCH v2 0/6] ASoC: Intel: Skylake: Skylake driver updates Vinod Koul
2017-12-06 17:43 ` Mark Brown
2017-12-07 12:11   ` Singh, Guneshwor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.