* [alsa-devel] [PATCH] ASoC: bdw-rt5677: add spi driver compile switches
@ 2020-01-03 23:34 Curtis Malainey
2020-01-04 2:29 ` Pierre-Louis Bossart
0 siblings, 1 reply; 3+ messages in thread
From: Curtis Malainey @ 2020-01-03 23:34 UTC (permalink / raw)
To: alsa-devel
Cc: Cezary Rojewski, Kuninori Morimoto, Ben Zhang, Jie Yang,
Takashi Iwai, Pan Xiuli, Pierre-Louis Bossart, Liam Girdwood,
Alexios Zavras, Mark Brown, Greg Kroah-Hartman, Curtis Malainey,
Thomas Gleixner
If the SPI driver is not compiled in then the RT5677_SPI driver will not
be included as well which will cause the bdw-rt5677 driver to fail to
probe since the DSP components are managed by the RT5677_SPI driver. The
solution is to remove them when the driver is not present as part of the
build.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
CC: Pan Xiuli <xiuli.pan@linux.intel.com>
---
sound/soc/intel/boards/bdw-rt5677.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/intel/boards/bdw-rt5677.c b/sound/soc/intel/boards/bdw-rt5677.c
index 2af8e5a62da84..d5ded2c545d2c 100644
--- a/sound/soc/intel/boards/bdw-rt5677.c
+++ b/sound/soc/intel/boards/bdw-rt5677.c
@@ -74,11 +74,13 @@ 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"},
+#if IS_ENABLED(CONFIG_SND_SOC_RT5677_SPI)
{"DSP Capture", NULL, "DSP Buffer"},
/* DSP Clock Connections */
{ "DSP Buffer", NULL, "SSP0 CODEC IN" },
{ "SSP0 CODEC IN", NULL, "DSPTX" },
+#endif
};
static const struct snd_kcontrol_new bdw_rt5677_controls[] = {
@@ -319,6 +321,7 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = {
SND_SOC_DAILINK_REG(fe, dummy, platform),
},
+#if IS_ENABLED(CONFIG_SND_SOC_RT5677_SPI)
/* Non-DPCM links */
{
.name = "Codec DSP",
@@ -326,6 +329,7 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = {
.ops = &bdw_rt5677_dsp_ops,
SND_SOC_DAILINK_REG(dsp),
},
+#endif
/* Back End DAI links */
{
--
2.24.1.735.g03f4e72817-goog
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [alsa-devel] [PATCH] ASoC: bdw-rt5677: add spi driver compile switches
2020-01-03 23:34 [alsa-devel] [PATCH] ASoC: bdw-rt5677: add spi driver compile switches Curtis Malainey
@ 2020-01-04 2:29 ` Pierre-Louis Bossart
2020-01-06 20:27 ` Curtis Malainey
0 siblings, 1 reply; 3+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-04 2:29 UTC (permalink / raw)
To: Curtis Malainey, alsa-devel
Cc: Cezary Rojewski, Kuninori Morimoto, Ben Zhang, Pan Xiuli,
Jie Yang, Takashi Iwai, Liam Girdwood, Alexios Zavras,
Mark Brown, Greg Kroah-Hartman, Thomas Gleixner
On 1/3/20 5:34 PM, Curtis Malainey wrote:
> If the SPI driver is not compiled in then the RT5677_SPI driver will not
> be included as well which will cause the bdw-rt5677 driver to fail to
> probe since the DSP components are managed by the RT5677_SPI driver. The
> solution is to remove them when the driver is not present as part of the
> build.
it should be the other way around, this machine driver should have a
dependency on SPI and select RT5677_SPI?
That said, even with this fix, I still see issues, somehow the
spi-RT5677AA component does not probe/register, see
https://github.com/thesofproject/linux/pull/1659
There must be an additional issue with SPI support here.
>
> Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> CC: Pan Xiuli <xiuli.pan@linux.intel.com>
> ---
> sound/soc/intel/boards/bdw-rt5677.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/sound/soc/intel/boards/bdw-rt5677.c b/sound/soc/intel/boards/bdw-rt5677.c
> index 2af8e5a62da84..d5ded2c545d2c 100644
> --- a/sound/soc/intel/boards/bdw-rt5677.c
> +++ b/sound/soc/intel/boards/bdw-rt5677.c
> @@ -74,11 +74,13 @@ 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"},
> +#if IS_ENABLED(CONFIG_SND_SOC_RT5677_SPI)
> {"DSP Capture", NULL, "DSP Buffer"},
>
> /* DSP Clock Connections */
> { "DSP Buffer", NULL, "SSP0 CODEC IN" },
> { "SSP0 CODEC IN", NULL, "DSPTX" },
> +#endif
> };
>
> static const struct snd_kcontrol_new bdw_rt5677_controls[] = {
> @@ -319,6 +321,7 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = {
> SND_SOC_DAILINK_REG(fe, dummy, platform),
> },
>
> +#if IS_ENABLED(CONFIG_SND_SOC_RT5677_SPI)
> /* Non-DPCM links */
> {
> .name = "Codec DSP",
> @@ -326,6 +329,7 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = {
> .ops = &bdw_rt5677_dsp_ops,
> SND_SOC_DAILINK_REG(dsp),
> },
> +#endif
>
> /* Back End DAI links */
> {
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [alsa-devel] [PATCH] ASoC: bdw-rt5677: add spi driver compile switches
2020-01-04 2:29 ` Pierre-Louis Bossart
@ 2020-01-06 20:27 ` Curtis Malainey
0 siblings, 0 replies; 3+ messages in thread
From: Curtis Malainey @ 2020-01-06 20:27 UTC (permalink / raw)
To: Pierre-Louis Bossart
Cc: Cezary Rojewski, Kuninori Morimoto, Ben Zhang, Jie Yang,
Takashi Iwai, Pan Xiuli, ALSA development, Liam Girdwood,
Alexios Zavras, Mark Brown, Greg Kroah-Hartman, Curtis Malainey,
Thomas Gleixner
On Fri, Jan 3, 2020 at 6:29 PM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
>
>
>
> On 1/3/20 5:34 PM, Curtis Malainey wrote:
> > If the SPI driver is not compiled in then the RT5677_SPI driver will not
> > be included as well which will cause the bdw-rt5677 driver to fail to
> > probe since the DSP components are managed by the RT5677_SPI driver. The
> > solution is to remove them when the driver is not present as part of the
> > build.
>
> it should be the other way around, this machine driver should have a
> dependency on SPI and select RT5677_SPI?
>
> That said, even with this fix, I still see issues, somehow the
> spi-RT5677AA component does not probe/register, see
> https://github.com/thesofproject/linux/pull/1659
>
> There must be an additional issue with SPI support here.
>
Good point, we should select the dependencies. I commented on your bug
as to what the issue might be.
> >
> > Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
> > Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> > CC: Pan Xiuli <xiuli.pan@linux.intel.com>
> > ---
> > sound/soc/intel/boards/bdw-rt5677.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/sound/soc/intel/boards/bdw-rt5677.c b/sound/soc/intel/boards/bdw-rt5677.c
> > index 2af8e5a62da84..d5ded2c545d2c 100644
> > --- a/sound/soc/intel/boards/bdw-rt5677.c
> > +++ b/sound/soc/intel/boards/bdw-rt5677.c
> > @@ -74,11 +74,13 @@ 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"},
> > +#if IS_ENABLED(CONFIG_SND_SOC_RT5677_SPI)
> > {"DSP Capture", NULL, "DSP Buffer"},
> >
> > /* DSP Clock Connections */
> > { "DSP Buffer", NULL, "SSP0 CODEC IN" },
> > { "SSP0 CODEC IN", NULL, "DSPTX" },
> > +#endif
> > };
> >
> > static const struct snd_kcontrol_new bdw_rt5677_controls[] = {
> > @@ -319,6 +321,7 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = {
> > SND_SOC_DAILINK_REG(fe, dummy, platform),
> > },
> >
> > +#if IS_ENABLED(CONFIG_SND_SOC_RT5677_SPI)
> > /* Non-DPCM links */
> > {
> > .name = "Codec DSP",
> > @@ -326,6 +329,7 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = {
> > .ops = &bdw_rt5677_dsp_ops,
> > SND_SOC_DAILINK_REG(dsp),
> > },
> > +#endif
> >
> > /* Back End DAI links */
> > {
> >
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-06 20:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03 23:34 [alsa-devel] [PATCH] ASoC: bdw-rt5677: add spi driver compile switches Curtis Malainey
2020-01-04 2:29 ` Pierre-Louis Bossart
2020-01-06 20:27 ` Curtis Malainey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).