1. 18 Oct, 2022 9 commits
    • Kuninori Morimoto's avatar
      ASoC: soc-dapm.c: remove no meaning variable from snd_soc_dapm_add_path() · c1329a0f
      Kuninori Morimoto authored
      snd_soc_dapm_add_path() is using local variable "widgets[]", but it is
      same as path->node[].
      This is no meaning and duplicate operation. This patch removes "widgets[]".
      
      	path->node[SND_SOC_DAPM_DIR_IN] = wsource;
      	path->node[SND_SOC_DAPM_DIR_OUT] = wsink;
      	widgets[SND_SOC_DAPM_DIR_IN] = wsource;
      	widgets[SND_SOC_DAPM_DIR_OUT] = wsink;
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87y1teowdx.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      c1329a0f
    • Kuninori Morimoto's avatar
      ASoC: soc-dapm.c: tidyup error handling on snd_soc_dapm_add_route() · b913e9f4
      Kuninori Morimoto authored
      Current error handling on snd_soc_dapm_add_route() has some wastes.
      It indicates *own* error message *only* for sink or source,
      and return error directly at (A). OTOH, it has similar error message at
      (B) which indicates *both* sink/source.
      
      And more, (A) is using dev_err(), (B) is using dev_warn().
      (B) is caring prefix, but (A) is not.
      
      (X)	int snd_soc_dapm_add_route(...)
      	{
      		...
      		if (wsource == NULL) {
      (A)			dev_err(...);
      			return -ENODEV;
      		}
      		if (wsink == NULL) {
      (A)			dev_err(...);
      			return -ENODEV;
      		}
      
      		...
      
      		ret = snd_soc_dapm_add_path(...);
      		if (ret)
      (B)			goto err;
      
      		return 0;
      	err:
      (B)		dev_warn(...);
      		return ret;
      	}
      
      Above snd_soc_dapm_add_route() (= X) is called from
      snd_soc_dapm_add_routes() (= Y).
      (X) will indicate error message by itself, but (Y) will indicate
      own error message at (C). (C) is duplicated.
      
      (Y)	int snd_soc_dapm_add_routes(...)
      	{
      		...
      		for (...) {
      (X)			int r = snd_soc_dapm_add_route(...);
      			if (r < 0) {
      (C)				dev_err(...);
      				ret = r;
      			}
      			...
      		}
      		...
      	}
      
      This patch (1) merges these error message (= A,B) into one,
      (2) use dev_err(), (3) remove duplicate error message (= C) from
      snd_soc_dapm_add_routes().
      
      By this patch, it will indicate error message like this.
      
      	- error message with prefix
      	- not found widget will have "(*)" mark
      	- it indicates [control] if exists.
      
      ex)
      [if no sink with control]
      
      	ASoC: Failed to add route SOURCE -> [CTRL] -> SINK(*)
      
      [if no source without control]
      
      	ASoC: Failed to add route SOURCE(*) -> SINK
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87zgduowe5.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      b913e9f4
    • Kuninori Morimoto's avatar
      ASoC: soc-dapm.c: replace snd_soc_dapm_wcache to snd_soc_dapm_widget · 03e13efb
      Kuninori Morimoto authored
      Current ASoC has snd_soc_dapm_wcache, but its member is only
      snd_soc_dapm_widget.
      
      	struct snd_soc_dapm_wcache {
      		struct snd_soc_dapm_widget *widget;
      	};
      
      It is no meaning for now, and makes code unreadable.
      This patch replace snd_soc_dapm_wcache to snd_soc_dapm_widget directly.
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/871qr6qayt.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      03e13efb
    • Mark Brown's avatar
      ASoC: add devicetree support for WM8961 codec · a474dce8
      Mark Brown authored
      Merge series from Doug Brown <doug@schmorgal.com>:
      
      This series adds devicetree support for the Wolfson WM8961 codec. The
      first patch adds a schema, the second patch hooks it up in the code, and
      the third patch allows it to be selected in Kconfig.
      a474dce8
    • Mark Brown's avatar
      ASoC: Intel: avs: Fixes and new boards support · 46234fbe
      Mark Brown authored
      Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:
      
      Two fixes are leading the way - one addresses the incorrect DMA mask
      assignment (typo) at driver probe. The other, fixes a potential buffer
      overflow when copying data received from firmware to kernel buffer.
      However unlikely, the fix should still be there.
      
      Then a range of patches providing the support for:
      - AML with rt286 (machine board)
      - KBL-R for rt298 (codec)
      - KBL-R with rt298 (machine board)
      - APL/KBL with da7219 (machine board)
      - Addition of all the missing SKL-based PCI ids to core.c
      
      Of the remaining changes, only one stands out - special case is provided
      for "unsupported" IPCs. The driver supports a range of platforms,
      however, on some generations given IPC may not be supported. Such call
      shall not be treated as "invalid" - those are two different scenarios.
      
      Everything else in the patchset is mostly a readability improvement:
      spelling fixes and log messages issues, code simplification.
      46234fbe
    • Mark Brown's avatar
      Create a new sound card to access MICFIL based on rpmsg channel · a2ddd19f
      Mark Brown authored
      Merge series from Chancel Liu <chancel.liu@nxp.com>:
      
      At a previous time, we have successfully created a virtual sound card
      based on rpmsg. The sound card works under this mechanism Cortex-A core
      tells the Cortex-M core the format, rate, channel, .etc configuration
      of the PCM parameters and Cortex-M controls real hardware devices such
      as SAI and DMA. From the view of Linux side, the sound card is bound to
      a rpmsg channel through which it can access SAI.
      
      Here these patches are introduced to create a new virtual sound card to
      access MICFIL based on a new created rpmsg channel. It's easy to create
      a new rpmsg channel for MICFIL through rpmsg name service announcment.
      Also the other ASoC components bound to this rpmsg MICFIL sound card
      will be registered with these patches.
      
      If other sound cards using different hardware devices needs to be
      created over rpmsg in the future, these patches can be referred.
      a2ddd19f
    • Mark Brown's avatar
      ASoC: codecs: jz4725b: Various improvements and fixes · c39e299a
      Mark Brown authored
      Merge series from Siarhei Volkau <lis8215@gmail.com>:
      
      The patchset fixes:
       - Line In path stays powered off during capturing or
         bypass to mixer.
       - incorrectly represented dB values in alsamixer, et al.
       - incorrect represented Capture input selector in alsamixer
         in Playback tab.
       - wrong control selected as Capture Master
      
      The patchset improves:
       - Exposes output stage (post mixer) gain control and makes it new
         Master playback gain, DAC gain was the previous master.
         However, no Master mute now.
       - Exposes all mixer inputs (both Mics, LineIn and DAC) with their
         gain controls.
       - Exposes microphones widgets: single/differential input, boost.
      
      Known issues:
       - Bypass path enablement isn't applied immediately, for make
         things going bit clock needs to be triggered for a bit,
         e.g. by aplay dummy.wav
         It might be a hardware bug, since the bit clock isn't
         declared as required for codec operation.
      
      Tested on:
       - Ritmix RZX-27 (jz4725b).
       - Ritmix RZX-50 (jz4755).
      c39e299a
    • Mark Brown's avatar
      ASoC: Use DIV_ROUND_UP() instead of open-coding it · 67ad4edf
      Mark Brown authored
      Merge series from Shang XiaoJing <shangxiaojing@huawei.com>:
      
      Use DIV_ROUND_UP() instead of open-coding it, which intents and makes
      it more clear what is going on for the casual reviewer.
      67ad4edf
    • Mark Brown's avatar
      ASoC: Intel: avs: Add support for max98927 codec · 974ada31
      Mark Brown authored
      Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:
      
      This series adds machine board for max98927 codec present on some
      Chromebook devices.
      974ada31
  2. 17 Oct, 2022 31 commits