- 17 Nov, 2021 16 commits
-
-
Mark Brown authored
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: Cleanups and code clarifications for the cs42l42 driver.
-
Charles Keepax authored
Some firmwares contain controls intended to convey firmware state back to the host. Whilst more infrastructure will probably be needed for these in time, as a first step allow creation of the controls, so said firmwares arn't completely rejected. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-10-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Provide a mechanism to access only part of a control through the cs_dsp interface. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-9-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-8-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Add a NULL check to the cs_dsp_coeff_write/read_ctrl functions. This is a major convenience for users of the cs_dsp library as it allows the call to cs_dsp_get_ctl to be inlined with the call to read/write the control itself. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-7-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Add support for the revision 2 coefficient file, this format is identical to revision 1 and was simply added by accident to some firmware. However unfortunately many firmwares have leaked into production using this and as such driver support really needs to be added for it. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-6-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
The coefficient file contains various info strings, and the equivalent strings are printed from the WMFW file as it is loaded. Add support for printing these from the coefficient file as well. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-5-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
The code already has a post_run callback, add a matching pre_run callback to the client_ops that is called before execution is started. This callback provides a convenient place for the client code to set DSP controls or hardware that requires configuration before the DSP core actually starts execution. Note that placing this callback before cs_dsp_coeff_sync_controls is important to ensure that any control values are then correctly synced out to the chip. Co-authored-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-4-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
The firmware coefficient files contain version information that is currently ignored by the cs_dsp code. This information specifies which version of the firmware the coefficient were generated for. Add a check into the code which prints a warning in the case the coefficient and firmware differ in version, in many cases this will be ok but it is not always, so best to let the user know there is a potential issue. Co-authored-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-3-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Some of the control functions exposed by the cs_dsp code require the pwr_lock to be held by the caller. Add lockdep_assert_held calls to ensure this is done correctly. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-2-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
The helper function wmfw_add_ctl is only called from one place and that place is a function with only 2 lines of code. Merge the helper function into the work function to simplify the code. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-1-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Olivier Moysan authored
The SAI peripheral supports up to 16 channels in TDM mode (8L+8R). The driver currently supports TDM over two channels. Increase SAI DAI playback/record channels_max, to also allow up to 16 channels in TDM mode. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20211117110031.19345-1-olivier.moysan@foss.st.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Now that struct cs42l42_private has pll_config, the current PLL configuration can be looked up directly in pll_ratio_table. This makes the pll_divout member of cs42l42_private redundant since it was only a copy of the value from pll_ratio_table. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211116163901.45390-5-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
When reporting a jack unplug there's no need to make the reported flags conditional on which flags were reported during the plug event. It's perfectly safe to report all flags and buttons as not-present and let the higher code filter for changes. There's also no need to make two separate snd_soc_jack_report() calls for presence flags and button flags. It can all be done in one report. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211116163901.45390-4-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
The RS_PLUG and RS_UNPLUG interrupt masks are always written as 1 so those writes are redundant and can be deleted. This makes it completely clear in the code that only the TS_PLUG and TS_UNPLUG masks are being changed. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211116163901.45390-3-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
There are multiple places where DETECT_MODE is included in a register write, but in every case it is written as 0. Removing these redundant writes makes the code less cluttered and also makes it obvious that DETECT_MODE is never changed. A single initialization to 0 is added to cs42l42_setup_hs_type_detect(). Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211116163901.45390-2-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 16 Nov, 2021 2 commits
-
-
Pierre-Louis Bossart authored
Follow the Intel example and simplify the Kconfig a) start from the end-product for 'select' chains b) use 'depends on' to filter out configurations. c) use snd-sof-of as a common module without any 'select' Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20211116124131.46414-1-daniel.baluta@oss.nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
Currently same slim channel map setup for every dai link, which is redundant. Fix this by adding a flag and conditionally setting these channel maps. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116115021.14213-1-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 15 Nov, 2021 22 commits
-
-
David Heidelberg authored
Convert the Wolfson WM8903 Ultra-Low Power Stereo CODEC Device Tree binding documentation to json-schema. Signed-off-by: David Heidelberg <david@ixit.cz> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211028124639.38420-1-david@ixit.czSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivasa Rao Mandadapu authored
Update MBHC driver to support special headset such as apple and huwawei headsets. Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org> Co-developed-by: Venkata Prasad Potturu <potturu@codeaurora.org> Signed-off-by: Venkata Prasad Potturu <potturu@codeaurora.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/1636960288-27537-1-git-send-email-srivasam@codeaurora.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
To ensure clean unload of the machine driver, components and topology, do the unregister before we free IPC and debugfs. It is a possibility that part of the unregister we would have IPC communication with the firmware. Suggested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211102094756.9317-1-peter.ujfalusi@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Maíra Canal authored
Considering the current transition of the GPIO subsystem, remove all dependencies of the legacy GPIO interface (linux/gpio.h and linux /of_gpio.h) and replace it with the descriptor-based GPIO approach. Signed-off-by: Maíra Canal <maira.canal@usp.br> Link: https://lore.kernel.org/r/YXWo/9o7ye9a11aR@fedoraSigned-off-by: Mark Brown <broonie@kernel.org>
-
Simon Trimmer authored
This patch removes unused included header files and moves others into cs_dsp.h to ensure that types referenced in the header file are properly described to prevent compiler warnings. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211115120215.56824-1-simont@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
This adds an ALSA control so that the slow-start audio ramp feature can be disabled. This is useful for high-definition audio applications. The register field is unusual in that it is a 3-bit field with only two valid values, 000=off and 111=on. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211101101006.13092-1-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mac Chiang authored
The machine driver is a generic machine driver for SOF with nau8825 codec w or w/o speaker additionally. Depending on the SOC HDMI, DMIC, Bluetooth offload support are added dynamically. Only add information related to SOF since the machine driver was only tested with SOF. There are currently 4 i2s machine variants of ADL. This supports the headphone NUA8825(SSP0) alone or with smart or dumb speakers. Board 2,3,4 use SSP2 for Bluetooth offload support except board 1. Board 1 : NAU8825 + RT1019P(SSP2) Board 2 : NAU8825 + MAX98373(SSP1) Board 3 : NAU8825 + MAX98360A(SSP1) Board 4 : NAU8825 Signed-off-by: David Lin <CTLIN0@nuvoton.com> Co-developed-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Mac Chiang <mac.chiang@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211109133808.8729-1-mac.chiang@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Christophe JAILLET authored
'hphpa_on' is know to be false, so this is just dead code that should be removed. Suggested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/57a89cc31eb2312addd3c77896d7df8206aef138.1635967035.git.christophe.jaillet@wanadoo.frSigned-off-by: Mark Brown <broonie@kernel.org>
-
David Rhodes authored
Support for HALO DSP and firmware Signed-off-by: David Rhodes <drhodes@opensource.cirrus.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211029214028.401284-2-drhodes@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Replace the old .txt binding with a new schema binding. At the same time, some of the descriptions are updated to make them clearer, fix errors, or just make them fit better into the style of schema binding. The cirrus,hs-bias-ramp-rate property was missing from the old .txt binding and has been added to the yaml. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211028140902.11786-4-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series "ASoC: Intel: sof_sdw: Use fixed DAI link id" from Bard Liao <yung-chuan.liao@linux.intel.com>: This series provides a way to use constant dailink numbers for different devices. So that we don't need to renumber them in topologies. Some patches with different purpose are sent together in this series since they are dependent. Bard Liao (8): ASoC: intel: sof_sdw: return the original error number ASoC: intel: sof_sdw: rename be_index/link_id to link_index ASoC: intel: sof_sdw: Use a fixed DAI link id for AMP ASoC: intel: sof_sdw: move DMIC link id overwrite to create_sdw_dailink ASoC: intel: sof_sdw: remove SOF_RT715_DAI_ID_FIX quirk ASoC: intel: sof_sdw: remove sof_sdw_mic_codec_mockup_init ASoC: intel: sof_sdw: remove get_next_be_id ASoC: intel: sof_sdw: add link adr order check Pierre-Louis Bossart (2): ASoC: Intel: sof_sdw: fix jack detection on HP Spectre x360 convertible ASoC: Intel: sof_sdw: add SKU for Dell Latitude 9520 sound/soc/intel/boards/sof_sdw.c | 152 ++++++++++---------- sound/soc/intel/boards/sof_sdw_common.h | 7 +- sound/soc/intel/boards/sof_sdw_rt715.c | 7 - sound/soc/intel/boards/sof_sdw_rt715_sdca.c | 7 - 4 files changed, 85 insertions(+), 88 deletions(-) -- 2.17.1
-
Mark Brown authored
This is the continuation of a previous series [1] where - patch 1/4 is removed in favor of using pin switch This will be posted independently of tfa989x support, since it mainly require changes to sound/soc/qcom/common.c and device DTS. - patch 2/4 is already merged so here are reworked patch 3/4 (bindings fixed and example added) and patch 4/4 unchanged. [1] https://patchwork.kernel.org/project/alsa-devel/cover/20211024085840.1536438-1-vincent.knecht@mailoo.org/ Vincent Knecht (2): ASoC: dt-bindings: nxp, tfa989x: Add rcv-gpios property for tfa9897 ASoC: codecs: tfa989x: Add support for tfa9897 optional rcv-gpios .../bindings/sound/nxp,tfa989x.yaml | 41 +++++++++++++++++++ sound/soc/codecs/tfa989x.c | 20 ++++++++- 2 files changed, 60 insertions(+), 1 deletion(-) -- 2.31.1
-
Bard Liao authored
We assume the adr order described in a snd_soc_acpi_link_adr array is jack -> amp -> mic. We follow the same order to implement the topology. We will need a special topology if we configure a snd_soc_acpi_link_adr array with different order. Adding a check and a warning message can remind people to keep the order when adding a new snd_soc_acpi_link_adr array. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211027021824.24776-11-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
DAI link id will not be set from sdw codec init feedback function, and be_id is changed by create_sdw_dailink() now. So we don't need get_next_be_id() anymore. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211027021824.24776-10-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
Now, we set DAI link id as SDW_DMIC_DAI_ID for all DMICs. No need to set it in sof_sdw_mic_codec_mockup_init. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211027021824.24776-9-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
SOF_RT715_DAI_ID_FIX is not used anywhere. Remove it. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211027021824.24776-8-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
We can apply the fixed dai link id for DMICs in create_sdw_dailink(). No need to set it in each DMIC's callback. The fixed dai link id is not only for rt715 and rt715-sdca, but for all DMICs, therefore we remove the SOF_RT715_DAI_ID_FIX check as well. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211027021824.24776-7-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
Currently, we assign SoundWire DAI link id according to the order in the link address table, with the assumption that the headset codec is listed first, then amplifiers and last capture devices. If the headset codec is not present in a platform, the dai link for amplifiers will be shifted, which can be handled in two ways a) modify the topology to renumber the dailink changes b) keep the dailink numbers constant in topology but also avoid the variations in the machine driver. This patch adds support for option b), the dailink index for amplifiers and capture devices becomes fixed. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211027021824.24776-6-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
The link_id variable in sof_card_dai_links_create() and be_index argument in create_sdw_dailink() is actually links' index. Rename them to link_index to be consistent. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211027021824.24776-5-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Different SKUs seem to be used for the same design. BugLink: https://github.com/thesofproject/linux/issues/3206Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211027021824.24776-4-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Tests on device show the JD2 mode does not work at all, the 'Headphone Jack' and 'Headset Mic Jack' are shown as 'on' always. JD1 seems to be the better option, with at least a change between the two cases. Jack not plugged-in: [root@fedora ~]# amixer -Dhw:0 cget numid=12 numid=12,iface=CARD,name='Headphone Jack' ; type=BOOLEAN,access=r-------,values=1 : values=off [root@fedora ~]# amixer -Dhw:0 cget numid=13 numid=13,iface=CARD,name='Headset Mic Jack' ; type=BOOLEAN,access=r-------,values=1 : values=off Jack plugged-in: [root@fedora ~]# amixer -Dhw:0 cget numid=13 numid=13,iface=CARD,name='Headset Mic Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on [root@fedora ~]# amixer -Dhw:0 cget numid=13 numid=13,iface=CARD,name='Headset Mic Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on The 'Headset Mic Jack' is updated with a delay which seems normal with additional calibration needed. Fixes: d92e279d ('ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211027021824.24776-3-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
We don't want to convert create_sdw_dailink()'s return value to -ENOMEM. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20211027021824.24776-2-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-