Message ID | 20200110222530.30303-4-pierre-louis.bossart@linux.intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 4313dd3efe5751238f85dd7069bee3a8bbcdbe2f |
Headers | show |
Series | ASoC: soc-acpi: add support for SoundWire-based machines | expand |
Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a): > From: Bard Liao <yung-chuan.liao@linux.intel.com> > > The two configurations are with the Realtek 3-in-1 board requiring all > 4 links to be enabled, or basic configuration with the on-board RT700 > using link0. > > Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> > Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Hi, I just looking to this code and I miss the Kconfig selection for RT codecs in the SOF SDW driver. How we can enable this driver without selecting SND_SOC_ALL_CODECS ? I believe that those changes should be in sync with the machine description. Thanks, Jaroslav
On 3/10/20 5:12 PM, Jaroslav Kysela wrote: > Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a): >> From: Bard Liao <yung-chuan.liao@linux.intel.com> >> >> The two configurations are with the Realtek 3-in-1 board requiring all >> 4 links to be enabled, or basic configuration with the on-board RT700 >> using link0. >> >> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> >> Signed-off-by: Pierre-Louis Bossart >> <pierre-louis.bossart@linux.intel.com> > > Hi, > > I just looking to this code and I miss the Kconfig selection for RT > codecs in the SOF SDW driver. How we can enable this driver without > selecting SND_SOC_ALL_CODECS ? > > I believe that those changes should be in sync with the machine > description. Sorry Jaroslav, I don't fully understand your question. These tables are just used to a) select a firmware file b) select a topology file c) select a machine driver. The codec selections are not made in this module but handled by the machine drivers in sound/soc/intel/boards/. It's the same mechanism as for all other machine drivers. One caveat is that the SOF parts and machine drivers for SoundWire have not been provided upstream just yet, since they would not build without patches in drivers/soundwire. GregKH mentioned the patches are 'sane' and provided his Reviewed-by tag. Vinod Koul still has objections to our proposals but has yet to make proposals that would work for Intel, so if you need SoundWire support in the near-term you will need to have a conversation with Vinod. The code is ready and fully-tested. If you want to look at the machine drivers for SOF+Realtek drivers, see https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c and the Kconfig that selects the relevant codec drivers is here: https://github.com/thesofproject/linux/blob/d05959d5021cefbbd841773ee25f6c7387e6bfd9/sound/soc/intel/boards/Kconfig#L556 Hope this helps -Pierre
Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a): > > > On 3/10/20 5:12 PM, Jaroslav Kysela wrote: >> Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a): >>> From: Bard Liao <yung-chuan.liao@linux.intel.com> >>> >>> The two configurations are with the Realtek 3-in-1 board requiring all >>> 4 links to be enabled, or basic configuration with the on-board RT700 >>> using link0. >>> >>> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> >>> Signed-off-by: Pierre-Louis Bossart >>> <pierre-louis.bossart@linux.intel.com> >> >> Hi, >> >> I just looking to this code and I miss the Kconfig selection for RT >> codecs in the SOF SDW driver. How we can enable this driver without >> selecting SND_SOC_ALL_CODECS ? >> >> I believe that those changes should be in sync with the machine >> description. > > Sorry Jaroslav, I don't fully understand your question. > > These tables are just used to > a) select a firmware file > b) select a topology file > c) select a machine driver. > > The codec selections are not made in this module but handled by the > machine drivers in sound/soc/intel/boards/. It's the same mechanism as > for all other machine drivers. > > One caveat is that the SOF parts and machine drivers for SoundWire have > not been provided upstream just yet, since they would not build without > patches in drivers/soundwire. GregKH mentioned the patches are 'sane' > and provided his Reviewed-by tag. Vinod Koul still has objections to our > proposals but has yet to make proposals that would work for Intel, so if > you need SoundWire support in the near-term you will need to have a > conversation with Vinod. The code is ready and fully-tested. > > If you want to look at the machine drivers for SOF+Realtek drivers, see > > https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c > > and the Kconfig that selects the relevant codec drivers is here: > > https://github.com/thesofproject/linux/blob/d05959d5021cefbbd841773ee25f6c7387e6bfd9/sound/soc/intel/boards/Kconfig#L556 Ohh, it explains all. I was looking for the 'select SND_SOC_RT711_SDW' lines in Kconfig. It's really bad to merge those pieces randomly to the ASoC tree, because this code in the patch is dead without the machine driver code. Vinod, any ETA? It seems that the Intel's soundwire hardware is reaching the market. Thanks for the clarification, Jaroslav
On 11-03-20, 07:39, Jaroslav Kysela wrote: > Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a): > > > > > > On 3/10/20 5:12 PM, Jaroslav Kysela wrote: > > > Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a): > > > > From: Bard Liao <yung-chuan.liao@linux.intel.com> > > > > > > > > The two configurations are with the Realtek 3-in-1 board requiring all > > > > 4 links to be enabled, or basic configuration with the on-board RT700 > > > > using link0. > > > > > > > > Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> > > > > Signed-off-by: Pierre-Louis Bossart > > > > <pierre-louis.bossart@linux.intel.com> > > > > > > Hi, > > > > > > I just looking to this code and I miss the Kconfig selection for RT > > > codecs in the SOF SDW driver. How we can enable this driver without > > > selecting SND_SOC_ALL_CODECS ? > > > > > > I believe that those changes should be in sync with the machine > > > description. > > > > Sorry Jaroslav, I don't fully understand your question. > > > > These tables are just used to > > a) select a firmware file > > b) select a topology file > > c) select a machine driver. > > > > The codec selections are not made in this module but handled by the > > machine drivers in sound/soc/intel/boards/. It's the same mechanism as > > for all other machine drivers. > > > > One caveat is that the SOF parts and machine drivers for SoundWire have > > not been provided upstream just yet, since they would not build without > > patches in drivers/soundwire. GregKH mentioned the patches are 'sane' > > and provided his Reviewed-by tag. Vinod Koul still has objections to our > > proposals but has yet to make proposals that would work for Intel, so if > > you need SoundWire support in the near-term you will need to have a > > conversation with Vinod. The code is ready and fully-tested. > > > > If you want to look at the machine drivers for SOF+Realtek drivers, see > > > > https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c > > > > and the Kconfig that selects the relevant codec drivers is here: > > > > https://github.com/thesofproject/linux/blob/d05959d5021cefbbd841773ee25f6c7387e6bfd9/sound/soc/intel/boards/Kconfig#L556 > > Ohh, it explains all. I was looking for the 'select SND_SOC_RT711_SDW' lines > in Kconfig. It's really bad to merge those pieces randomly to the ASoC tree, > because this code in the patch is dead without the machine driver code. > > Vinod, any ETA? It seems that the Intel's soundwire hardware is reaching the > market. That would be question for Pierre, I no longer work for Intel.
On 3/11/20 4:07 AM, Vinod Koul wrote: > On 11-03-20, 07:39, Jaroslav Kysela wrote: >> Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a): >>> >>> >>> On 3/10/20 5:12 PM, Jaroslav Kysela wrote: >>>> Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a): >>>>> From: Bard Liao <yung-chuan.liao@linux.intel.com> >>>>> >>>>> The two configurations are with the Realtek 3-in-1 board requiring all >>>>> 4 links to be enabled, or basic configuration with the on-board RT700 >>>>> using link0. >>>>> >>>>> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> >>>>> Signed-off-by: Pierre-Louis Bossart >>>>> <pierre-louis.bossart@linux.intel.com> >>>> >>>> Hi, >>>> >>>> I just looking to this code and I miss the Kconfig selection for RT >>>> codecs in the SOF SDW driver. How we can enable this driver without >>>> selecting SND_SOC_ALL_CODECS ? >>>> >>>> I believe that those changes should be in sync with the machine >>>> description. >>> >>> Sorry Jaroslav, I don't fully understand your question. >>> >>> These tables are just used to >>> a) select a firmware file >>> b) select a topology file >>> c) select a machine driver. >>> >>> The codec selections are not made in this module but handled by the >>> machine drivers in sound/soc/intel/boards/. It's the same mechanism as >>> for all other machine drivers. >>> >>> One caveat is that the SOF parts and machine drivers for SoundWire have >>> not been provided upstream just yet, since they would not build without >>> patches in drivers/soundwire. GregKH mentioned the patches are 'sane' >>> and provided his Reviewed-by tag. Vinod Koul still has objections to our >>> proposals but has yet to make proposals that would work for Intel, so if >>> you need SoundWire support in the near-term you will need to have a >>> conversation with Vinod. The code is ready and fully-tested. >>> >>> If you want to look at the machine drivers for SOF+Realtek drivers, see >>> >>> https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c >>> >>> and the Kconfig that selects the relevant codec drivers is here: >>> >>> https://github.com/thesofproject/linux/blob/d05959d5021cefbbd841773ee25f6c7387e6bfd9/sound/soc/intel/boards/Kconfig#L556 >> >> Ohh, it explains all. I was looking for the 'select SND_SOC_RT711_SDW' lines >> in Kconfig. It's really bad to merge those pieces randomly to the ASoC tree, >> because this code in the patch is dead without the machine driver code. >> >> Vinod, any ETA? It seems that the Intel's soundwire hardware is reaching the >> market. > > That would be question for Pierre, I no longer work for Intel. We don't discuss product schedules or releases here. The question was "any ETA to start merging Intel patches"...
On 11-03-20, 09:47, Pierre-Louis Bossart wrote: > On 3/11/20 4:07 AM, Vinod Koul wrote: > > On 11-03-20, 07:39, Jaroslav Kysela wrote: > > > Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a): > > > > > > > > > > > > On 3/10/20 5:12 PM, Jaroslav Kysela wrote: > > > > > Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a): > > > > > > From: Bard Liao <yung-chuan.liao@linux.intel.com> > > > > > > > > > > > > The two configurations are with the Realtek 3-in-1 board requiring all > > > > > > 4 links to be enabled, or basic configuration with the on-board RT700 > > > > > > using link0. > > > > > > > > > > > > Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> > > > > > > Signed-off-by: Pierre-Louis Bossart > > > > > > <pierre-louis.bossart@linux.intel.com> > > > > > > > > > > Hi, > > > > > > > > > > I just looking to this code and I miss the Kconfig selection for RT > > > > > codecs in the SOF SDW driver. How we can enable this driver without > > > > > selecting SND_SOC_ALL_CODECS ? > > > > > > > > > > I believe that those changes should be in sync with the machine > > > > > description. > > > > > > > > Sorry Jaroslav, I don't fully understand your question. > > > > > > > > These tables are just used to > > > > a) select a firmware file > > > > b) select a topology file > > > > c) select a machine driver. > > > > > > > > The codec selections are not made in this module but handled by the > > > > machine drivers in sound/soc/intel/boards/. It's the same mechanism as > > > > for all other machine drivers. > > > > > > > > One caveat is that the SOF parts and machine drivers for SoundWire have > > > > not been provided upstream just yet, since they would not build without > > > > patches in drivers/soundwire. GregKH mentioned the patches are 'sane' > > > > and provided his Reviewed-by tag. Vinod Koul still has objections to our > > > > proposals but has yet to make proposals that would work for Intel, so if > > > > you need SoundWire support in the near-term you will need to have a > > > > conversation with Vinod. The code is ready and fully-tested. > > > > > > > > If you want to look at the machine drivers for SOF+Realtek drivers, see > > > > > > > > https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c > > > > > > > > and the Kconfig that selects the relevant codec drivers is here: > > > > > > > > https://github.com/thesofproject/linux/blob/d05959d5021cefbbd841773ee25f6c7387e6bfd9/sound/soc/intel/boards/Kconfig#L556 > > > > > > Ohh, it explains all. I was looking for the 'select SND_SOC_RT711_SDW' lines > > > in Kconfig. It's really bad to merge those pieces randomly to the ASoC tree, > > > because this code in the patch is dead without the machine driver code. > > > > > > Vinod, any ETA? It seems that the Intel's soundwire hardware is reaching the > > > market. > > > > That would be question for Pierre, I no longer work for Intel. > > We don't discuss product schedules or releases here. > > The question was "any ETA to start merging Intel patches"... Ah, sorry I missed that part, but again that is for Pierre to answer. Am ready to merge if the series satisfies all the questions :)
>> The question was "any ETA to start merging Intel patches"... > > Ah, sorry I missed that part, but again that is for Pierre to answer. Am > ready to merge if the series satisfies all the questions :) The ball is in your court Vinod. I replied to all your suggestions and showed they cannot possibly be implemented without functionality loss or re-inventing pm_runtime. Just to rehash the same thing, for ASoC integration a device needs to have a struct driver with a .name set, and for power management a device needs a struct driver with the pm_ops set. So you have two alternatives to choose from, see my email from last Friday.
On 13-03-20, 11:28, Pierre-Louis Bossart wrote: > > > > The question was "any ETA to start merging Intel patches"... > > > > Ah, sorry I missed that part, but again that is for Pierre to answer. Am > > ready to merge if the series satisfies all the questions :) > > The ball is in your court Vinod. I replied to all your suggestions and > showed they cannot possibly be implemented without functionality loss or > re-inventing pm_runtime. Sorry to disagree, I would not like to see Intel specific change in core. That is my only premise. Would you have this issue if you had a standalone sdw controller(s) ?
diff --git a/sound/soc/intel/common/soc-acpi-intel-icl-match.c b/sound/soc/intel/common/soc-acpi-intel-icl-match.c index 38977669b576..67e9da4635f2 100644 --- a/sound/soc/intel/common/soc-acpi-intel-icl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-icl-match.c @@ -33,5 +33,103 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = { }; EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines); +static const u64 rt700_0_adr[] = { + 0x000010025D070000 +}; + +static const struct snd_soc_acpi_link_adr icl_rvp[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt700_0_adr), + .adr = rt700_0_adr, + }, + {} +}; + +static const u64 rt711_0_adr[] = { + 0x000010025D071100 +}; + +static const u64 rt1308_1_adr[] = { + 0x000110025D130800 +}; + +static const u64 rt1308_2_adr[] = { + 0x000210025D130800 +}; + +static const u64 rt715_3_adr[] = { + 0x000310025D715000 +}; + +static const struct snd_soc_acpi_link_adr icl_3_in_1_default[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt711_0_adr), + .adr = rt711_0_adr, + }, + { + .mask = BIT(1), + .num_adr = ARRAY_SIZE(rt1308_1_adr), + .adr = rt1308_1_adr, + }, + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt1308_2_adr), + .adr = rt1308_2_adr, + }, + { + .mask = BIT(3), + .num_adr = ARRAY_SIZE(rt715_3_adr), + .adr = rt715_3_adr, + }, + {} +}; + +static const struct snd_soc_acpi_link_adr icl_3_in_1_mono_amp[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt711_0_adr), + .adr = rt711_0_adr, + }, + { + .mask = BIT(1), + .num_adr = ARRAY_SIZE(rt1308_1_adr), + .adr = rt1308_1_adr, + }, + { + .mask = BIT(3), + .num_adr = ARRAY_SIZE(rt715_3_adr), + .adr = rt715_3_adr, + }, + {} +}; + +struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[] = { + { + .link_mask = 0xF, /* 4 active links required */ + .links = icl_3_in_1_default, + .drv_name = "sdw_rt711_rt1308_rt715", + .sof_fw_filename = "sof-icl.ri", + .sof_tplg_filename = "sof-icl-rt711-rt1308-rt715.tplg", + }, + { + .link_mask = 0xB, /* 3 active links required */ + .links = icl_3_in_1_mono_amp, + .drv_name = "sdw_rt711_rt1308_rt715", + .sof_fw_filename = "sof-icl.ri", + .sof_tplg_filename = "sof-icl-rt711-rt1308-rt715-mono.tplg", + }, + { + .link_mask = 0x1, /* rt700 connected on link0 */ + .links = icl_rvp, + .drv_name = "sdw_rt700", + .sof_fw_filename = "sof-icl.ri", + .sof_tplg_filename = "sof-icl-rt700.tplg", + }, + {}, +}; +EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_sdw_machines); + MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Intel Common ACPI Match module");