- 22 Sep, 2020 1 commit
-
-
Cheng-Yi Chiang authored
Use set_jack ops to set jack so machine drivers do not need to include hdmi-codec.h explicitly. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200922062316.1172935-1-cychiang@chromium.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 21 Sep, 2020 28 commits
-
-
Mark Brown authored
Merge series "ASoC: SOF: fix kcontrol size checks" from Kai Vehmanen <kai.vehmanen@linux.intel.com>: Series that fixes checks for 'size' in kcontrol get/put ext_bytes methods for SOF. The gaps in these checks were discovered via cppcheck warnings on unused variable values. Pierre-Louis Bossart (5): ASoC: SOF: control: fix size checks for ext_bytes control .get() ASoC: SOF: control: fix size checks for volatile ext_bytes control .get() ASoC: SOF: control: add size checks for ext_bytes control .put() ASoC: SOF: control: remove const in sizeof() ASoC: SOF: topology: remove const in sizeof() sound/soc/sof/control.c | 53 +++++++++++++++++++++++++++++++--------- sound/soc/sof/topology.c | 2 +- 2 files changed, 43 insertions(+), 12 deletions(-) -- 2.27.0
-
Kai Vehmanen authored
To provide backward compatibility to older systems, the SOF HDA driver allows user to specify which HDMI codec driver to use at runtime via kernel parameter. This mechanism has a subtle flaw in that it assumes the codec drivers not to be loaded when the SOF PCI driver is loaded. The problem is rooted in use of the hdev->type field. snd_hdac_ext_bus_device_init() initializes this field to HDA_DEV_ASOC. This signals the HDA core that ASoC drivers should be considered in driver matching (hda_bus_match()). The SOF and SST drivers continue by overriding this field to HDA_DEV_LEGACY and proceeding to load driver modules with request_module(). Correct drivers will get loaded and attached. If however the codec drivers are already loaded when snd_hdac_ext_bus_device_init() is called, the matching will not work as expected as device type is still set to HDA_DEV_ASOC. Specifically if hdac-hdmi is attached when machine driver is configured to use hdac-hda, this leads to out-of-bounds memory access in hda_dsp_hdmi_build_controls(). Fix the issue by adding codec type as a parameter to snd_hdac_ext_bus_device_init() and ensuring type is set correctly from the start. Fixes: 139c7feb ("ASoC: SOF: Intel: add support for snd-hda-codec-hdmi") Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200921100841.2882662-1-kai.vehmanen@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Refactor the tas2770_set_samplerate to simplify the code and access the I2C bus only once per rate request. The ramp rate and sample rate bits are contained in the same register so a single call to the snd_soc_update_bits function is all that is needed Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918190548.12598-9-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Fix up the spacing for argument alignment and add new lines to separate code. Eliminate unneccessary goto statements when the error code could just be returned. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918190548.12598-8-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Update the hardcoded masks with the GENMASK macro. Also update some of the hardcoded bits with the BIT macro Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918190548.12598-6-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Fix the unbalanced call to the pm_runtime_disable when removing the module. pm_runtime_enable is not called nor is the pm_runtime setup in the code. Remove the i2c_remove function and the pm_runtime_disable. Fixes: 1a476abc ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918190548.12598-5-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
The I2C addresses listed in the yaml are not correct. The addresses can range from 0x41 through 0x48 based on register configurations. Fix the example and the description. Fixes: 4b7151da ("dt-bindings: ASoC: Add tas2770 smart PA dt bindings") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918190548.12598-3-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Add the TAS2110 amplifier to the TAS2562 driver. The TAS2110 is register and bitmap compatible. The chips differ in that the TAS2110 does not have the I/V Sense feedback path. Since these features do not exist the device needs to be registered without these controls. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200921153820.18357-2-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Add the TAS2110 amplifier compatible. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200921153820.18357-1-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Make sure the TLV header and size are consistent before copying from userspace. Fixes: c3078f53 ('ASoC: SOF: Add Sound Open Firmware KControl support') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200921110814.2910477-4-kai.vehmanen@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Mirror addition of checks for regular ext_bytes controls. Fixes: 783560d0 ('ASoC: SOF: Implement snd_sof_bytes_ext_volatile_get kcontrol IO') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200921110814.2910477-3-kai.vehmanen@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
cppcheck complains twice: sound/soc/sof/control.c:436:2: style: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] size -= sizeof(const struct snd_ctl_tlv); ^ sound/soc/sof/control.c:436:7: style: Variable 'size' is assigned a value that is never used. [unreadVariable] size -= sizeof(const struct snd_ctl_tlv); Somehow we dropped the checks for the size argument when upstreaming the code, somewhere between v5 and v6. Re-add a size check to avoid providing userspace with more data that it asked for. Also fix all error codes, we should return -ENOSPC instead of -EINVAL. Fixes: c3078f53 ('ASoC: SOF: Add Sound Open Firmware KControl support') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200921110814.2910477-2-kai.vehmanen@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
-
Miquel Raynal authored
At power-up the analog circuits may take up to one full second before being charged with the default configuration. Using the analog blocks before they are ready generates a *very* crappy sound. Enable the fast charge feature, which will require a bit more power than normal charge but will definitely speed up the starting operation by shrinking this delay to up to 40 ms. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20200911173140.29984-4-miquel.raynal@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Miquel Raynal authored
Current code expects a single channel to be always used. Fix this situation by forwarding the number of channels used. Then fix the derivation of the bdiv clock rate. Fixes: 96c3bb00 ("ASoC: tlv320aic32x4: Dynamically Determine Clocking") Suggested-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20200911173140.29984-3-miquel.raynal@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Miquel Raynal authored
As indicated in the datasheet, a 10ms delay must be observed after programming the divisors. The lack of delay prevents the codec to work properly and the playback appears extremely slow and totally un-audible on a custom sama5 based board. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20200911173140.29984-2-miquel.raynal@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shuming Fan authored
To avoid the IO error, we need to cancel the delayed work and wait for it to finish. Signed-off-by: Shuming Fan <shumingf@realtek.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200921094308.31921-1-shumingf@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
snd_soc_update_bits returns a 1 when the bit was successfully updated, returns a 0 is no update was needed and a negative if the call failed. The code is currently failing the case of a successful update by just checking for a non-zero number. Modify these checks and return the error code only if there is a negative. Fixes: 1a476abc ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918190548.12598-7-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
The devicetree binding indicates that the ti,asi-format, ti,imon-slot-no and ti,vmon-slot-no are not required but the driver requires them or it fails to probe. Honor the binding and allow these entries to be optional and set the corresponding values to the default values for each as defined in the data sheet. Fixes: 1a476abc ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918190548.12598-4-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Add the BIAS_STANDBY and BIAS_PREPARE to the set_bias_level or else the driver will return -EINVAL which is not correct as they are valid states. Fixes: 1a476abc ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918190548.12598-2-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
tas2770_reset is called during i2c probe. The reset calls the snd_soc_component_write which depends on the tas2770->component being available. The component pointer is not set until codec_probe so move the reset to the codec_probe after the pointer is set. Fixes: 1a476abc ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918190548.12598-1-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shuming Fan authored
To avoid the IO error, we need to cancel the delayed work and wait for it to finish. Signed-off-by: Shuming Fan <shumingf@realtek.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200921094244.31869-1-shumingf@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Add the TAS2564 as a supported amplifier. This amplifier is register, bitmap and feature compatible to the TAS2562. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918150130.21015-2-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Add the TAS2564 compatible and data sheet link to the binding. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918150130.21015-1-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kai Vehmanen authored
Fix build warning: WARNING: modpost: missing MODULE_LICENSE() in sound/soc/sof/imx/imx-common.o Fixes: 18ebffe4 ("ASoC: SOF: imx: Add debug support for imx platforms") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200921104746.2903507-1-kai.vehmanen@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Daniel Baluta authored
On i.MX platforms PM is not managed via ACPI although CONFIG_ACPI can be set. So, in order to correctly set the system target state we introduce a flag for platforms that require to use acpi target states. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200921105038.2909899-1-kai.vehmanen@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Guillermo Rodríguez authored
Add volume controls for: - Analog programmable gain amplifier (PGA) (-3 .. +12 dB) - ADC attenuator (0 .. -96 dB) Signed-off-by: Guillermo Rodríguez <guille.rodriguez@gmail.com> Acked-by: David Rhodes <David.rhodes@cirrus.com> Link: https://lore.kernel.org/r/20200918134317.22574-1-guille.rodriguez@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Keyon Jie authored
In commit 783898ce ("ASoC: SOF: append extended data to sof_ipc_comp_process") the process components are set to run on the fixed core 0, this break us from scheduling components on any other DSP core. Since we can get the DSP core index from swidget->core, it is duplicated to pass the extra 'core' argument for those sof_widget_load_xx() functions. Here removes the duplicate 'core' argument and get component core from swidget->core directly to fix the issue mentioned above. Fixes: 783898ce ("ASoC: SOF: append extended data to sof_ipc_comp_process") Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Jaska Uimonen <jaska.uimonen@intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200921104544.2897112-1-kai.vehmanen@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 18 Sep, 2020 2 commits
-
-
Camel Guo authored
Add support to configure the GPIO pin to the specific configuration. The GPIO pin can be configured as GPO, IRQ, SDOUT2, PDMCLK, MICBASE_EN, GPI, MCLK, SDIN, PDMDIN1, PDMDIN2, PDMDIN3 or PDMDIN4 and the output drive can be configured with various configuration. Signed-off-by: Camel Guo <camelg@axis.com> Link: https://lore.kernel.org/r/20200918114025.18205-2-camel.guo@axis.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Camel Guo authored
Add properties for configuring the General Purpose Input Output (GPIO). There are 2 settings for GPIO, configuration and the output drive type. Signed-off-by: Camel Guo <camelg@axis.com> Acked-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918114025.18205-1-camel.guo@axis.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 17 Sep, 2020 9 commits
-
-
Mark Brown authored
As sai ip is upgraded, so update sai register list. Shengjiu Wang (3): ASoC: fsl_sai: Add new added registers and new bit definition ASoC: fsl_sai: Add fsl_sai_check_version function ASoC: fsl_sai: Set MCLK input or output direction changes in v2: - update commit message for first commit - Add acked-by Nicolin sound/soc/fsl/fsl_sai.c | 77 ++++++++++++++++++++++++++++++++++++ sound/soc/fsl/fsl_sai.h | 87 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) -- 2.27.0
-
Mark Brown authored
Series that adds debug support for IMX platforms, more details to FW version information, adds missing -EACCESS handling to pm_runtime_get_sync() calls and a set of minor cosmetic, trace verbosity and coding style issues. Guennadi Liakhovetski (3): ASoC: SOF: (cosmetic) remove redundant "ret" variable uses ASoC: SOF: remove several superfluous type-casts ASoC: SOF: fix range checks Iulian Olaru (1): ASoC: SOF: imx: Add debug support for imx platforms Karol Trzcinski (1): ASoC: SOF: Add `src_hash` to `sof_ipc_fw_version` structure Pierre-Louis Bossart (3): ASoC: SOF: debug: update test for pm_runtime_get_sync() ASoC: SOF: control: update test for pm_runtime_get_sync() ASoC: SOF: Intel: hda: reduce verbosity of boot error logs include/sound/sof/info.h | 4 +- sound/soc/sof/control.c | 62 +++++++++++++-------------- sound/soc/sof/debug.c | 2 +- sound/soc/sof/imx/Kconfig | 8 ++++ sound/soc/sof/imx/Makefile | 3 ++ sound/soc/sof/imx/imx-common.c | 72 ++++++++++++++++++++++++++++++++ sound/soc/sof/imx/imx-common.h | 16 +++++++ sound/soc/sof/imx/imx8.c | 23 +++++++++- sound/soc/sof/imx/imx8m.c | 17 +++++++- sound/soc/sof/intel/hda-loader.c | 16 +++---- sound/soc/sof/intel/hda.c | 12 ++++-- sound/soc/sof/intel/hda.h | 2 + sound/soc/sof/sof-audio.c | 6 +-- sound/soc/sof/sof-priv.h | 8 ++++ sound/soc/sof/topology.c | 44 ++++++++++--------- 15 files changed, 226 insertions(+), 69 deletions(-) create mode 100644 sound/soc/sof/imx/imx-common.c create mode 100644 sound/soc/sof/imx/imx-common.h -- 2.27.0
-
Mark Brown authored
Merge series "ASoC: q6afe: add clocks support" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>: q6afe already exposes clocks using apis, but not as proper clock controller driver. This patch puts those clocks in to a proper clock controller so that other drivers that depend on those clocks can be properly expressed. Srinivas Kandagatla (2): ASoC: q6afe: dt-bindings: add q6afe clock bindings ASoC: q6afe-clocks: add q6afe clock controller .../devicetree/bindings/sound/qcom,q6afe.txt | 23 ++ include/dt-bindings/sound/qcom,q6afe.h | 74 ++++- sound/soc/qcom/Kconfig | 4 + sound/soc/qcom/qdsp6/Makefile | 1 + sound/soc/qcom/qdsp6/q6afe-clocks.c | 270 ++++++++++++++++++ 5 files changed, 371 insertions(+), 1 deletion(-) create mode 100644 sound/soc/qcom/qdsp6/q6afe-clocks.c -- 2.21.0
-
Shengjiu Wang authored
Ak4458 can't support DSD512 format, but ak4497 can, so add a new enum variable (enum ak4458_type) in ak4458_drvdata to distinguish these two platforms. Ak4497 has two kinds of DSD input pin, it can be selected by the dsd-path property from DT. In hw_params(), bit clock is calculated according to different DSD format (DSD64, DSD128, DSD256, DSD512), then registers are configured. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1600178220-28973-2-git-send-email-shengjiu.wang@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shengjiu Wang authored
Add "dsd-path" property, which is used for ak4497 codec to select the DSD input pin. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1600178220-28973-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Add a property to indicate if the device is to go into a High-z state on the Tx ASI output pins when the device is idle. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200915190606.1744-3-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dan Murphy authored
Add code to allow the ASI Tx output to be placed into High-z mode during unused ASI cycles. This allows for other devices that may be on the bus to drive the ASI out. By default the 320adcx140 sends 0's for unused cycles. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200915190606.1744-4-dmurphy@ti.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Douglas Anderson authored
The lpass-sc7180 driver can be built as a module but is lacking a MODULE_DEVICE_TABLE. This means it won't auto-load. Fix this oversight. Fixes: 24caf8d9 ("ASoC: qcom: lpass-sc7180: Add platform driver for lpass audio") Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20200916111545.1.I4c3758817d94c433bafeac344a395e21ea6657e3@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-
Rander Wang authored
SOF will support tgl-h and tgl-lp in different FW binaries due to hardware difference, so create another dev_desc entry with FW name of sof-tgl-h.ri and dsp_desc named tglh_chip_info for tgl-h. Fixes: c8d2e2bf ("ASoC: SOF: Intel: add PCI IDs for ICL-H and TGL-H") Signed-off-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200917103609.2559916-1-kai.vehmanen@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-