1. 28 May, 2019 2 commits
    • Ranjani Sridharan's avatar
      ASoC: SOF: core: remove DSP after unregistering machine driver · b85459aa
      Ranjani Sridharan authored
      snd_sof_remove() disables the DSP and unmaps the DSP BAR.
      Removing topology after disabling the DSP results in a
      kernel panic while unloading the pipeline widget. This is
      because pipeline widget unload attempts to power down
      the core it is scheduled on by accessing the DSP registers.
      
      So, the suggested fix here is to unregister the machine driver
      first to remove the topology and then disable the DSP
      to avoid the situation described above.
      
      Note that the kernel panic only happens in cases where the
      HDaudio link is not managed by the hdac library,
      e.g. no codec or when HDMI is not supported.
      When the hdac library is used, snd_sof_remove() calls
      snd_hdac_ext_bus_device_remove() to remove the codec which
      unregisters the component driver thereby also removing the
      topology before the DSP is disabled.
      
      Fixes: c16211d6 ("ASoC: SOF: Add Sound Open Firmware driver core")
      Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
      Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      b85459aa
    • Kuninori Morimoto's avatar
      ASoC: soc-core: fixup references at soc_cleanup_card_resources() · 29040d1a
      Kuninori Morimoto authored
      commit 53e947a0 ("ASoC: soc-core: merge card resources cleanup
      method") merged cleanup method of snd_soc_instantiate_card() and
      soc_cleanup_card_resources().
      
      But, after this commit, if user uses unbind/bind to Component factor
      drivers, Kernel might indicates refcount error at
      soc_cleanup_card_resources().
      
      The 1st reason is card->snd_card is still exist even though
      snd_card_free() was called, but it is already cleaned.
      We need to set NULL to it.
      
      2nd is card->dapm and card create debugfs, but its dentry is still
      exist even though it was removed. We need to set NULL to it.
      
      Fixes: 53e947a0 ("ASoC: soc-core: merge card resources cleanup method")
      Cc: stable@vger.kernel.org # for v5.1
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      29040d1a
  2. 24 May, 2019 2 commits
    • Ranjani Sridharan's avatar
      ASoC: core: lock client_mutex while removing link components · 34ac3c3e
      Ranjani Sridharan authored
      Removing link components results in topology unloading. So,
      acquire the client_mutex before removing components in
      soc_remove_link_components. This will prevent the lockdep warning
      seen when dai links are removed during topology removal.
      Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      34ac3c3e
    • Jon Hunter's avatar
      ASoC: simple-card: Restore original configuration of DAI format · 4819d062
      Jon Hunter authored
      Revert commit 069d037a ("ASoC: simple-card: Fix configuration of
      DAI format"). During further review, it turns out that the actual issue
      was caused by an incorrectly formatted device-tree node describing the
      soundcard.
      
      The following is incorrect because the simple-audio-card
      'bitclock-master' and 'frame-master' properties should not reference the
      actual codec phandle ...
      
      	sound {
      		compatible = "simple-audio-card";
      		...
      	=>	simple-audio-card,bitclock-master = <&codec>;
      	=>	simple-audio-card,frame-master = <&codec>;
      		...
      
      		simple-audio-card,cpu {
      			sound-dai = <&xxx>;
      		};
      
      		simple-audio-card,codec {
      	=>		sound-dai = <&codec>;
      		};
      	};
      
      Rather, these properties should reference the phandle to the
      'simple-audio-card,codec' property as shown below ...
      
      	sound {
      		compatible = "simple-audio-card";
      		...
      	=>	simple-audio-card,bitclock-master = <&codec>;
      	=>	simple-audio-card,frame-master = <&codec>;
      		...
      
      		simple-audio-card,cpu {
      			sound-dai = <&xxx>;
      		};
      
      	=>	codec: simple-audio-card,codec { /* simple-card wants here */
      			sound-dai = <&xxx>;	 /* not here */
      		};
      	};
      Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      4819d062
  3. 21 May, 2019 2 commits
  4. 20 May, 2019 4 commits
  5. 17 May, 2019 1 commit
  6. 16 May, 2019 1 commit
  7. 13 May, 2019 7 commits
  8. 09 May, 2019 1 commit
    • Takashi Iwai's avatar
      ASoC: SOF: Fix unused variable warnings · 7f6647ce
      Takashi Iwai authored
      The recent fix for the build fix caused a couple of unused variable
      compiler warnings when CONFIG_SND_SOC_SOF_NOCODEC isn't set:
        sound/soc/sof/core.c:263:6: warning: unused variable ‘ret’ [-Wunused-variable]
        sound/soc/sof/core.c:262:28: warning: unused variable ‘machine’ [-Wunused-variable]
      
      Fix them by adding another ifdef.
      
      Fixes: ce38a750 ("ASoC: SOF: core: fix undefined nocodec reference")
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      7f6647ce
  9. 08 May, 2019 8 commits
  10. 07 May, 2019 4 commits
  11. 06 May, 2019 5 commits
    • Olivier Moysan's avatar
      ASoC: stm32: spdifrx: change trace level on iec control · 19e42536
      Olivier Moysan authored
      Change trace level to debug to avoid spurious messages.
      Return quietly when accessing iec958 control, while no
      S/PDIF signal is available.
      Signed-off-by: default avatarOlivier Moysan <olivier.moysan@st.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      19e42536
    • Olivier Moysan's avatar
      ASoC: stm32: spdifrx: update pcm hardware constraints · 863137f0
      Olivier Moysan authored
      - Set period minimum size. Ensure at least 5ms period
      up to 48kHz/16 bits to prevent underrun/overrun.
      - Remove MDMA constraints on period maximum size and
      set period maximum to half the buffer maximum size.
      Signed-off-by: default avatarOlivier Moysan <olivier.moysan@st.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      863137f0
    • Jon Hunter's avatar
      ASoC: max98090: Fix restore of DAPM Muxes · ecb2795c
      Jon Hunter authored
      The max98090 driver defines 3 DAPM muxes; one for the right line output
      (LINMOD Mux), one for the left headphone mixer source (MIXHPLSEL Mux)
      and one for the right headphone mixer source (MIXHPRSEL Mux). The same
      bit is used for the mux as well as the DAPM enable, and although the mux
      can be correctly configured, after playback has completed, the mux will
      be reset during the disable phase. This is preventing the state of these
      muxes from being saved and restored correctly on system reboot. Fix this
      by marking these muxes as SND_SOC_NOPM.
      
      Note this has been verified this on the Tegra124 Nyan Big which features
      the MAX98090 codec.
      Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      ecb2795c
    • Curtis Malainey's avatar
      ASoC: RT5677-SPI: Disable 16Bit SPI Transfers · a46eb523
      Curtis Malainey authored
      The current algorithm allows 3 types of transfers, 16bit, 32bit and
      burst. According to Realtek, 16bit transfers have a special restriction
      in that it is restricted to the memory region of
      0x18020000 ~ 0x18021000. This region is the memory location of the I2C
      registers. The current algorithm does not uphold this restriction and
      therefore fails to complete writes.
      
      Since this has been broken for some time it likely no one is using it.
      Better to simply disable the 16 bit writes. This will allow users to
      properly load firmware over SPI without data corruption.
      Signed-off-by: default avatarCurtis Malainey <cujomalainey@chromium.org>
      Reviewed-by: default avatarBen Zhang <benzh@chromium.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      a46eb523
    • Baolin Wang's avatar
      ASoC: sprd: Add reserved DMA memory support · 1587a061
      Baolin Wang authored
      For Spreadtrum audio platform driver, it need allocate a larger DMA buffer
      dynamically to copy audio data between userspace and kernel space, but that
      will increase the risk of memory allocation failure especially the system
      is under heavy load situation.
      
      To make sure the audio can work in this scenario, we usually reserve one
      region of memory to be used as a shared pool of DMA buffers for the
      platform component. So add of_reserved_mem_device_init_by_idx() function
      to initialize the shared pool of DMA buffers to be used by the platform
      component.
      Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      1587a061
  12. 03 May, 2019 3 commits