Message ID | 20190906194636.217881-7-cujomalainey@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add Samus Hotwording for RT5677 | expand |
Hi Curtis > From: Ben Zhang <benzh@chromium.org> > > This link is needed for the RT5677 DSP to do hotwording > > Signed-off-by: Ben Zhang <benzh@chromium.org> > Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> > --- (snip) > +/* Wake on voice interface */ > +SND_SOC_DAILINK_DEF(fe_dsp, > + DAILINK_COMP_ARRAY(COMP_CPU("spi-RT5677AA:00"))); > + > +SND_SOC_DAILINK_DEF(platform_dsp, > + DAILINK_COMP_ARRAY(COMP_PLATFORM("spi-RT5677AA:00"))); > + > +SND_SOC_DAILINK_DEF(be_dsp, > + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-RT5677CE:00", "rt5677-dspbuffer"))); > + (snip) > + /* Non-DPCM links */ > + { > + .name = "Codec DSP", > + .stream_name = "Wake on Voice", > + SND_SOC_DAILINK_REG(fe_dsp, be_dsp, platform_dsp), > + }, If you don't need to re-use CPU/Codec/Platform definition, I guess you can use more short version? SND_SOC_DAILINK_DEFS(dsp, DAILINK_COMP_ARRAY(COMP_CPU("spi-RT5677AA:00")), DAILINK_COMP_ARRAY(COMP_CODEC("i2c-RT5677CE:00", "rt5677-dspbuffer")), DAILINK_COMP_ARRAY(COMP_PLATFORM("spi-RT5677AA:00"))); struct snd_soc_dai_link link = { ... SND_SOC_DAILINK_REG(dsp), };
On Sun, Sep 8, 2019 at 5:18 PM Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote: > > > Hi Curtis > > > From: Ben Zhang <benzh@chromium.org> > > > > This link is needed for the RT5677 DSP to do hotwording > > > > Signed-off-by: Ben Zhang <benzh@chromium.org> > > Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> > > --- > (snip) > > +/* Wake on voice interface */ > > +SND_SOC_DAILINK_DEF(fe_dsp, > > + DAILINK_COMP_ARRAY(COMP_CPU("spi-RT5677AA:00"))); > > + > > +SND_SOC_DAILINK_DEF(platform_dsp, > > + DAILINK_COMP_ARRAY(COMP_PLATFORM("spi-RT5677AA:00"))); > > + > > +SND_SOC_DAILINK_DEF(be_dsp, > > + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-RT5677CE:00", "rt5677-dspbuffer"))); > > + > (snip) > > + /* Non-DPCM links */ > > + { > > + .name = "Codec DSP", > > + .stream_name = "Wake on Voice", > > + SND_SOC_DAILINK_REG(fe_dsp, be_dsp, platform_dsp), > > + }, > > If you don't need to re-use CPU/Codec/Platform definition, > I guess you can use more short version? > > SND_SOC_DAILINK_DEFS(dsp, > DAILINK_COMP_ARRAY(COMP_CPU("spi-RT5677AA:00")), > DAILINK_COMP_ARRAY(COMP_CODEC("i2c-RT5677CE:00", "rt5677-dspbuffer")), > DAILINK_COMP_ARRAY(COMP_PLATFORM("spi-RT5677AA:00"))); > > struct snd_soc_dai_link link = { > ... > SND_SOC_DAILINK_REG(dsp), > }; > Updated, thanks!
diff --git a/sound/soc/intel/boards/bdw-rt5677.c b/sound/soc/intel/boards/bdw-rt5677.c index 4a4d3353e26d..a02622fae035 100644 --- a/sound/soc/intel/boards/bdw-rt5677.c +++ b/sound/soc/intel/boards/bdw-rt5677.c @@ -74,6 +74,7 @@ static const struct snd_soc_dapm_route bdw_rt5677_map[] = { /* CODEC BE connections */ {"SSP0 CODEC IN", NULL, "AIF1 Capture"}, {"AIF1 Playback", NULL, "SSP0 CODEC OUT"}, + {"DSP Capture", NULL, "DSP Buffer"}, }; static const struct snd_kcontrol_new bdw_rt5677_controls[] = { @@ -258,6 +259,16 @@ SND_SOC_DAILINK_DEF(platform, SND_SOC_DAILINK_DEF(be, DAILINK_COMP_ARRAY(COMP_CODEC("i2c-RT5677CE:00", "rt5677-aif1"))); +/* Wake on voice interface */ +SND_SOC_DAILINK_DEF(fe_dsp, + DAILINK_COMP_ARRAY(COMP_CPU("spi-RT5677AA:00"))); + +SND_SOC_DAILINK_DEF(platform_dsp, + DAILINK_COMP_ARRAY(COMP_PLATFORM("spi-RT5677AA:00"))); + +SND_SOC_DAILINK_DEF(be_dsp, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-RT5677CE:00", "rt5677-dspbuffer"))); + static struct snd_soc_dai_link bdw_rt5677_dais[] = { /* Front End DAI links */ { @@ -276,6 +287,13 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = { SND_SOC_DAILINK_REG(fe, dummy, platform), }, + /* Non-DPCM links */ + { + .name = "Codec DSP", + .stream_name = "Wake on Voice", + SND_SOC_DAILINK_REG(fe_dsp, be_dsp, platform_dsp), + }, + /* Back End DAI links */ { /* SSP0 - Codec */