ASoC: Intel: catpt: Dma-transfer fix and couple
Subsystems (3)
Cezary Rojewski
maintainercover ASoC: Intel: catpt: Dma-transfer fix and couple
Set is made of one fix for dma-transfer so that result of dmaengine_submit() is tested before moving on, and few cleanups:
- two non-impactful, where catpt_component_open() layout gets improved slightly as well as relocation of couple of locals found in PCM-functions so that they look more cohesive
- no need to expose catpt-driver board-matching information globally. Most fields are not by it and it's the sole user of haswell_machines table. By having them locally it is clear what is actually being used
Cezary Rojewski (5):
ASoC: Intel: catpt: Test dmaengine_submit() result before moving on
ASoC: Intel: catpt: Reduce size of catpt_component_open()
ASoC: Intel: catpt: Streamline locals declaration for PCM-functions
ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
ASoC: Intel: Drop legacy HSW/BDW board-match information
include/sound/soc-acpi-intel-match.h | 1 - sound/soc/intel/Kconfig | 2 +- sound/soc/intel/catpt/device.c | 33 +++++++++++++++-- sound/soc/intel/catpt/dsp.c | 14 ++++++- sound/soc/intel/catpt/pcm.c | 37 +++++++++---------- .../common/soc-acpi-intel-hsw-bdw-match.c | 16 -------- 6 files changed, 61 insertions(+), 42 deletions(-)
Signature · 1 line
2.25.1
Cezary Rojewski
maintainerPATCH 1/5 ASoC: Intel: catpt: Test dmaengine_submit() result before moving on
After calling dmaengine_submit(), the submitted transfer descriptor belongs to the DMA engine. Pointer to that descriptor may no longer be valid after the call and should be tested before awaiting transfer completion.
--- sound/soc/intel/catpt/dsp.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
sound/soc/intel/catpt/dsp.c +12 -2
@@ -65,6 +65,7 @@ static int catpt_dma_memcpy(struct catpt_dev *cdev, struct dma_chan *chan, {struct dma_async_tx_descriptor *desc;enum dma_status status; +int ret; desc =dmaengine_prep_dma_memcpy (chan, dst_addr, src_addr, size,DMA_CTRL_ACK );
@@ -77,13 +78,22 @@ static int catpt_dma_memcpy(struct catpt_dev *cdev, struct dma_chan *chan,catpt_updatel_shim (cdev,HMDC ,CATPT_HMDC_HDDA (CATPT_DMA_DEVID , chan->chan_id),CATPT_HMDC_HDDA (CATPT_DMA_DEVID , chan->chan_id)); -dmaengine_submit (desc); + + ret =dma_submit_error (dmaengine_submit (desc)); +if (ret) { +dev_err (cdev->dev,"submit tx failed: %d\n" , ret); + goto clear_hdda; + } + status =dma_wait_for_async_tx (desc); + ret = (status ==DMA_COMPLETE ) ?0 : -EPROTO ; + +clear_hdda:/* regardless of status, disable access to HOST memory in demand mode */ catpt_updatel_shim (cdev,HMDC ,CATPT_HMDC_HDDA (CATPT_DMA_DEVID , chan->chan_id),0 ); -return (status ==DMA_COMPLETE ) ?0 : -EPROTO ; +return ret; } int catpt_dma_memcpy_todsp(struct catpt_dev *cdev, struct dma_chan *chan,
Signature · 1 line
2.25.1
Cezary Rojewski
maintainerPATCH 2/5 ASoC: Intel: catpt: Reduce size of catpt_component_open()
In reply to Cezary RojewskiWith some improved if-logy, function's size can be reduced slightly.
--- sound/soc/intel/catpt/pcm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
sound/soc/intel/catpt/pcm.c +2 -3
@@ -595,9 +595,8 @@ static int catpt_component_open(struct snd_soc_component *component, {struct snd_soc_pcm_runtime *rtm = substream->private_data; -if (rtm->dai_link->no_pcm) -return 0 ; -snd_soc_set_runtime_hwparams (substream, &catpt_pcm_hardware); +if (!rtm->dai_link->no_pcm) +snd_soc_set_runtime_hwparams (substream, &catpt_pcm_hardware);return 0 ; }
Signature · 1 line
2.25.1
Cezary Rojewski
maintainerPATCH 3/5 ASoC: Intel: catpt: Streamline locals declaration for PCM-functions
In reply to Cezary RojewskiGroup all the catpt_xxx structs together in PCM related functions so they look more cohesive.
--- sound/soc/intel/catpt/pcm.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
sound/soc/intel/catpt/pcm.c +16 -16
@@ -259,9 +259,9 @@ static enum catpt_channel_config catpt_get_channel_config(u32 num_channels)static int catpt_dai_startup (struct snd_pcm_substream *substream,struct snd_soc_dai *dai) { -struct catpt_dev *cdev =dev_get_drvdata (dai->dev);struct catpt_stream_template *template;struct catpt_stream_runtime *stream; +struct catpt_dev *cdev =dev_get_drvdata (dai->dev);struct resource *res;int ret;
@@ -306,8 +306,8 @@ static int catpt_dai_startup(struct snd_pcm_substream *substream,static void catpt_dai_shutdown (struct snd_pcm_substream *substream,struct snd_soc_dai *dai) { -struct catpt_dev *cdev =dev_get_drvdata (dai->dev);struct catpt_stream_runtime *stream; +struct catpt_dev *cdev =dev_get_drvdata (dai->dev); stream =snd_soc_dai_get_dma_data (dai, substream);
@@ -329,9 +329,9 @@ static int catpt_set_dspvol(struct catpt_dev *cdev, u8 stream_id, long *ctlvol);static int catpt_dai_apply_usettings (struct snd_soc_dai *dai,struct catpt_stream_runtime *stream) { -struct catpt_dev *cdev =dev_get_drvdata (dai->dev);struct snd_soc_component *component = dai->component;struct snd_kcontrol *pos; +struct catpt_dev *cdev =dev_get_drvdata (dai->dev);const char *name;int ret;u32 id = stream->info.stream_hw_id;
@@ -374,12 +374,12 @@ static int catpt_dai_hw_params(struct snd_pcm_substream *substream,struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { - struct catpt_dev *cdev = dev_get_drvdata(dai->dev); + struct snd_pcm_runtime *rtm = substream->runtime; +struct snd_dma_buffer *dmab;struct catpt_stream_runtime *stream;struct catpt_audio_format afmt;struct catpt_ring_info rinfo; -struct snd_pcm_runtime *rtm = substream->runtime; -struct snd_dma_buffer *dmab; +struct catpt_dev *cdev =dev_get_drvdata (dai->dev);int ret; stream =snd_soc_dai_get_dma_data (dai, substream);
@@ -427,8 +427,8 @@ static int catpt_dai_hw_params(struct snd_pcm_substream *substream,static int catpt_dai_hw_free (struct snd_pcm_substream *substream,struct snd_soc_dai *dai) { -struct catpt_dev *cdev =dev_get_drvdata (dai->dev);struct catpt_stream_runtime *stream; +struct catpt_dev *cdev =dev_get_drvdata (dai->dev); stream =snd_soc_dai_get_dma_data (dai, substream);if (!stream->allocated)
@@ -444,8 +444,8 @@ static int catpt_dai_hw_free(struct snd_pcm_substream *substream,static int catpt_dai_prepare (struct snd_pcm_substream *substream,struct snd_soc_dai *dai) { -struct catpt_dev *cdev =dev_get_drvdata (dai->dev);struct catpt_stream_runtime *stream; +struct catpt_dev *cdev =dev_get_drvdata (dai->dev);int ret; stream =snd_soc_dai_get_dma_data (dai, substream);
@@ -467,9 +467,9 @@ static int catpt_dai_prepare(struct snd_pcm_substream *substream,static int catpt_dai_trigger (struct snd_pcm_substream *substream,int cmd,struct snd_soc_dai *dai) { -struct catpt_dev *cdev =dev_get_drvdata (dai->dev); -struct catpt_stream_runtime *stream;struct snd_pcm_runtime *runtime = substream->runtime; +struct catpt_stream_runtime *stream; +struct catpt_dev *cdev =dev_get_drvdata (dai->dev);snd_pcm_uframes_t pos;int ret;
@@ -604,10 +604,10 @@ static snd_pcm_uframes_t catpt_component_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { - struct catpt_dev *cdev = dev_get_drvdata(component->dev); -struct catpt_stream_runtime *stream; struct snd_soc_pcm_runtime *rtm = substream->private_data;struct snd_soc_dai *cpu_dai =asoc_rtd_to_cpu (rtm,0 ); +struct catpt_stream_runtime *stream; +struct catpt_dev *cdev =dev_get_drvdata (component->dev);u32 pos;if (rtm->dai_link->no_pcm)
@@ -632,8 +632,8 @@ static int catpt_dai_pcm_new(struct snd_soc_pcm_runtime *rtm, struct snd_soc_dai *dai) {struct snd_soc_dai *codec_dai =asoc_rtd_to_codec (rtm,0 ); -struct catpt_dev *cdev =dev_get_drvdata (dai->dev);struct catpt_ssp_device_format devfmt; +struct catpt_dev *cdev =dev_get_drvdata (dai->dev);int ret; devfmt.iface = dai->driver->id;
@@ -893,8 +893,8 @@ static int catpt_stream_volume_get(struct snd_kcontrol *kcontrol, {struct snd_soc_component *component =snd_soc_kcontrol_component (kcontrol); -struct catpt_dev *cdev =dev_get_drvdata (component->dev);struct catpt_stream_runtime *stream; +struct catpt_dev *cdev =dev_get_drvdata (component->dev);long *ctlvol = (long *)kcontrol->private_value;u32 dspvol;int i;
@@ -925,8 +925,8 @@ static int catpt_stream_volume_put(struct snd_kcontrol *kcontrol, {struct snd_soc_component *component =snd_soc_kcontrol_component (kcontrol); -struct catpt_dev *cdev =dev_get_drvdata (component->dev);struct catpt_stream_runtime *stream; +struct catpt_dev *cdev =dev_get_drvdata (component->dev);long *ctlvol = (long *)kcontrol->private_value;int ret, i;
@@ -1001,8 +1001,8 @@ static int catpt_loopback_switch_put(struct snd_kcontrol *kcontrol, {struct snd_soc_component *component =snd_soc_kcontrol_component (kcontrol); -struct catpt_dev *cdev =dev_get_drvdata (component->dev);struct catpt_stream_runtime *stream; +struct catpt_dev *cdev =dev_get_drvdata (component->dev);bool mute;int ret;
Signature · 1 line
2.25.1
Cezary Rojewski
maintainerPATCH 4/5 ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
In reply to Cezary Rojewskicatpt-driver does not make use of most of the fields found in the descriptor table and is the sole user of haswell machines list. Move the tables to local directory and clean them up so it's clear what's actually used by the solution.
--- sound/soc/intel/Kconfig | 2 +- sound/soc/intel/catpt/device.c | 33 ++++++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 4 deletions(-)
sound/soc/intel/Kconfig +1 -1
@@ -23,7 +23,7 @@ config SND_SOC_INTEL_CATPT depends on ACPI || COMPILE_TEST depends on DMADEVICES && SND_DMA_SGBUF select DW_DMAC_CORE - select SND_SOC_ACPI_INTEL_MATCH + select SND_SOC_ACPI select WANT_DEV_COREDUMP select SND_INTEL_DSP_CONFIG help
sound/soc/intel/catpt/device.c +30 -3
@@ -22,7 +22,6 @@#include <sound/intel-dsp-config.h> #include <sound/soc.h> #include <sound/soc-acpi.h> -#include <sound/soc-acpi-intel-match.h> #include "core.h" #include "registers.h"
@@ -313,8 +312,36 @@ static int catpt_acpi_remove(struct platform_device *pdev)return 0 ; } +struct snd_soc_acpi_mach lpt_machines[] = { + { + .id ="INT33CA" , + .drv_name ="haswell-audio" , + }, + {} +}; + +struct snd_soc_acpi_mach wpt_machines[] = { + { + .id ="INT343A" , + .drv_name ="broadwell-audio" , + }, + { + .id ="10EC5650" , + .drv_name ="bdw-rt5650" , + }, + { + .id ="RT5677CE" , + .drv_name ="bdw-rt5677" , + }, + { + .id ="INT33CA" , + .drv_name ="haswell-audio" , + }, + {} +}; +static struct catpt_spec lpt_desc = { - .machines = snd_soc_acpi_intel_haswell_machines, + .machines = lpt_machines, .core_id =0x01 , .host_dram_offset =0x000000 , .host_iram_offset =0x080000 ,
@@ -329,7 +356,7 @@ static struct catpt_spec lpt_desc = { };static struct catpt_spec wpt_desc = { - .machines = snd_soc_acpi_intel_broadwell_machines, + .machines = wpt_machines, .core_id =0x02 , .host_dram_offset =0x000000 , .host_iram_offset =0x0A0000 ,
Signature · 1 line
2.25.1
Re: [PATCH 4/5] ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
Quoted 18 lines
sound/soc/intel/catpt/device.c +17
-0+struct snd_soc_acpi_mach lpt_machines[] = { + { + .id ="INT33CA" , + .drv_name ="haswell-audio" , + }, + {} +}; + +struct snd_soc_acpi_mach wpt_machines[] = { + { + .id ="INT343A" , + .drv_name ="broadwell-audio" , + }, + { + .id ="10EC5650" , + .drv_name ="bdw-rt5650" , + },
sound/soc/intel/catpt/device.c static int catpt_acpi_remove(struct platform_device *pdev) · line 341
Quoted 10 lines
sound/soc/intel/catpt/device.c +10
-0+ { + .id = "RT5677CE", + .drv_name = "bdw-rt5677", + }, + { + .id = "INT33CA", + .drv_name = "haswell-audio", + }, + {} +};
The intent of soc-acpi files is to establish a match between ACPI _HID and machine driver, this is now duplicated, and it makes limited sense to add machine driver dependencies in a platform driver.
Nothing was broken with the existing code.
Cezary Rojewski
maintainerRe: [PATCH 4/5] ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
Quoted 5 lines · Pierre-Louis Bossart
The intent of soc-acpi files is to establish a match between ACPI
_HIDand machine driver, this is now duplicated, and it makes limited sense to add machine driver dependencies in a platform driver.Nothing was broken with the existing code.
Hello,
Yes, nothing is broken in the existing code. The intention is different - be cohesive about what is actually used by the driver.
PCI-ids table is duplicated already for the Intel audio drivers. And it's OK to do so - one knows which ids are covered by given driver and how. Here, it's clear that haswell_machines are only used by catpt-driver and so are some fields for broadwell_machines. In time I believe that we will be able to reduce the number of fields for struct snd_soc_acpi_mach i.e. have a single fw_filename and single tplg_filename field without some driver-specific duplicates.
About the last, there could be a case where no topology file is available for certain configuration and given entry should not be taken into account. While catpt-driver does not make use of soc-topology feature, that isn't true for other drivers.
Regards,
Czarek
Re: [PATCH 4/5] ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
Quoted 12 lines · Cezary Rojewski
Quoted 5 lines · Pierre-Louis Bossart
The intent of soc-acpi files is to establish a match between ACPI
_HIDand machine driver, this is now duplicated, and it makes limited sense to add machine driver dependencies in a platform driver.Nothing was broken with the existing code.
Hello,
Yes, nothing is broken in the existing code. The intention is different
- be cohesive about what is actually used by the driver.
Quoted 7 lines
PCI-ids table is duplicated already for the Intel audio drivers. And it's OK to do so - one knows which ids are covered by given driver and how. Here, it's clear that
haswell_machinesare only used by catpt-driver and so are some fields forbroadwell_machines. In time I believe that we will be able to reduce the number of fields for structsnd_soc_acpi_machi.e. have a singlefw_filenameand singletplg_filenamefield without some driver-specific duplicates.
I don't really see the point about the number of fields, this is a generic descriptor used for I2S/SoundWire devices so mechanically there are things are are not used in all platforms.
Another example is the quirks field, it's only meant to be used when there's actually a quirk.
Note that I am planning to remove the sof_fw_filename field since it's redundant with what is part of the PCI descriptor, but the topology will remain there: it has to match with the machine driver.
Quoted 4 lines
About the last, there could be a case where no topology file is available for certain configuration and given entry should not be taken into account. While catpt-driver does not make use of soc-topology feature, that isn't true for other drivers.
Again if a feature is not needed/not supported, the field can remain empty.
Cezary Rojewski
maintainerRe: [PATCH 4/5] ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
On 2021-12-16 4:13 PM, Pierre-Louis Bossart wrote:
...
Quoted 10 lines
I don't really see the point about the number of fields, this is a generic descriptor used for I2S/SoundWire devices so mechanically there are things are are not used in all platforms.
Another example is the quirks field, it's only meant to be used when there's actually a quirk.
Note that I am planning to remove the
sof_fw_filenamefield since it's redundant with what is part of the PCI descriptor, but the topology will remain there: it has to match with the machine driver.
That's why no new struct is declared. Simply the tables are moved locally, and there is nothing wrong with that. Cohesiveness and readability outweighs the duplication of ACPI _HID.
After thinking about this again, perhaps in the future, this generic descriptor should be split into more specific bits e.g.: like the struct pci_driver which wraps struct driver.
i2s_mach = {
// some i2s-specific fields e.g.:
.acpi-id = XXX,
.mach = {
// some generic fields e.g.:
.drv_name = "a machine board name",
},
};Regards,
Czarek
Re: [PATCH 4/5] ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
Quoted 8 lines
Quoted 8 lines
I don't really see the point about the number of fields, this is a generic descriptor used for I2S/SoundWire devices so mechanically there are things are are not used in all platforms.
Another example is the quirks field, it's only meant to be used when there's actually a quirk.
Quoted 7 lines
Quoted 3 lines
Note that I am planning to remove the
sof_fw_filenamefield since it's redundant with what is part of the PCI descriptor, but the topology will remain there: it has to match with the machine driver.That's why no new struct is declared. Simply the tables are moved locally, and there is nothing wrong with that. Cohesiveness and readability outweighs the duplication of ACPI
_HID.
If I follow your logic, I could move all the tables for glk, cnl, cfl, cml, icl, jsl, tgl, ehl, adl into the SOF driver. That really doesn't seem sensible.
Cezary Rojewski
maintainerRe: [PATCH 4/5] ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
Quoted 11 lines · Pierre-Louis Bossart
Quoted 11 lines
Quoted 10 lines
I don't really see the point about the number of fields, this is a generic descriptor used for I2S/SoundWire devices so mechanically there are things are are not used in all platforms.
Another example is the quirks field, it's only meant to be used when there's actually a quirk.
Note that I am planning to remove the
sof_fw_filenamefield since it's redundant with what is part of the PCI descriptor, but the topology will remain there: it has to match with the machine driver.
Quoted 7 lines
Quoted 3 lines
That's why no new struct is declared. Simply the tables are moved locally, and there is nothing wrong with that. Cohesiveness and readability outweighs the duplication of ACPI
_HID.If I follow your logic, I could move all the tables for glk, cnl, cfl, cml, icl, jsl, tgl, ehl, adl into the SOF driver. That really doesn't seem sensible.
Hmm.. doesn't it really? Are the glk/cnl/cfl/cml/icl/jsl/tgl/ehl/adl tables "common" for the Intel audio drivers? There are not used by anything except for SOF. It seems reasonable to have them present locally too. SOF solution becomes more cohesively organized in such case, just like catpt is after this patch.
Regards,
Czarek
Re: [PATCH 4/5] ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
Quoted 22 lines
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
I don't really see the point about the number of fields, this is a generic descriptor used for I2S/SoundWire devices so mechanically there are things are are not used in all platforms.
Another example is the quirks field, it's only meant to be used when there's actually a quirk.
Note that I am planning to remove the
sof_fw_filenamefield since it's redundant with what is part of the PCI descriptor, but the topology will
remain there: it has to match with the machine driver.Quoted 7 lines
Quoted 3 lines
That's why no new struct is declared. Simply the tables are moved locally, and there is nothing wrong with that. Cohesiveness and readability outweighs the duplication of ACPI
_HID.If I follow your logic, I could move all the tables for glk, cnl, cfl, cml, icl, jsl, tgl, ehl, adl into the SOF driver. That really doesn't seem sensible.
Quoted 5 lines
Hmm.. doesn't it really? Are the glk/cnl/cfl/cml/icl/jsl/tgl/ehl/adl tables "common" for the Intel audio drivers? There are not used by anything except for SOF. It seems reasonable to have them present locally too. SOF solution becomes more cohesively organized in such case, just like catpt is after this patch.
We could also move the boards/ while we're at it, on the grounds they are not all used by all drivers.
My take is that unless a new feature is added that warrants moving the tables around, let's keep the existing code as is.
Cezary Rojewski
maintainerRe: [PATCH 4/5] ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
On 2021-12-16 7:04 PM, Pierre-Louis Bossart wrote:
...
Quoted 6 lines
Quoted 5 lines
Hmm.. doesn't it really? Are the glk/cnl/cfl/cml/icl/jsl/tgl/ehl/adl tables "common" for the Intel audio drivers? There are not used by anything except for SOF. It seems reasonable to have them present locally too. SOF solution becomes more cohesively organized in such case, just like catpt is after this patch.
Quoted 6 lines
We could also move the boards/ while we're at it, on the grounds they are not all used by all drivers.
My take is that unless a new feature is added that warrants moving the tables around, let's keep the existing code as is.
I agree with the relocation of the boards! In general, improving the maintainability is worth it, even if it takes a larger number of patches.
Hmm.. avs-driver related boards are kind of an argument in this discussion. I can delay patches 4/5 and 5/5 until they're on the list, no problem.
Mark,
Should I re-send the series as 3, or is it fine as is and simply last two patches could be omitted?
Regards,
Czarek
kernel test robot
build botRe: [PATCH 4/5] ASoC: Intel: catpt: Drop SND_SOC_ACPI_INTEL_MATCH dependency
In reply to Cezary RojewskiI love your patch! Yet something to improve:
Hi Cezary,
I love your patch! Yet something to improve:
[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on tiwai-sound/for-next linus/master v5.16-rc5 next-20211215] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Cezary-Rojewski/ASoC-Intel-catpt-Dma-transfer-fix-and-couple/20211216-195950 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: x86_64-buildonly-randconfig-r003-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171009.7QVDVnji-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/1ad5d0805b19369eabd9476253a94343fe09ce75 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Cezary-Rojewski/ASoC-Intel-catpt-Dma-transfer-fix-and-couple/20211216-195950 git checkout 1ad5d0805b19369eabd9476253a94343fe09ce75 # save the config file to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash sound/soc/
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
>> sound/soc/soc-acpi.c:34:1: error: redefinition of 'snd_soc_acpi_find_machine'
34 | snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sound/soc/soc-acpi.c:9:
include/sound/soc-acpi.h:38:1: note: previous definition of 'snd_soc_acpi_find_machine' was here
38 | snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/soc-acpi.c: In function 'snd_soc_acpi_find_package':
>> sound/soc/soc-acpi.c:64:6: error: implicit declaration of function 'acpi_bus_get_device'; did you mean 'acpi_get_gpe_device'? [-Werror=implicit-function-declaration]
64 | if (acpi_bus_get_device(handle, &adev))
| ^~~~~~~~~~~~~~~~~~~
| acpi_get_gpe_device
>> sound/soc/soc-acpi.c:67:10: error: dereferencing pointer to incomplete type 'struct acpi_device'
67 | if (adev->status.present && adev->status.functional) {
| ^~
>> sound/soc/soc-acpi.c:83:12: error: implicit declaration of function 'acpi_extract_package' [-Werror=implicit-function-declaration]
83 | status = acpi_extract_package(myobj,
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/soc-acpi.c: At top level:
>> sound/soc/soc-acpi.c:98:6: error: redefinition of 'snd_soc_acpi_find_package_from_hid'
98 | bool snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sound/soc/soc-acpi.c:9:
include/sound/soc-acpi.h:44:1: note: previous definition of 'snd_soc_acpi_find_package_from_hid' was here
44 | snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/soc-acpi.c:112:27: error: redefinition of 'snd_soc_acpi_codec_list' 112 | struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from sound/soc/soc-acpi.c:9:
include/sound/soc-acpi.h:51:41: note: previous definition of 'snd_soc_acpi_codec_list' was here
51 | static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/snd_soc_acpi_find_machine +34 sound/soc/soc-acpi.c
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 32
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 33 struct snd_soc_acpi_mach *
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 @34 snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
95f098014815b33 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2015-11-05 35 {
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 36 struct snd_soc_acpi_mach *mach;
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 37 struct snd_soc_acpi_mach *mach_alt;
95f098014815b33 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2015-11-05 38
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 39 for (mach = machines; mach->id[0] || mach->comp_ids; mach++) {
cafa39b650ec3ba sound/soc/soc-acpi.c Brent Lu 2021-10-30 40 if (snd_soc_acpi_id_present(mach)) {
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 41 if (mach->machine_quirk) {
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 42 mach_alt = mach->machine_quirk(mach);
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 43 if (!mach_alt)
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 44 continue; /* not full match, ignore */
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 45 mach = mach_alt;
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 46 }
a3e620f8422832a sound/soc/soc-acpi.c Keyon Jie 2018-11-16 47
7827d66946ad3af sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 48 return mach;
7827d66946ad3af sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 49 }
7827d66946ad3af sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 50 }
95f098014815b33 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2015-11-05 51 return NULL;
95f098014815b33 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2015-11-05 52 }
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 53 EXPORT_SYMBOL_GPL(snd_soc_acpi_find_machine);
8ceffd229f0ef13 sound/soc/intel/common/sst-match-acpi.c Vinod Koul 2016-02-08 54
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 55 static acpi_status snd_soc_acpi_find_package(acpi_handle handle, u32 level,
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 56 void *context, void **ret)
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 57 {
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 58 struct acpi_device *adev;
59ce3233a538fc2 sound/soc/soc-acpi.c Pierre-Louis Bossart 2021-04-16 59 acpi_status status;
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 60 struct snd_soc_acpi_package_context *pkg_ctx = context;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 61
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 62 pkg_ctx->data_valid = false;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 63
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 @64 if (acpi_bus_get_device(handle, &adev))
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 65 return AE_OK;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 66
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 @67 if (adev->status.present && adev->status.functional) {
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 68 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 69 union acpi_object *myobj = NULL;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 70
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 71 status = acpi_evaluate_object_typed(handle, pkg_ctx->name,
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 72 NULL, &buffer,
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 73 ACPI_TYPE_PACKAGE);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 74 if (ACPI_FAILURE(status))
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 75 return AE_OK;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 76
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 77 myobj = buffer.pointer;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 78 if (!myobj || myobj->package.count != pkg_ctx->length) {
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 79 kfree(buffer.pointer);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 80 return AE_OK;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 81 }
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 82
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 @83 status = acpi_extract_package(myobj,
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 84 pkg_ctx->format, pkg_ctx->state);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 85 if (ACPI_FAILURE(status)) {
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 86 kfree(buffer.pointer);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 87 return AE_OK;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 88 }
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 89
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 90 kfree(buffer.pointer);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 91 pkg_ctx->data_valid = true;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 92 return AE_CTRL_TERMINATE;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 93 }
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 94
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 95 return AE_OK;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 96 }
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 97
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 @98 bool snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 99 struct snd_soc_acpi_package_context *ctx)
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 100 {
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 101 acpi_status status;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 102
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 103 status = acpi_get_devices(hid, snd_soc_acpi_find_package, ctx, NULL);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 104
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 105 if (ACPI_FAILURE(status) || !ctx->data_valid)
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 106 return false;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 107
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 108 return true;
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 109 }
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 110 EXPORT_SYMBOL_GPL(snd_soc_acpi_find_package_from_hid);
3421894765a345c sound/soc/intel/common/sst-match-acpi.c Pierre-Louis Bossart 2016-11-12 111
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 @112 struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 113 {
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 114 struct snd_soc_acpi_mach *mach = arg;
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 115 struct snd_soc_acpi_codecs *codec_list =
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 116 (struct snd_soc_acpi_codecs *) mach->quirk_data;
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 117 int i;
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 118
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 119 if (mach->quirk_data == NULL)
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 120 return mach;
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 121
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 122 for (i = 0; i < codec_list->num_codecs; i++) {
0d5ea120abc020f sound/soc/soc-acpi.c Jeremy Cline 2018-01-05 123 if (!acpi_dev_present(codec_list->codecs[i], NULL, -1))
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 124 return NULL;
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 125 }
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 126
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 127 return mach;
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 128 }
7feb2f786a46d34 sound/soc/soc-acpi.c Pierre-Louis Bossart 2017-10-12 129 EXPORT_SYMBOL_GPL(snd_soc_acpi_codec_list);
54746dabf770eb2 sound/soc/intel/common/sst-match-acpi.c Naveen M 2017-05-15 130 ---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Cezary Rojewski
maintainerPATCH 5/5 ASoC: Intel: Drop legacy HSW/BDW board-match information
In reply to Cezary RojewskiWith board-matching information for legacy solution moved to local directory, there is no need to expose it globally.
--- include/sound/soc-acpi-intel-match.h | 1 - .../intel/common/soc-acpi-intel-hsw-bdw-match.c | 16 ---------------- 2 files changed, 17 deletions(-)
include/sound/soc-acpi-intel-match.h +0 -1
@@ -14,7 +14,6 @@* these tables are not constants, some fields can be used for * pdata or machine ops */ -extern struct snd_soc_acpi_mach snd_soc_acpi_intel_haswell_machines[];extern struct snd_soc_acpi_mach snd_soc_acpi_intel_broadwell_machines[];extern struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[];extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[];
sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c +0 -16
@@ -9,44 +9,28 @@#include <sound/soc-acpi.h> #include <sound/soc-acpi-intel-match.h> -struct snd_soc_acpi_mach snd_soc_acpi_intel_haswell_machines[] = { - { - .id ="INT33CA" , - .drv_name ="haswell-audio" , - .fw_filename ="intel/IntcSST1.bin" , - .sof_fw_filename ="sof-hsw.ri" , - .sof_tplg_filename ="sof-hsw.tplg" , - }, - {} -}; -EXPORT_SYMBOL_GPL (snd_soc_acpi_intel_haswell_machines); -struct snd_soc_acpi_mach snd_soc_acpi_intel_broadwell_machines[] = { { .id ="INT343A" , .drv_name ="broadwell-audio" , - .fw_filename ="intel/IntcSST2.bin" , .sof_fw_filename ="sof-bdw.ri" , .sof_tplg_filename ="sof-bdw-rt286.tplg" , }, { .id ="10EC5650" , .drv_name ="bdw-rt5650" , - .fw_filename ="intel/IntcSST2.bin" , .sof_fw_filename ="sof-bdw.ri" , .sof_tplg_filename ="sof-bdw-rt5650.tplg" , }, { .id ="RT5677CE" , .drv_name ="bdw-rt5677" , - .fw_filename ="intel/IntcSST2.bin" , .sof_fw_filename ="sof-bdw.ri" , .sof_tplg_filename ="sof-bdw-rt5677.tplg" , }, { .id ="INT33CA" , .drv_name ="haswell-audio" , - .fw_filename ="intel/IntcSST2.bin" , .sof_fw_filename ="sof-bdw.ri" , .sof_tplg_filename ="sof-bdw-rt5640.tplg" , },
Signature · 1 line
2.25.1
Mark Brown
maintainerRe: (subset) [PATCH 0/5] ASoC: Intel: catpt: Dma-transfer fix and couple
In reply to Cezary RojewskiQuoted 11 lines · Cezary Rojewski
Set is made of one fix for dma-transfer so that result of
dmaengine_submit()is tested before moving on, and few cleanups:- two non-impactful, where
catpt_component_open()layout gets improved slightly as well as relocation of couple of locals found in PCM-functions so that they look more cohesive
- no need to expose catpt-driver board-matching information globally. Most fields are not by it and it's the sole user ofhaswell_machinestable. By having them locally it is clear what is actually being used[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/5] ASoC: Intel: catpt: Test dmaengine_submit() result before moving on
commit: 2a9a72e290d4a4741e673f86b9fba9bfb319786d
[2/5] ASoC: Intel: catpt: Reduce size of catpt_component_open()
commit: dad492cfd24caf1b62d598555cde279bcca4755e
[3/5] ASoC: Intel: catpt: Streamline locals declaration for PCM-functions
commit: a62a02986d3990f4b55c2d75610f8fb2074b0870All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark