1. 29 8月, 2019 2 次提交
    • R
      ASoC: Fail card instantiation if DAI format setup fails · 714a8438
      Ricard Wanderlof 提交于
      [ Upstream commit 40aa5383e393d72f6aa3943a4e7b1aae25a1e43b ]
      
      If the DAI format setup fails, there is no valid communication format
      between CPU and CODEC, so fail card instantiation, rather than continue
      with a card that will most likely not function properly.
      Signed-off-by: NRicard Wanderlof <ricardw@axis.com>
      Link: https://lore.kernel.org/r/alpine.DEB.2.20.1907241132350.6338@lnxricardw1.se.axis.comSigned-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      714a8438
    • C
      ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks · e6dc6409
      Charles Keepax 提交于
      [ Upstream commit 8dd26dff00c0636b1d8621acaeef3f6f3a39dd77 ]
      
      DPCM uses snd_soc_dapm_dai_get_connected_widgets to build a
      list of the widgets connected to a specific front end DAI so it
      can search through this list for available back end DAIs. The
      custom_stop_condition was added to is_connected_ep to facilitate this
      list not containing more widgets than is necessary. Doing so both
      speeds up the DPCM handling as less widgets need to be searched and
      avoids issues with CODEC to CODEC links as these would be confused
      with back end DAIs if they appeared in the list of available widgets.
      
      custom_stop_condition was implemented by aborting the graph walk
      when the condition is triggered, however there is an issue with this
      approach. Whilst walking the graph is_connected_ep should update the
      endpoints cache on each widget, if the walk is aborted the number
      of attached end points is unknown for that sub-graph. When the stop
      condition triggered, the original patch ignored the triggering widget
      and returned zero connected end points; a later patch updated this
      to set the triggering widget's cache to 1 and return that. Both of
      these approaches result in inaccurate values being stored in various
      end point caches as the values propagate back through the graph,
      which can result in later issues with widgets powering/not powering
      unexpectedly.
      
      As the original goal was to reduce the size of the widget list passed
      to the DPCM code, the simplest solution is to limit the functionality
      of the custom_stop_condition to the widget list. This means the rest
      of the graph will still be processed resulting in correct end point
      caches, but only widgets up to the stop condition will be added to the
      returned widget list.
      
      Fixes: 6742064a ("ASoC: dapm: support user-defined stop condition in dai_get_connected_widgets")
      Fixes: 5fdd022c ("ASoC: dpcm: play nice with CODEC<->CODEC links")
      Fixes: 09464974 ("ASoC: dapm: Fix to return correct path list in is_connected_ep.")
      Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/20190718084333.15598-1-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      e6dc6409
  2. 26 7月, 2019 3 次提交
  3. 10 7月, 2019 8 次提交
  4. 19 6月, 2019 2 次提交
  5. 31 5月, 2019 7 次提交
    • A
      ASoC: davinci-mcasp: Fix clang warning without CONFIG_PM · b9c8f86f
      Arnd Bergmann 提交于
      [ Upstream commit 8ca5104715cfd14254ea5aecc390ae583b707607 ]
      
      Building with clang shows a variable that is only used by the
      suspend/resume functions but defined outside of their #ifdef block:
      
      sound/soc/ti/davinci-mcasp.c:48:12: error: variable 'context_regs' is not needed and will not be emitted
      
      We commonly fix these by marking the PM functions as __maybe_unused,
      but here that would grow the davinci_mcasp structure, so instead
      add another #ifdef here.
      
      Fixes: 1cc0c054 ("ASoC: davinci-mcasp: Convert the context save/restore to use array")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Reviewed-by: NNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      b9c8f86f
    • W
      ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put · 71efe4c7
      Wen Yang 提交于
      [ Upstream commit c705247136a523488eac806bd357c3e5d79a7acd ]
      
      The call to of_parse_phandle returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      Detected by coccinelle with the following warnings:
      ./sound/soc/fsl/fsl_utils.c:74:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 38, but without a corresponding     object release within this function.
      Signed-off-by: NWen Yang <wen.yang99@zte.com.cn>
      Cc: Timur Tabi <timur@kernel.org>
      Cc: Nicolin Chen <nicoleotsuka@gmail.com>
      Cc: Xiubo Li <Xiubo.Lee@gmail.com>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Cc: alsa-devel@alsa-project.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      71efe4c7
    • W
      ASoC: eukrea-tlv320: fix a leaked reference by adding missing of_node_put · b6b7a78c
      Wen Yang 提交于
      [ Upstream commit b820d52e7eed7b30b2dfef5f4213a2bc3cbea6f3 ]
      
      The call to of_parse_phandle returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      Detected by coccinelle with the following warnings:
      ./sound/soc/fsl/eukrea-tlv320.c:121:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 102, but without a correspo    nding object release within this function.
      ./sound/soc/fsl/eukrea-tlv320.c:127:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 102, but without a correspo    nding object release within this function.
      Signed-off-by: NWen Yang <wen.yang99@zte.com.cn>
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Cc: alsa-devel@alsa-project.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      b6b7a78c
    • D
      ASoC: fsl_sai: Update is_slave_mode with correct value · c2582f21
      Daniel Baluta 提交于
      [ Upstream commit ddb351145a967ee791a0fb0156852ec2fcb746ba ]
      
      is_slave_mode defaults to false because sai structure
      that contains it is kzalloc'ed.
      
      Anyhow, if we decide to set the following configuration
      SAI slave -> SAI master, is_slave_mode will remain set on true
      although SAI being master it should be set to false.
      
      Fix this by updating is_slave_mode for each call of
      fsl_sai_set_dai_fmt.
      Signed-off-by: NDaniel Baluta <daniel.baluta@nxp.com>
      Acked-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      c2582f21
    • A
      ASoC: imx: fix fiq dependencies · 5cf668cf
      Arnd Bergmann 提交于
      [ Upstream commit ea751227c813ab833609afecfeedaf0aa26f327e ]
      
      During randconfig builds, I occasionally run into an invalid configuration
      of the freescale FIQ sound support:
      
      WARNING: unmet direct dependencies detected for SND_SOC_IMX_PCM_FIQ
        Depends on [m]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_IMX_SOC [=m]
        Selected by [y]:
        - SND_SOC_FSL_SPDIF [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_IMX_SOC [=m]!=n && (MXC_TZIC [=n] || MXC_AVIC [=y])
      
      sound/soc/fsl/imx-ssi.o: In function `imx_ssi_remove':
      imx-ssi.c:(.text+0x28): undefined reference to `imx_pcm_fiq_exit'
      sound/soc/fsl/imx-ssi.o: In function `imx_ssi_probe':
      imx-ssi.c:(.text+0xa64): undefined reference to `imx_pcm_fiq_init'
      
      The Kconfig warning is a result of the symbol being defined inside of
      the "if SND_IMX_SOC" block, and is otherwise harmless. The link error
      is more tricky and happens with SND_SOC_IMX_SSI=y, which may or may not
      imply FIQ support. However, if SND_SOC_FSL_SSI is set to =m at the same
      time, that selects SND_SOC_IMX_PCM_FIQ as a loadable module dependency,
      which then causes a link failure from imx-ssi.
      
      The solution here is to make SND_SOC_IMX_PCM_FIQ built-in whenever
      one of its potential users is built-in.
      
      Fixes: ff40260f ("ASoC: fsl: refine DMA/FIQ dependencies")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      5cf668cf
    • J
      ASoC: hdmi-codec: unlock the device on startup errors · 49c0fa1f
      Jerome Brunet 提交于
      [ Upstream commit 30180e8436046344b12813dc954b2e01dfdcd22d ]
      
      If the hdmi codec startup fails, it should clear the current_substream
      pointer to free the device. This is properly done for the audio_startup()
      callback but for snd_pcm_hw_constraint_eld().
      
      Make sure the pointer cleared if an error is reported.
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      49c0fa1f
    • M
      ASoC: Intel: kbl_da7219_max98357a: Map BTN_0 to KEY_PLAYPAUSE · fc8c5907
      Mac Chiang 提交于
      [ Upstream commit 16ec5dfe0327ddcf279957bffe4c8fe527088c63 ]
      
      On kbl_rt5663_max98927, commit 38a5882e
          ("ASoC: Intel: kbl_rt5663_max98927: Map BTN_0 to KEY_PLAYPAUSE")
          This key pair mapping to play/pause when playing Youtube
      
      The Android 3.5mm Headset jack specification mentions that BTN_0 should
      be mapped to KEY_MEDIA, but this is less logical than KEY_PLAYPAUSE,
      which has much broader userspace support.
      
      For example, the Chrome OS userspace now supports KEY_PLAYPAUSE to toggle
      play/pause of videos and audio, but does not handle KEY_MEDIA.
      
      Furthermore, Android itself now supports KEY_PLAYPAUSE equivalently, as the
      new USB headset spec requires KEY_PLAYPAUSE for BTN_0.
      https://source.android.com/devices/accessories/headset/usb-headset-spec
      
      The same fix is required on Chrome kbl_da7219_max98357a.
      Signed-off-by: NMac Chiang <mac.chiang@intel.com>
      Reviewed-by: NBenson Leung <bleung@chromium.org>
      Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      fc8c5907
  6. 22 5月, 2019 4 次提交
  7. 15 5月, 2019 1 次提交
    • P
      x86/cpu: Sanitize FAM6_ATOM naming · 1f1bc822
      Peter Zijlstra 提交于
      commit f2c4db1bd80720cd8cb2a5aa220d9bc9f374f04e upstream
      
      Going primarily by:
      
        https://en.wikipedia.org/wiki/List_of_Intel_Atom_microprocessors
      
      with additional information gleaned from other related pages; notably:
      
       - Bonnell shrink was called Saltwell
       - Moorefield is the Merriefield refresh which makes it Airmont
      
      The general naming scheme is: FAM6_ATOM_UARCH_SOCTYPE
      
        for i in `git grep -l FAM6_ATOM` ; do
      	sed -i  -e 's/ATOM_PINEVIEW/ATOM_BONNELL/g'		\
      		-e 's/ATOM_LINCROFT/ATOM_BONNELL_MID/'		\
      		-e 's/ATOM_PENWELL/ATOM_SALTWELL_MID/g'		\
      		-e 's/ATOM_CLOVERVIEW/ATOM_SALTWELL_TABLET/g'	\
      		-e 's/ATOM_CEDARVIEW/ATOM_SALTWELL/g'		\
      		-e 's/ATOM_SILVERMONT1/ATOM_SILVERMONT/g'	\
      		-e 's/ATOM_SILVERMONT2/ATOM_SILVERMONT_X/g'	\
      		-e 's/ATOM_MERRIFIELD/ATOM_SILVERMONT_MID/g'	\
      		-e 's/ATOM_MOOREFIELD/ATOM_AIRMONT_MID/g'	\
      		-e 's/ATOM_DENVERTON/ATOM_GOLDMONT_X/g'		\
      		-e 's/ATOM_GEMINI_LAKE/ATOM_GOLDMONT_PLUS/g' ${i}
        done
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: dave.hansen@linux.intel.com
      Cc: len.brown@intel.com
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1f1bc822
  8. 10 5月, 2019 13 次提交