<p>Naveen Manohar would like Rizwan Qureshi to <strong>review</strong> this change.</p><p><a href="https://review.coreboot.org/22324">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/kabylake: Add Dialog da7219 NHLT blob support<br><br>Add APIs and required parameters for creating Dialog da7219 SSP<br>endpoints in NHLT table.<br><br>The use of a NHLT table is required to make audio work<br>on the kabylake SoCs employing the internal DSP. The table<br>describes the audo endpoints (render vs capture) along with<br>their supported formats.<br><br>BUG=b:68686020<br>TEST=check that NHLT table for da7219 is created properly<br><br>Change-Id: I57b88873f1c59c8aadf8eec3c80a9d95165a2cc3<br>Signed-off-by: Naveen Manohar <naveen.m@intel.com><br>Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com><br>---<br>M src/soc/intel/skylake/Kconfig<br>M src/soc/intel/skylake/include/soc/nhlt.h<br>M src/soc/intel/skylake/nhlt/Makefile.inc<br>A src/soc/intel/skylake/nhlt/da7219.c<br>4 files changed, 87 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/22324/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig<br>index f830f54..f943170 100644<br>--- a/src/soc/intel/skylake/Kconfig<br>+++ b/src/soc/intel/skylake/Kconfig<br>@@ -272,6 +272,12 @@<br>    help<br>    Include DSP firmware settings for max98927 amplifier.<br> <br>+config NHLT_DA7219<br>+      bool<br>+ default n<br>+    help<br>+   Include DSP firmware settings for DA7219 headset codec.<br>+<br> choice<br>         prompt "Cache-as-ram implementation"<br>        default CAR_NEM_ENHANCED<br>diff --git a/src/soc/intel/skylake/include/soc/nhlt.h b/src/soc/intel/skylake/include/soc/nhlt.h<br>index d3e4568..1af27e8 100644<br>--- a/src/soc/intel/skylake/include/soc/nhlt.h<br>+++ b/src/soc/intel/skylake/include/soc/nhlt.h<br>@@ -77,4 +77,10 @@<br>  */<br> int nhlt_soc_add_max98927(struct nhlt *nhlt, int hwlink);<br> <br>+/*<br>+ * Add da7219 headset codec on provided SSP link. Return 0 on success, < 0<br>+ * on error.<br>+ */<br>+int nhlt_soc_add_da7219(struct nhlt *nhlt, int hwlink);<br>+<br> #endif<br>diff --git a/src/soc/intel/skylake/nhlt/Makefile.inc b/src/soc/intel/skylake/nhlt/Makefile.inc<br>index 35b2829..9c9b4c8 100644<br>--- a/src/soc/intel/skylake/nhlt/Makefile.inc<br>+++ b/src/soc/intel/skylake/nhlt/Makefile.inc<br>@@ -5,6 +5,7 @@<br> ramstage-y += rt5514.c<br> ramstage-y += rt5663.c<br> ramstage-y += max98927.c<br>+ramstage-y += da7219.c<br> <br> # DSP firmware settings files.<br> ifeq ($(CONFIG_SOC_INTEL_KABYLAKE),y)<br>@@ -25,6 +26,7 @@<br> RT5663 = rt5663-2ch-48khz-24b.bin<br> SSM4567_RENDER = ssm4567-render-2ch-48khz-24b.bin<br> SSM4567_CAPTURE = ssm4567-capture-4ch-48khz-32b.bin<br>+DA7219_RENDER_CAPTURE = dialog-2ch-48khz-24b.bin<br> <br> cbfs-files-$(CONFIG_NHLT_DMIC_2CH) += $(DMIC_2CH_48KHZ_16B)<br> $(DMIC_2CH_48KHZ_16B)-file := $(NHLT_BLOB_PATH)/$(DMIC_2CH_48KHZ_16B)<br>@@ -73,3 +75,7 @@<br> cbfs-files-$(CONFIG_NHLT_MAX98927) += $(MAX98927_RENDER_24B)<br> $(MAX98927_RENDER_24B)-file := $(NHLT_BLOB_PATH)/$(MAX98927_RENDER_24B)<br> $(MAX98927_RENDER_24B)-type := raw<br>+<br>+cbfs-files-$(CONFIG_NHLT_DA7219) += $(DA7219_RENDER_CAPTURE)<br>+$(DA7219_RENDER_CAPTURE)-file := $(NHLT_BLOB_PATH)/$(DA7219_RENDER_CAPTURE)<br>+$(DA7219_RENDER_CAPTURE)-type := raw<br>diff --git a/src/soc/intel/skylake/nhlt/da7219.c b/src/soc/intel/skylake/nhlt/da7219.c<br>new file mode 100644<br>index 0000000..6aa66c7<br>--- /dev/null<br>+++ b/src/soc/intel/skylake/nhlt/da7219.c<br>@@ -0,0 +1,69 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2017 Intel Corp.<br>+ *<br>+ * This program is free software; you can redistribute it and/or modify<br>+ * it under the terms of the GNU General Public License as published by<br>+ * the Free Software Foundation; either version 2 of the License, or<br>+ * (at your option) any later version.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#include <console/console.h><br>+#include <nhlt.h><br>+#include <soc/nhlt.h><br>+<br>+static const struct nhlt_tdm_config tdm_config = {<br>+    .virtual_slot = 0,<br>+   .config_type = NHLT_TDM_BASIC,<br>+};<br>+<br>+static const struct nhlt_format_config da7219_formats[] = {<br>+ /* 48 KHz 24-bits per sample. */<br>+     {<br>+            .num_channels = 2,<br>+           .sample_freq_khz = 48,<br>+               .container_bits_per_sample = 32,<br>+             .valid_bits_per_sample = 24,<br>+         .settings_file = "dialog-2ch-48khz-24b.bin",<br>+       },<br>+};<br>+<br>+static const struct nhlt_endp_descriptor da7219_descriptors[] = {<br>+       /* Render Endpoint */<br>+        {<br>+            .link = NHLT_LINK_SSP,<br>+               .device = NHLT_SSP_DEV_I2S,<br>+          .direction = NHLT_DIR_RENDER,<br>+                .vid = NHLT_VID,<br>+             .did = NHLT_DID_SSP,<br>+         .cfg = &tdm_config,<br>+              .cfg_size = sizeof(tdm_config),<br>+              .formats = da7219_formats,<br>+           .num_formats = ARRAY_SIZE(da7219_formats),<br>+   },<br>+   /* Capture Endpoint */<br>+       {<br>+            .link = NHLT_LINK_SSP,<br>+               .device = NHLT_SSP_DEV_I2S,<br>+          .direction = NHLT_DIR_CAPTURE,<br>+               .vid = NHLT_VID,<br>+             .did = NHLT_DID_SSP,<br>+         .cfg = &tdm_config,<br>+              .cfg_size = sizeof(tdm_config),<br>+              .formats = da7219_formats,<br>+           .num_formats = ARRAY_SIZE(da7219_formats),<br>+   },<br>+};<br>+<br>+int nhlt_soc_add_da7219(struct nhlt *nhlt, int hwlink)<br>+{<br>+      /* Virtual bus id of SSP links are the hardware port ids proper. */<br>+  return nhlt_add_ssp_endpoints(nhlt, hwlink, da7219_descriptors,<br>+                                      ARRAY_SIZE(da7219_descriptors));<br>+}<br></pre><p>To view, visit <a href="https://review.coreboot.org/22324">change 22324</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/22324"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I57b88873f1c59c8aadf8eec3c80a9d95165a2cc3 </div>
<div style="display:none"> Gerrit-Change-Number: 22324 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Naveen Manohar <naveen.m@intel.com> </div>
<div style="display:none"> Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi@intel.com> </div>