- 07 Mar, 2022 34 commits
-
-
Mark Brown authored
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: A couple of updates for Intel and AMD hardware, along with minor cleanups Ajit Kumar Pandey (4): ASoC: SOF: amd: Flush cache after ATU_BASE_ADDR_GRP register update ASoC: SOF: amd: Use semaphore register to synchronize ipc's irq ASoC: SOF: amd: Move group register configuration to acp-loader ASoC: SOF: amd: Increase ACP_HW_SEM_RETRY_COUNT value Curtis Malainey (1): ASoC: SOF: fix 32 signed bit overflow Gongjun Song (1): ASoC: SOF: Intel: pci-tgl: add RPL-S support Peter Ujfalusi (2): ASoC: SOF: amd: acp-pcm: Take buffer information directly from runtime ASoC: SOF: amd: Do not set ipc_pcm_params ops as it is optional Pierre-Louis Bossart (2): ASoC: SOF: debug: clarify operator precedence ASoC: SOF: Intel: hda: clarify operator precedence include/sound/sof/header.h | 2 +- include/uapi/sound/sof/abi.h | 2 +- sound/soc/sof/amd/acp-dsp-offset.h | 1 + sound/soc/sof/amd/acp-ipc.c | 22 ++++++++++++++-------- sound/soc/sof/amd/acp-loader.c | 9 +++++++++ sound/soc/sof/amd/acp-pcm.c | 7 ++++--- sound/soc/sof/amd/acp-stream.c | 3 +++ sound/soc/sof/amd/acp.c | 29 ++++++++++++++--------------- sound/soc/sof/amd/acp.h | 3 +-- sound/soc/sof/amd/renoir.c | 1 - sound/soc/sof/debug.c | 2 +- sound/soc/sof/intel/hda.c | 2 +- sound/soc/sof/intel/pci-tgl.c | 2 ++ 13 files changed, 52 insertions(+), 33 deletions(-) -- 2.30.2
-
Mark Brown authored
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Updates to clean-up the GPIOLIB dependency and a quirk for HP SoundWire devices.
-
Mark Brown authored
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: This adds support for I2S/TDM links where the slot width varies depending on the sample width, in a way that cannot be guessed by component hw_params(). A typical example is: - 16-bit samples use 16-bit slots - 24-bit samples use 32-bit slots There is no way for a component hw_params() to deduce from the information it is passed that 24-bit samples will be in 32-bit slots. Some audio hardware cannot support a fixed slot width or a slot width equal to the sample width in all cases. This is usually due either to limitations of the audio serial port or system clocking restrictions.
-
Mark Brown authored
Merge series from Stephan Gerhold <stephan@gerhold.net>: This series adds a simple driver and DT schema for the Awinic AW8738 audio amplifier. It's fairly simple - the main difference to simple-amplifier is that there is a "one-wire pulse control" that allows configuring the amplifier to one of a few pre-defined modes. This can be used to configure the speaker-guard function (primarily the power limit for the amplifier).
-
Dan Carpenter authored
The "adata->i2s_irq" variable is unsigned so the error handling will not work. Fixes: 87d71a12 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220304131256.GA28739@kiliSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
DETECT_MODE and PLL_START must be zero while HP_PDN and ADC_PDN are both 1. If this condition is broken it can discharge FILT+ and it can then take up to 1 second for FILT+ to recharge. There is no workaround required for this, simply avoiding settings and sequences that would break the requirement. The driver already meets the requirement. But it is not obvious from reading the code that this requirement exists, or what is ensuring it is met. So it would not currently be obvious to someone changing the code that there is certain special behaviour that must be maintained. To avoid accidental breakage in the future: - Add comments into the register definitions to warn about this so that anyone changing the code around DETECT_MODE and PLL_START is aware of this requirement. - Add a comment where PLL_START is written to 1 to highlight the requirement and why it is satisfied. - Add a comment in cs42l42_setup_hs_type_detect() when DETECT_MODE is initialized. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220304144015.398656-1-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Simon Trimmer authored
The parts supported by this driver can have product-specific firmware and tunings files. Typically these have been used on embedded systems where the manufacturer is responsible for installing the correct product-specific firmware files into /lib/firmware. However, the linux-firmware repository places all available firmwares into /lib/firmware and it is up to the driver to select the correct product-specific firmware from that directory. For example a product containing four smart amplifiers may provide firmware specific for that product and each of the amplifiers may have coefficient files containing tunings for their placement in the mechanical design. This change extends firmware (wmfw) and coefficient (bin) filenames to be of the general form: <cirrus/>part-dspN-fwtype<-system_name<-asoc_component_prefix>>.type Where the cirrus subdirectory, system_name and asoc_component_prefix are optional. New files will be placed in the cirrus subdirectory to avoid polluting the main /lib/firmware/ location. The generic name must be searched in /lib/firmware before /lib/firmware/cirrus so that a generic file in the new location does not override existing product-specific files in the legacy location. The search order for firmware files is: - cirrus/part-dspN-fwtype-system_name-asoc_component_prefix.wmfw - cirrus/part-dspN-fwtype-system_name.wmfw - part-dspN-fwtype.wmfw - cirrus/part-dspN-fwtype.wmfw - Qualifications are added to the filename so that rightwards is more specific. - The system_name is provided by the codec driver. - The asoc_component_prefix is used to identify tunings for individual parts because it would already exist to disambiguate the controls and it makes it obvious which firmware file applies to which device. The optional coefficient file must have the same filename construction as the discovered wmfw except: - where the wmfw has only system_name then the bin file can optionally include the asoc_component_prefix. This is to allow a common wmfw for all amps but separate tunings per amp. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220303155016.122125-1-simont@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jiasheng Jiang authored
As the potential failure of the clk_enable(), it should be better to check it and return error if fails. Fixes: ab6f6d85 ("ASoC: fsi: add master clock control functions") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Link: https://lore.kernel.org/r/20220302062844.46869-1-jiasheng@iscas.ac.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
SC7280 config selected WCD938X instead of WCD938X_SDW Soundwire codecs. WCD938X_SDW actually selects WCD938X, so directly selecting WCD938X results in unmet dependencies and below warning WARNING: unmet direct dependencies detected for SND_SOC_WCD938X Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=m] && SND_SOC_WCD938X_SDW [=n] && (SOUNDWIRE [=n] || !SOUNDWIRE [=n]) Selected by [m]: - SND_SOC_SC7280 [=m] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=m] && SND_SOC_QCOM [=m] && (I2C [=y] && SOUNDWIRE [=n] || COMPILE_TEST [=y]) Fix this issue by selecting WCD SoundWire codecs instead of component driver. Fixes: 57350bd4 ("ASoC: qcom: SC7280: Add machine driver") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220304160934.32010-1-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
cs35l41_private is not used on cs35l41_handle_pdata Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220304150721.3802-5-tanureal@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Lucas Tanure authored
This device only has 4 TX channels. Fixes: fe1024d5 ("ASoC: cs35l41: Combine adjacent register writes") Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220304150721.3802-3-tanureal@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Derek Fang authored
Changes: 1. Revise rt5682s_sar_power_mode and rt5682s_headset_detect to be more rational. 2. Manually set to the jack-unplugging state via rt5682s_headset_detect during going to suspend. Close unnecessary powers and prepare for re-detecting the CBJ during resuming. 3. Simplize rt5682s_resume. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20220307102154.26065-1-derek.fang@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jiasheng Jiang authored
As the potential failure of the wm8350_register_irq(), it should be better to check it and return error if fails. Also, use 'free_' in order to avoid the same code. Fixes: a6ba2b2d ("ASoC: Implement WM8350 headphone jack detection") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220304023821.391936-1-jiasheng@iscas.ac.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Miaoqian Lin authored
This node pointer is returned by of_parse_phandle() with refcount incremented in this function. Calling of_node_put() to avoid the refcount leak. Fixes: 531f67e4 ("ASoC: at91sam9g20ek-wm8731: convert to dt support") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20220307124539.1743-1-linmq006@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Carpenter authored
The "adata->i2s_irq" variable is unsigned so this error handling code will not work. Fixes: 87d71a12 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220304131534.GD28739@kiliSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Carpenter authored
The "adata->pdm_irq" variable is unsigned so the error handling will not work. Fixes: 87d71a12 ("ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220304131335.GB28739@kiliSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Carpenter authored
The "adata->i2s_irq" is unsigned so this error handling will not work. Fixes: 3304a242 ("ASoC: amd: Use platform_get_irq_byname() to get the interrupt") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220304131449.GC28739@kiliSigned-off-by: Mark Brown <broonie@kernel.org>
-
Anthony I Gilea authored
HP changed the DMI identification for 2022 devices: Product Name: HP Spectre x360 Conv 13-ap0001na Product Name: 8709 This patch relaxes the DMI_MATCH criterion to work with all versions of this product. Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Anthony I Gilea <i@cpp.in> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304204532.54675-4-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
We have eleven machine drivers who make explicit references to gpios. Let's add the dependency. The use of 'depends on' instead of 'select' is intentional. On one side it could be argued that the GPIOs are required, but on the other it might create more issues with randconfig builds. This patch sticks with the existing direction of using 'depends' on high-level non-audio dependencies Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220304204532.54675-3-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
This patch reverts commit 4262ddc2 ("ASoC: Intel: boards: add explicit dependency on GPIOLIB when DMIC is used") and all follow-up additions of this dependency. Now that the DMIC does not depend on GPIOLIB we can simplify again. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220304204532.54675-2-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jonathan Albrieux authored
The Awinic AW8738 is a simple audio amplifier using a single GPIO. The main difference to simple-amplifier is that there is a "one-wire pulse control" that allows configuring the amplifier to one of a few pre-defined modes. This can be used to configure the speaker-guard function (primarily the power limit for the amplifier). Add a simple driver that allows setting it up in the device tree with a specified mode number. Signed-off-by: Jonathan Albrieux <jonathan.albrieux@gmail.com> Co-developed-by: Stephan Gerhold <stephan@gerhold.net> Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20220304102452.26856-3-stephan@gerhold.netSigned-off-by: Mark Brown <broonie@kernel.org>
-
Stephan Gerhold authored
Add a DT schema for describing Awinic AW8738 audio amplifiers. They are fairly simple and controlled using a single GPIO. The number of pulses during power up selects one of a few pre-defined operation modes. This can be used to configure the speaker-guard function (primarily the power limit for the amplifier). Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20220304102452.26856-2-stephan@gerhold.netSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Some audio hardware cannot support the same slot width for all sample widths, or a slot width equal to the sample width for all sample widths. This is usually due either to limitations of the audio serial port or system clocking restrictions. A typical example would be: - 16-bit samples in 16-bit slots - 24-bit samples in 32-bit slots The new dai-tdm-slot-width-map property allows setting a mapping of sample widths and the corresponding tdm slot widths and slot counts. Although the slot count is usually the same for all cases this does allow for adding padding slots to maintain the same bitclk frequency. The property is added to each endpoint node that needs the component DAI to be told the TDM slot width and count. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220228172754.453783-3-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Some audio hardware cannot support a fixed slot width for all sample widths, or a slot width equal to the sample width for all sample widths. This is usually due either to limitations of the audio serial port or system clocking restrictions. This property allows setting a mapping of sample widths and the corresponding tdm slot widths. The slot count is also provided for each slot width - although this would almost always be the same for all slot widths this allows for possibly adding extra padding slots to maintain a fixed bitclock frequency. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220228172754.453783-2-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
cppcheck warning sound/soc/sof/intel/hda.c:545:46: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] char *level = flags & SOF_DBG_DUMP_OPTIONAL ? KERN_DEBUG : KERN_ERR; Reviewed-by: Ranjani Sridharan <ranjani.sridharan@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304205733.62233-11-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
cppcheck warning: for '&' and '?'. [clarifyCalculation] char *level = flags & SOF_DBG_DUMP_OPTIONAL ? KERN_DEBUG : KERN_ERR; ^ sound/soc/sof/debug.c:398:46: style: Clarify calculation precedence Reviewed-by: Ranjani Sridharan <ranjani.sridharan@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304205733.62233-10-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Curtis Malainey authored
Shifting in a signed 32bit container past the signed bit is technically undefined behaviour. Fix by using unsigned types. Found via cppcheck. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304205733.62233-9-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ajit Kumar Pandey authored
Host is trying to acquire semaphore lock based on HW_SEM_RETRY_COUNT value which is set to 10 by default. So host will loop for 10 times trying to acquire lock before giving error msg "Failed to acquire HW lock". Though this loop count of 10 is good enough with most of the times but we have observed such failure msg in very few cases(~5 %). Increase ACP_HW_SEM_RETRY_COUNT to avoid such issue and loop for a significant time period before throwing error. We're setting newer loop count to quite higher value of 10K but it's very unlikely that it will loop for this count, since for most of the cases lock will get acquired at much lesser loop iterations. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304205733.62233-8-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ajit Kumar Pandey authored
We are using PTE_GRP1 for DMA operations to load firmware binaries but we are enabling PTE_GRP and flushing ATU cache much before in probe callbacks. This can cause issue if we try to load firmware runtime during system resume as probe callback will not be invoked hence PTE_GRP will not be enabled. Moreover it makes more sense to flush the cache after register configuration. Move PTE group register configuration to acp-loader within pre_fw_run callback to avoid such issue. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304205733.62233-7-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ajit Kumar Pandey authored
Add lock and unlock around ipc irq handling code using hw semaphore register that exhibit special property for register read calls. As host and DSP firmware uses few shared registers, there is a possible race condition around those shared registers values. This lock ensure synchronization between Firmware and host ipc interrupts. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304205733.62233-6-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ajit Kumar Pandey authored
ACP_SRAM_PTE block has cache that needs to be flushed after every PTE updates. This patch updates ACPAXI2AXI_ATU_CTRL register to flush cache after updating PTE with stream physical address. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304205733.62233-5-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
The ipc_pcm_params() ops implementation for AMD is a NOP and since the callback is marked now as optional, it can be dropped along with the empty function. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304205733.62233-4-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
Instead of using the values from ipc_params, take them directly from substream->runtime. This is in preparation of making the platform hw_params callback to be IPC agnostic. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304205733.62233-3-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Gongjun Song authored
Add PCI DID for Intel Raptor Lake S. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Gongjun Song <gongjun.song@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220304205733.62233-2-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 03 Mar, 2022 2 commits
-
-
Jiaxin Yu authored
This patch fix the second dai driver's dai widget can't connect to the endpoint. Because "bt-sco-pcm" and "bt-sco-pcm-wb" dai driver have the same stream_name, so it will cause they have the same widget name. Therefor it will just create only one route when do snd_soc_dapm_add_route that only find the widget through the widget name. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/20220302013533.29068-1-jiaxin.yu@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Meng Tang authored
pcm name can be "Analog" and "Alt Analog", cpcm->name can be "Analog Codec DAI" and "Alt Analog Codec DAI". When pcm_name is "Analog", "Analog Codec DAI" and "Alt Analog Codec DAI" are both satisfy the 'if (strstr(cpcm->name, pcm_name))' condition, which may cause the returned cpcm to be "Alt Analog Codec DAI". Even if we get the pcm name by id, and "Analog Codec DAI" goes into the loop before "Alt Analog Codec DAI", but I still think we'd better have multiple insurances against unexpected return values. After, we can correctly return the expected result even if other relevant places are changed. Signed-off-by: Meng Tang <tangmeng@uniontech.com> Link: https://lore.kernel.org/r/20220302094351.3487-1-tangmeng@uniontech.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 02 Mar, 2022 4 commits
-
-
Mark Brown authored
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Two cleanups to remove an unused filename and typos, and one addition of an ACPI matching table for a Dell SoundWire SKU without local microphones. The main change is the addition of a common 'sof-ssp-amp' machine driver for devices with amplifiers only (no headset codec) and different connections using I2S links (Bluetooth offload, HDMI receiver). It's likely that the amplifier will be swapped out by OEMs, this machine driver provides a relatively generic solution to avoid copy-paste of similar solutions.
-
Dan Carpenter authored
The copy_to/from_user() functions return the number of bytes remaining to be copied. This function needs to return negative error codes because snd_soc_pcm_component_copy_user() treats positive returns as success in soc_component_ret(). Fixes: 7d720955 ("ASoC: qcom: Add support for codec dma driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220301081104.GB17375@kiliSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jiasheng Jiang authored
There is one call trace that snd_soc_register_card() ->snd_soc_bind_card()->soc_init_pcm_runtime() ->snd_soc_dai_compress_new()->snd_soc_new_compress(). In the trace the 'codec_dai' transfers from card->dai_link, and we can see from the snd_soc_add_pcm_runtime() in snd_soc_bind_card() that, if value of card->dai_link->num_codecs is 0, then 'codec_dai' could be null pointer caused by index out of bound in 'asoc_rtd_to_codec(rtd, 0)'. And snd_soc_register_card() is called by various platforms. Therefore, it is better to add the check in the case of misusing. And because 'cpu_dai' has already checked in soc_init_pcm_runtime(), there is no need to check again. Adding the check as follow, then if 'codec_dai' is null, snd_soc_new_compress() will not pass through the check 'if (playback + capture != 1)', avoiding the leftover use of 'codec_dai'. Fixes: 467fece8 ("ASoC: soc-dai: move snd_soc_dai_stream_valid() to soc-dai.c") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1634285633-529368-1-git-send-email-jiasheng@iscas.ac.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Sascha Hauer authored
In dmaengine_pcm_set_runtime_hwparams() period_bytes_min is hardcoded to 256. For some applications that may be too big. This patch changes that to calculate the value based on dma_data->maxburst. The correct value would be maxburst multiplied by the address width of the hardware FIFO. Unfortunately the address width is dynamically calculated based on the stream parameters and is not known at open time, so the worst case is chosen here which is 8 bytes, the maximum that is supported by dmaengine drivers. Not all drivers may set a maxburst value, so we fall back to the previously used hardcoded value of 256 bytes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.kernel.org/r/20220301113446.1053171-1-s.hauer@pengutronix.deSigned-off-by: Mark Brown <broonie@kernel.org>
-