summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
...
| | | | * | | | ASoC: mediatek: mt8195: add DPTX audio supportTrevor Wu2021-08-242-5/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds DPTX audio support on mt8195-mt6359-rt1019-rt5682 board. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-10-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: mediatek: mt8195: add machine driver with mt6359, rt1019 and rt5682Trevor Wu2021-08-243-0/+994
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for mt8195 board with mt6359, rt1019 and rt5682. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210819084144.18483-9-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: mediatek: mt8195: add platform driverTrevor Wu2021-08-248-0/+6807
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds mt8195 platform and affiliated driver. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210819084144.18483-7-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: mediatek: mt8195: support pcm in platform driverTrevor Wu2021-08-241-0/+389
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds mt8195 pcm dai driver. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-6-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: mediatek: mt8195: support adda in platform driverTrevor Wu2021-08-241-0/+830
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds mt8195 adda dai driver. audio_h clock is used by ADSP bus and ADDA module. When ADDA requires audio_h clock, it is switched to APLL1, otherwise it is switched to Xtal_26m so that APLL1 can be turned off when audio feature is not used. ADSP bus only requires that the clock is on, so dynamic reparenting is used for the purpose of lowering power consumption. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-5-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: mediatek: mt8195: support etdm in platform driverTrevor Wu2021-08-241-0/+2639
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds mt8195 tdm/i2s dai driver. MCLK clock tree is as follows. PLL -> MUX -> DIVIDER -> MCLK For PLL source of MCLK, driver only supports APLL1 and APLL2 now. APLL3 and APLL4 are used to track external clock source, so they are only used when slave input is connected. For example, case 1: (HDMI RX connected) DL memif (a1sys) -> etdm out2 (clk from apll1/apll2) -> codec case 2: (HDMI RX disconnected) HDMI RX -> a3sys -> UL memif (a3sys) -> DL memif (a3sys) -> .... -> etdm out2 (clk from apll3) -> codec We keep all modules in the pipeline working on the same clock domain. MCLK is expected to output the clock generated from the same clock source as the pipeline, so dynamic reparenting is required for MCLK configuration. As a result, clk_set_parent() is used to select PLL source, and clk_set_rate() is used to configure divider to get MCLK output rate. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-4-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: mediatek: mt8195: support audsys clock controlTrevor Wu2021-08-243-0/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds mt8195 audio cg control. Audio clock gates are registered to CCF for reference count and clock parent management. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: mediatek: mt8195: update mediatek common driverTrevor Wu2021-08-242-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update mediatek common driver to support MT8195 Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210819084144.18483-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | ASoC: SOF: intel: remove duplicate includeChangcheng Deng2021-08-241-1/+0
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the following includecheck warning: ./sound/soc/sof/intel/pci-tng.c: shim.h is included more than once. No functional change. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210824030015.57267-1-deng.changcheng@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | Merge series "ASoC: Intel: Skylake: Fix and support complex" from Cezary ↵Mark Brown2021-08-235-190/+226
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rojewski <cezary.rojewski@intel.com>: Existing skylake-driver supports very basic scenarios with limited range of modules and their control. Attached changes first fix code as several advanced configurations are 'mentioned' throughout the files but are not actually functional. Follow up are changes adding missing support for said configurations. Cezary Rojewski (5): ASoC: Intel: kbl_da7219_max98927: Fix format selection for max98373 ASoC: Intel: Skylake: Leave data as is when invoking TLV IPCs ASoC: Intel: Skylake: Fix module resource and format selection ASoC: Intel: Skylake: Fix module configuration for KPB and MIXER ASoC: Intel: Skylake: Select first entry for singular pipe config arrays Gustaw Lewandowski (2): ASoC: Intel: Skylake: Fix passing loadable flag for module ASoC: Intel: Skylake: Simplify m_state for loadable modules Kareem Shaik (1): ASoC: Intel: Skylake: Support multiple format configs Pawel Harlozinski (1): ASoC: Intel: Skylake: Properly configure modules with generic extension Piotr Maziarz (1): ASoC: Intel: Skylake: Select proper format for NHLT blob Szymon Mielczarek (1): ASoC: Intel: Skylake: Support modules with generic extension include/uapi/sound/snd_sst_tokens.h | 6 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 55 +------ sound/soc/intel/skylake/skl-messages.c | 155 ++++++++++++------- sound/soc/intel/skylake/skl-pcm.c | 25 ++- sound/soc/intel/skylake/skl-topology.c | 155 +++++++++++-------- sound/soc/intel/skylake/skl-topology.h | 26 +++- 6 files changed, 231 insertions(+), 191 deletions(-) -- 2.25.1
| | | | * | | | ASoC: Intel: Skylake: Select first entry for singular pipe config arraysCezary Rojewski2021-08-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When pipe does not expose multiple configuration options, always select the first entry without searching for matching one. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: Skylake: Properly configure modules with generic extensionPawel Harlozinski2021-08-231-36/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make use of struct skl_base_cfg_ext and its format setter to configure modules which are described with said structure. Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> Signed-off-by: Pawel Harlozinski <pawel.harlozinski@linux.intel.com> Signed-off-by: Szymon Mielczarek <szymonx.mielczarek@intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: Skylake: Support modules with generic extensionSzymon Mielczarek2021-08-232-13/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some DSP modules require, besides the module base configuration, a generic extension containing audio format for all module's pins that are in use. Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> Signed-off-by: Szymon Mielczarek <szymonx.mielczarek@intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: Skylake: Support multiple format configsKareem Shaik2021-08-233-46/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A module can have two kinds of set params, as per topology requirements. For example, one pre-init and one post-init. But currently, there is support for just one type, as the format_config. This patch extends the format_configs to 4, so as to be able to support pre-init, post-init and post-bind type of set params, for the same module, simultaneously. Signed-off-by: Kareem Shaik <kareem.m.shaik@intel.com> Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: Skylake: Simplify m_state for loadable modulesGustaw Lewandowski2021-08-232-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | States SKL_MODULE_LOADED and SKL_MODULE_UNLOADED are redundant with 'loadable' flag in struct skl_module. Additionally skl_tplg_mixer_dapm_post_pmd_event() sets m_state always to SKL_MODULE_UNINIT so next unload function isn't called for such modules. Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: Skylake: Fix passing loadable flag for moduleGustaw Lewandowski2021-08-231-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | skl_get_module_info() tries to set mconfig->module->loadable before mconfig->module has been assigned thus flag was always set to false and driver did not try to load module binaries. Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: Skylake: Fix module configuration for KPB and MIXERCezary Rojewski2021-08-231-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KeyPhrasebuffer, Mixin and Mixout modules configuration is described by firmware's basic module configuration structure. There are no extended parameters required. Update functions taking part in building INIT_INSTANCE IPC payload to reflect that. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: Skylake: Fix module resource and format selectionCezary Rojewski2021-08-231-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Module configuration may differ between its instances depending on resources required and input and output audio format. Available parameters to select from are stored in module resource and interface (format) lists. These come from topology, together with description of each of pipe's modules. Ignoring index value provided by topology and relying always on 0th entry leads to unexpected module behavior due to under/overbudged resources assigned or impropper format selection. Fix by taking entry at index specified by topology. Fixes: f6fa56e22559 ("ASoC: Intel: Skylake: Parse and update module config structure") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: Skylake: Select proper format for NHLT blobPiotr Maziarz2021-08-231-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use actual pipeline format, not PCM format for blob selection. Otherwise selected blobs are not correct in pipelines with format conversion e.g.: SRC module. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Signed-off-by: Lewandowski, Gustaw <gustaw.lewandowski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: Skylake: Leave data as is when invoking TLV IPCsCezary Rojewski2021-08-231-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Advancing pointer initially fixed issue for some users but caused regression for others. Leave data as it to make it easier for end users to adjust their topology files if needed. Fixes: a8cd7066f042 ("ASoC: Intel: Skylake: Strip T and L from TLV IPCs") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: kbl_da7219_max98927: Fix format selection for max98373Cezary Rojewski2021-08-231-48/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contrary to what is said in board's file, topology targeting kbl_da7219_max98373 expects format 16b, not 24/32b. Partially revert changes added in 'ASoC: Intel: Boards: Add Maxim98373 support' to bring old behavior back, aligning with topology expectations. Fixes: 716d53cc7837 ("ASoC: Intel: Boards: Add Maxim98373 support") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | ASoC: rt1015: remove possible unused variable `bclk_ms'Tzung-Bi Shih2021-08-231-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bclk_ms is possible unused by using the given config (see [1]). sound/soc/codecs/rt1015.c:724:2: warning: Value stored to 'bclk_ms' is never read [clang-analyzer-deadcode.DeadStores] bclk_ms = frame_size > 32; ^ ~~~~~~~~~~~~~~~ In addition, bclk_ms is meaningless and confusing after applying commit a5db2ca51367 ("ASoC: rt1015: remove unneeded variables in rt1015_priv"). The "> 32" in the expression looks like a typo but it was not. Let's remove the confusing variable bclk_ms. [1]: https://lkml.org/lkml/2021/8/23/305 Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210823153323.1297723-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | ASoC: Intel: bytcr_rt5640: Mark hp_elitepad_1000g2_jack?_check functions staticHans de Goede2021-08-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The byt_rt5640_hp_elitepad_1000g2_jack?_check functions are only used inside bytcr_rt5640.c, mark them as static. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210823110432.64860-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | ASoC: ics43432: add CMM-4030D-261 supportAngelo Dureghello2021-08-232-2/+4
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite minimal datasheet differences, the driver seems perfectly compatible with CMM-4030D-261. Tested CMM-4030D-261 to work with this changes: / { cmm4030d: cmm4030d { #sound-dai-cells = <0>; compatible = "cui,cmm-4030d-261"; }; sound_mic { compatible = "simple-audio-card"; simple-audio-card,name = "i2s mem mic"; simple-audio-card,format = "i2s"; simple-audio-card,bitclock-master = <&sound_master>; simple-audio-card,frame-master = <&sound_master>; sound_master: simple-audio-card,cpu { sound-dai = <&ssi2>; system-clock-frequency = <2822400>; }; simple-audio-card,codec { sound-dai = <&cmm4030d>; }; }; }; Audio has been captured and tested successfully by: arecord -D "hw:1,0" -f S24_LE > test.wav aplay test.wav Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com> Link: https://lore.kernel.org/r/20210821082658.4147595-1-angelo.dureghello@timesys.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | Merge series "ASoC: Intel/rt5640: Add support for HP Elite Pad 1000G2 ↵Mark Brown2021-08-203-66/+234
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | jack-detect" from Hans de Goede <hdegoede@redhat.com>: Changes in v2: - Rebase on asoc/for-next - New patch: "ASoC: Intel: bytct_rt5640: Add a separate "Headset Mic 2" DAPM pin for the mic on the 2nd jack" - Addressed Pierre-Louis' comments about calling acpi_dev_add_driver_gpios() twice Original cover-letter: The HP Elitepad 1000 G2 tablet has 2 headset jacks: 1. on the dock which uses the output of the codecs built-in HP-amp + the standard IN2 input which is always used with the headset-jack. 2. on the tablet itself, this uses the line-out of the codec + an external HP-amp, which gets enabled by the ALC5642 codec's GPIO1 pin; and IN1 for the headset-mic. The codec's GPIO1 is also its only IRQ output pin, so this means that the codec's IRQ cannot be used on this tablet. Instead the jack-detect is connected directly to GPIOs on the main SoC. The dock has a helper chip which also detects if a headset-mic is present or not, so there are 2 GPIOs for the jack-detect status of the dock. The tablet jack uses a single GPIO which indicates if a jack is present or not. Differentiating between between headphones vs a headset on the tablet jack is done by using the usual mic-bias over-current-detection mechanism. Regards, Hans Hans de Goede (6): ASoC: rt5640: Move rt5640_disable_jack_detect() up in the rt5640.c file ASoC: rt5640: Delay requesting IRQ until the machine-drv calls set_jack ASoC: rt5640: Add optional hp_det_gpio parameter to rt5640_detect_headset() ASoC: rt5640: Add rt5640_set_ovcd_params() helper ASoC: Intel: bytct_rt5640: Add a separate "Headset Mic 2" DAPM pin for the mic on the 2nd jack ASoC: Intel: bytcr_rt5640: Add support for HP Elite Pad 1000G2 jack-detect sound/soc/codecs/rt5640.c | 136 ++++++++++++---------- sound/soc/codecs/rt5640.h | 6 + sound/soc/intel/boards/bytcr_rt5640.c | 158 +++++++++++++++++++++++++- 3 files changed, 234 insertions(+), 66 deletions(-) -- 2.31.1
| | | | * | | | ASoC: Intel: bytcr_rt5640: Add support for HP Elite Pad 1000G2 jack-detectHans de Goede2021-08-191-2/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HP Elitepad 1000 G2 tablet has 2 headset jacks: 1. on the dock which uses the output of the codecs built-in HP-amp + the standard IN2 input which is always used with the headset-jack. 2. on the tablet itself, this uses the line-out of the codec + an external HP-amp, which gets enabled by the ALC5642 codec's GPIO1 pin; and IN1 for the headset-mic. The codec's GPIO1 is also its only IRQ output pin, so this means that the codec's IRQ cannot be used on this tablet. Instead the jack-detect is connected directly to GPIOs on the main SoC. The dock has a helper chip which also detects if a headset-mic is present or not, so there are 2 GPIOs for the jack-detect status of the dock. The tablet jack uses a single GPIO which indicates if a jack is present or not. Differentiating between headphones vs a headset on the tablet jack is done by using the usual mic-bias over-current-detection mechanism. Add support for this unique setup, this support gets enabled on this tablet through a new BYT_RT5640_JD_HP_ELITEP_1000G2 quirk. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213415 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210819190543.784415-7-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: Intel: bytct_rt5640: Add a separate "Headset Mic 2" DAPM pin for the ↵Hans de Goede2021-08-191-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mic on the 2nd jack In order to be able to do jack-detection reporting for the mic contact on the 2nd jack found on some devices, the DAPM topology needs to have a separate DAPM pin/input for that microphone, instead of re-using the "Internal Mic" pin which is normally used together with the IN1P input of the codec. Using the "Internal Mic" dapm-pin-switch for this in a snd_soc_jack_pin to report hotplug events causes the "Internal Mic" pin to get deactivated when unplugging a headset from the 2nd jack, thus turning off the actual Internal Mic (typically a pair of digital mics on devices with 2 jacks). Fixes: 79c1123bac3b ("ASoC: Intel: bytcr_rt5640: Add support for a second headset mic input") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210819190543.784415-6-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: rt5640: Add rt5640_set_ovcd_params() helperHans de Goede2021-08-192-20/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices don't use the builtin jack-detect but can still benefit from the mic-bias-current over-current-detection to differentiate between headphones vs a headset. Move the ovcd init code from rt5640_enable_jack_detect() into a new rt5640_set_ovcd_params() helper and export this helper as well as a couple of related ovcd functions. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210819190543.784415-5-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: rt5640: Add optional hp_det_gpio parameter to rt5640_detect_headset()Hans de Goede2021-08-192-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices don't use the builtin jack-detect but can still benefit from the mic-bias-current over-current-detection headphones vs headset detection done by rt5640_detect_headset(). In this case the jack-inserted check done by rt5640_detect_headset() needs to be done through a GPIO rather then by using the codec's builtin jack-detect. Add an optional hp_det_gpio parameter and export rt5640_detect_headset() for use on machines where jack-detect is handled outside of the codec. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210819190543.784415-4-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: rt5640: Delay requesting IRQ until the machine-drv calls set_jackHans de Goede2021-08-191-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delay requesting the IRQ until the machine-drv calls set_jack. The main reason for this is that the codec's IRQ is unused on some boards, in which case we really should not call request_irq at all. On some boards there is an IRQ listed at index 0 for the codec, but this is not connected to the codec, but rather is directly connected to the jack's jack-detect pin. These special setups will be handled by the machine-driver, but the machine driver can only request the IRQ if it is not first requested by the codec driver. Moving the request_irq to the set_jack callback (which will not get called in this case) avoids the codec-driver clobbering the IRQ. Moving the request_irq also removes the need to disable the IRQ immediately after requesting it, avoiding a small race (this could also have been fixed by using the new IRQF_NO_AUTOEN flag when requesting the IRQ). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210819190543.784415-3-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: rt5640: Move rt5640_disable_jack_detect() up in the rt5640.c fileHans de Goede2021-08-191-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move rt5640_disable_jack_detect() to above rt5640_enable_jack_detect(). This is a preparation patch for reworking how the IRQ gets requested. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210819190543.784415-2-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | ASoC: rsnd: adg: clearly handle clock error / NULL caseKuninori Morimoto2021-08-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver is assuming that all adg->clk[i] is not NULL. Because of this prerequisites, for_each_rsnd_clk() is possible to work for all clk without checking NULL. In other words, all adg->clk[i] should not NULL. Some SoC might doesn't have clk_a/b/c/i. devm_clk_get() returns error in such case. This driver calls rsnd_adg_null_clk_get() and use null_clk instead of NULL in such cases. But devm_clk_get() might returns NULL even though such clocks exist, but it doesn't mean error (user deliberately chose to disable the feature). NULL clk itself is not error from clk point of view, but is error from this driver point of view because it is not assuming such case. But current code is using IS_ERR() which doesn't care NULL. This driver uses IS_ERR_OR_NULL() instead of IS_ERR() for clk check. And it uses ERR_CAST() to clarify null_clk error. One concern here is that it unconditionally uses null_clk if clk_a/b/c/i was error. It is correct if it doesn't exist, but is not correct if it returns error even though it exist. It needs to check "clock-names" from DT before calling devm_clk_get() to handling such case. But let's assume it is overkill so far. Link: https://lore.kernel.org/r/YMCmhfQUimHCSH/n@mwanda Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87v940wyf9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | ASoC: rsnd: core: make some arrays static const, makes object smallerKuninori Morimoto2021-08-201-3/+3
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't populate arrays on the stack but instead them static const. Makes the object code smaller by 48 bytes. Before: text data bss dec hex filename 20938 916 104 21958 55c6 ./sound/soc/sh/rcar/core.o After: text data bss dec hex filename 20890 916 104 21910 5596 ./sound/soc/sh/rcar/core.o gcc version 11.1.0) Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87tujkwydx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | ASoC: uniphier: make arrays mul and div static const, makes object smallerColin Ian King2021-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't populate the arrays mul and div on the stack but instead make them static const. Makes the object code smaller by 4 bytes. Before: text data bss dec hex filename 16226 4984 64 21274 531a ./sound/soc/uniphier/aio-cpu.o After: text data bss dec hex filename 16062 5144 64 21270 5316 ./sound/soc/uniphier/aio-cpu.o (gcc version 10.2.0) Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Link: https://lore.kernel.org/r/20210818151746.38520-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | ASoC: sh: rz-ssi: Improve error handling in rz_ssi_dma_request functionBiju Das2021-08-191-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dma_request_chan() returns error pointer in case of failures, but the rz_ssi_dma_request() checked for NULL pointer instead. This patch fixes the issue by checking for ERR_PTR() instead of NULL and sets the DMA pointers to NULL in error case so that ssi can fallback to PIO mode. Fixes: 26ac471c5354 ("ASoC: sh: rz-ssi: Add SSI DMAC support") Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://lore.kernel.org/r/20210818101450.15948-1-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | ASoC: fsl_rpmsg: Check -EPROBE_DEFER for getting clocksShengjiu Wang2021-08-181-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The devm_clk_get() may return -EPROBE_DEFER, then clocks will be assigned to NULL wrongly. As the clocks are optional so we can use devm_clk_get_optional() instead of devm_clk_get(). Fixes: b73d9e6225e8 ("ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1629266614-6942-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | Merge series "ASoC: tegra30: Fix use of of_device_get_match_data" from ↵Mark Brown2021-08-172-8/+6
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aakash Hemadri <aakashhemadri123@gmail.com>: Hi, This patchset fixes my previous incorrect patches. 356b94a32a75 ("ASoC: tegra30: i2s: Use of_device_get_match_data") 80165bb80433 ("ASoC: tegra30: ahub: Use of_device_get_match_data") Aakash Hemadri (2): ASoC: tegra30: ahub: Fix incorrect usage of of_device_get_match_data ASoC: tegra30: i2s: Fix incorrect usage of of_device_get_match_data sound/soc/tegra/tegra30_ahub.c | 6 ++---- sound/soc/tegra/tegra30_i2s.c | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) -- 2.32.0
| | | | * | | | ASoC: tegra30: i2s: Fix incorrect usage of of_device_get_match_dataAakash Hemadri2021-08-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | const struct of_device_id incorrectly assigned "match->data" using of_device_get_match_data() Instead assign `const struct tegra30_i2s_soc_data *soc_data` with const void *of_device_get_match_data(...) Fixes: 356b94a32a75 ("ASoC: tegra30: i2s: Use of_device_get_match_data") Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com> Link: https://lore.kernel.org/r/4805c7fcd35c8deada63d41cb34d40de80f85a13.1629148177.git.aakashhemadri123@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: tegra30: ahub: Fix incorrect usage of of_device_get_match_dataAakash Hemadri2021-08-171-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | const struct of_device_id incorrectly assigned "match->data" using of_device_get_match_data() Instead assign `const struct tegra30_ahub_soc_data *soc_data` with const void *of_device_get_match_data(...) Fixes: 80165bb80433 ("ASoC: tegra30: ahub: Use of_device_get_match_data") Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com> Link: https://lore.kernel.org/r/bb61c41f2ee0cf0d85fecdfea05f23a7205992e6.1629148177.git.aakashhemadri123@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | ASoC: Intel: bytcr_rt5640: Use cfg-lineout:2 in the components stringHans de Goede2021-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use "cfg-lineout:2" in the components string on boards with a lineout instead of "cfg-lineout:1", this better mirrors the speaker part of the components string where we use "cfg-spk:1" for devices with a single speaker and "cfg-spk:2" for stereo speakers. The lineout is stereo by default, so using ":2" makes more sense, this way we keep ":1" reserved in case we ever encounter a device with a mono lineout. We can make this change without breaking userspace because no kernel has shipped with "cfg-lineout:1" in the component-string yet; and there also are no userspace bits (UCM profiles) checking for this yet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210816114722.107363-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | ASoC: sh: rz-ssi: Fix wrong operator used issueBiju Das2021-08-171-1/+1
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix wrong operator used issue reported by Coverity by replacing | operator with & operator. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reported-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210816182336.29959-1-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | ASoC: sh: rz-ssi: Fix dereference of noderef expression warningBiju Das2021-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix following sparse warning: sound/soc/sh/rz-ssi.c:156:15: sparse: warning: dereference of noderef expression Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210816132049.28128-1-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | Merge series "ASoC: soc-xxx: cleanup cppcheck warning" from Kuninori ↵Mark Brown2021-08-165-34/+26
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Morimoto <kuninori.morimoto.gx@renesas.com>: Hi Mark Now I'm posting audio-graph-card2 patch-set, but it seems it needs longer discussion. Thus I want to post more easy patch first, and reduce my local patches. These are cppcheck warning cleanup patches for soc-xxx. Kuninori Morimoto (9): ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_pcm_hw_params() ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_pcm_new() ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at dmaengine_copy_user() ASoC: soc-dai: cleanup cppcheck warning at snd_soc_dai_link_set_capabilities() ASoC: soc-dai: cleanup cppcheck warning at snd_soc_pcm_dai_new() ASoC: soc-jack: cleanup cppcheck warning at snd_soc_jack_report() ASoC: soc-jack: cleanup cppcheck warning for CONFIG_GPIOLIB ASoC: soc-component: cleanup cppcheck warning at snd_soc_pcm_component_pm_runtime_get() ASoC: soc-ac97: cleanup cppcheck warning sound/soc/soc-ac97.c | 14 ++++++-------- sound/soc/soc-component.c | 4 ++-- sound/soc/soc-dai.c | 18 ++++++++---------- sound/soc/soc-generic-dmaengine-pcm.c | 9 +++------ sound/soc/soc-jack.c | 15 +++++++-------- 5 files changed, 26 insertions(+), 34 deletions(-) -- 2.25.1
| | | | * | | | ASoC: soc-ac97: cleanup cppcheck warningKuninori Morimoto2021-08-161-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleanups below cppcheck warning. sound/soc/soc-ac97.c:41:15: style: struct member 'snd_ac97_gpio_priv::gpios_set' is never used. [unusedStructMember] unsigned int gpios_set; ^ sound/soc/soc-ac97.c:42:28: style: struct member 'snd_ac97_gpio_priv::component' is never used. [unusedStructMember] struct snd_soc_component *component; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87r1euyolk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: soc-component: cleanup cppcheck warning at ↵Kuninori Morimoto2021-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snd_soc_pcm_component_pm_runtime_get() This patch cleanups below cppcheck warning. sound/soc/soc-component.c:1183:9: style: The scope of the variable 'ret' can be reduced. [variableScope] int i, ret; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87sfzayolo.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: soc-jack: cleanup cppcheck warning for CONFIG_GPIOLIBKuninori Morimoto2021-08-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleanups below cppcheck warning. sound/soc/soc-jack.c:21:6: style: struct member 'jack_gpio_tbl::count' is never used. [unusedStructMember] int count; ^ sound/soc/soc-jack.c:23:28: style: struct member 'jack_gpio_tbl::gpios' is never used. [unusedStructMember] struct snd_soc_jack_gpio *gpios; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87tujqyols.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: soc-jack: cleanup cppcheck warning at snd_soc_jack_report()Kuninori Morimoto2021-08-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleanups below cppcheck warning. sound/soc/soc-jack.c:45:6: style: The scope of the variable 'enable' can be reduced. [variableScope] int enable; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87v946yolx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: soc-dai: cleanup cppcheck warning at snd_soc_pcm_dai_new()Kuninori Morimoto2021-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleanups below cppcheck warning. sound/soc/soc-dai.c:553:13: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int i, ret = 0; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wnomyom1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: soc-dai: cleanup cppcheck warning at snd_soc_dai_link_set_capabilities()Kuninori Morimoto2021-08-161-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleanups below cppcheck warning. sound/soc/soc-dai.c:454:7: style: The scope of the variable 'supported_cpu' can be reduced. [variableScope] bool supported_cpu; ^ sound/soc/soc-dai.c:455:7: style: The scope of the variable 'supported_codec' can be reduced. [variableScope] bool supported_codec; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87y292yom6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: soc-generic-dmaengine-pcm: cleanup cppcheck warning at ↵Kuninori Morimoto2021-08-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dmaengine_copy_user() This patch cleanups below cppcheck warning. sound/soc/soc-generic-dmaengine-pcm.c:310:6: style: The scope of the variable 'ret' can be reduced. [variableScope] int ret; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87zgtiyomb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>