summaryrefslogtreecommitdiff
path: root/sound/soc/intel/skylake/skl.c
diff options
context:
space:
mode:
authorRakesh Ughreja <rakesh.a.ughreja@intel.com>2018-08-22 15:25:02 -0500
committerMark Brown <broonie@kernel.org>2018-08-28 20:18:12 +0100
commit00deadb5d86a3c1e691aaa073a8852a198595099 (patch)
treeb2afd6c31824880d5180d98b8cb26e7ab1165ec0 /sound/soc/intel/skylake/skl.c
parent3d17871349d5cec0a37ce9407ba72fdbf8572cfd (diff)
downloadlwn-00deadb5d86a3c1e691aaa073a8852a198595099.tar.gz
lwn-00deadb5d86a3c1e691aaa073a8852a198595099.zip
ASoC: Intel: Skylake: use hda_bus instead of hdac_bus
Use hda_bus instead of hdac_bus in the SKL ASoC platform driver to enable reuse of legacy HDA codec drivers. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake/skl.c')
-rw-r--r--sound/soc/intel/skylake/skl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 3b836125d1de..5f281d443a53 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -33,6 +33,7 @@
#include <sound/hda_register.h>
#include <sound/hdaudio.h>
#include <sound/hda_i915.h>
+#include <sound/hda_codec.h>
#include "skl.h"
#include "skl-sst-dsp.h"
#include "skl-sst-ipc.h"
@@ -673,7 +674,7 @@ static int probe_codec(struct hdac_bus *bus, int addr)
mutex_unlock(&bus->cmd_mutex);
if (res == -1)
return -EIO;
- dev_dbg(bus->dev, "codec #%d probed OK\n", addr);
+ dev_dbg(bus->dev, "codec #%d probed OK: %x\n", addr, res);
hdev = devm_kzalloc(&skl->pci->dev, sizeof(*hdev), GFP_KERNEL);
if (!hdev)
@@ -816,7 +817,7 @@ static int skl_create(struct pci_dev *pci,
{
struct skl *skl;
struct hdac_bus *bus;
-
+ struct hda_bus *hbus;
int err;
*rskl = NULL;
@@ -831,6 +832,7 @@ static int skl_create(struct pci_dev *pci,
return -ENOMEM;
}
+ hbus = skl_to_hbus(skl);
bus = skl_to_bus(skl);
snd_hdac_ext_bus_init(bus, &pci->dev, &bus_core_ops, io_ops, NULL);
bus->use_posbuf = 1;
@@ -838,6 +840,11 @@ static int skl_create(struct pci_dev *pci,
INIT_WORK(&skl->probe_work, skl_probe_work);
bus->bdl_pos_adj = 0;
+ mutex_init(&hbus->prepare_mutex);
+ hbus->pci = pci;
+ hbus->mixer_assigned = -1;
+ hbus->modelname = "sklbus";
+
*rskl = skl;
return 0;