Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/sof_sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ static int create_echoref_dailink(struct snd_soc_card *card,
* fe <-> be connection for loopback capture for echo reference
*/
ret = asoc_sdw_init_simple_dai_link(dev, *dai_links, be_id, name,
0, 1, "snd-soc-dummy-dai", "dummy",
0, 1, "Loopback Virtual Pin", "dummy",
snd_soc_dummy_dlc.name, snd_soc_dummy_dlc.dai_name,
1, NULL, NULL);
if (ret)
Expand Down
22 changes: 20 additions & 2 deletions sound/soc/sof/intel/hda-dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,22 @@ static const struct hda_dai_widget_dma_ops *
hda_dai_get_ops(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai)
{
struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(cpu_dai, substream->stream);
struct snd_sof_widget *swidget = w->dobj.private;
struct snd_sof_widget *swidget;
struct snd_sof_dev *sdev;
struct snd_sof_dai *sdai;

sdev = widget_to_sdev(w);
/*
* this is unlikely if the topology and the machine driver DAI links match.
* But if there's a missing DAI link in topology, this will prevent a NULL pointer
* dereference later on.
*/
if (!w) {
dev_err(cpu_dai->dev, "%s: widget is NULL\n", __func__);
return NULL;
}

sdev = widget_to_sdev(w);
swidget = w->dobj.private;
if (!swidget) {
dev_err(sdev->dev, "%s: swidget is NULL\n", __func__);
return NULL;
Expand Down Expand Up @@ -856,6 +866,14 @@ struct snd_soc_dai_driver skl_dai[] = {
.channels_max = 4,
},
},
{
/* Virtual CPU DAI for Echo reference */
.name = "Loopback Virtual Pin",
.capture = {
.channels_min = 1,
.channels_max = 2,
},
},
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
{
.name = "iDisp1 Pin",
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sof/intel/hda.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,10 @@
(HDA_DSP_BDL_SIZE / sizeof(struct sof_intel_dsp_bdl))

/* Number of DAIs */
#define SOF_SKL_NUM_DAIS_NOCODEC 8
#define SOF_SKL_NUM_DAIS_NOCODEC 9

#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
#define SOF_SKL_NUM_DAIS 15
#define SOF_SKL_NUM_DAIS 16
#else
#define SOF_SKL_NUM_DAIS SOF_SKL_NUM_DAIS_NOCODEC
#endif
Expand Down
Loading