07 Mar, 2020

1 commit


06 Mar, 2020

1 commit


05 Mar, 2020

5 commits


04 Mar, 2020

1 commit

  • The commit e894efef9ac7 ("ASoC: core: add support to card rebind")
    allows to rebind the sound card after a rebind of one of its component.
    With this commit, the sound card is actually rebound,
    but may be no more functional. The following problems have been seen
    with STM32 SAI driver.

    1) DMA channel is not requested:

    With the sound card rebind the simplified call sequence is:
    stm32_sai_sub_probe
    snd_soc_register_component
    snd_soc_try_rebind_card
    snd_soc_instantiate_card
    devm_snd_dmaengine_pcm_register

    The problem occurs because the pcm must be registered,
    before snd_soc_instantiate_card() is called.

    Modify SAI driver, to change the call sequence as follows:
    stm32_sai_sub_probe
    devm_snd_dmaengine_pcm_register
    snd_soc_register_component
    snd_soc_try_rebind_card

    2) DMA channel is not released:

    dma_release_channel() is not called when
    devm_dmaengine_pcm_release() is executed.
    This occurs because SND_DMAENGINE_PCM_DRV_NAME component,
    has already been released through devm_component_release().

    devm_dmaengine_pcm_release() should be called before
    devm_component_release() to avoid this problem.

    Call snd_dmaengine_pcm_unregister() and snd_soc_unregister_component()
    explicitly from SAI driver, to have the right sequence.

    Signed-off-by: Olivier Moysan
    Message-Id:
    Signed-off-by: Mark Brown

    Olivier Moysan
     

03 Mar, 2020

2 commits

  • We're passing "&posn" instead of "posn" so it ends up corrupting
    memory instead of doing something useful.

    Fixes: 53e0c72d98ba ("ASoC: SOF: Add support for IPC IO between DSP and Host")
    Signed-off-by: Dan Carpenter
    Reviewed-by: Kai Vehmanen
    Link: https://lore.kernel.org/r/20200303101858.ytehbrivocyp3cnf@kili.mountain
    Signed-off-by: Mark Brown

    Dan Carpenter
     
  • Modify pre-divider for system clock.

    Signed-off-by: Jack Yu
    Link: https://lore.kernel.org/r/20200303025913.24499-1-jack.yu@realtek.com
    Signed-off-by: Mark Brown

    Jack Yu
     

02 Mar, 2020

1 commit


29 Feb, 2020

2 commits

  • commit 1e5ddb6ba73894 ("ASoC: component: Add sync_stop PCM ops")
    added snd_soc_pcm_component_sync_stop(), but it is checking
    ioctrl instead of sync_stop. This is bug.
    This patch fixup it.

    Fixes: commit 1e5ddb6ba73894 ("ASoC: component: Add sync_stop PCM ops")
    Signed-off-by: Kuninori Morimoto
    Cc: Takashi Iwai
    Link: https://lore.kernel.org/r/8736av7a8c.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown

    Kuninori Morimoto
     
  • commit c2caa4da46a4 ("ASoC: Fix widget powerdown on shutdown") added a
    set of the power state during snd_soc_dapm_shutdown to ensure the
    widgets powered off. However, when commit 39eb5fd13dff
    ("ASoC: dapm: Delay w->power update until the changes are written")
    added the new_power member of the widget structure, to differentiate
    between the current power state and the target power state, it did not
    update the shutdown to use the new_power member.

    As new_power has not updated it will be left in the state set by the
    last DAPM sequence, ie. 1 for active widgets. So as the DAPM sequence
    for the shutdown proceeds it will turn the widgets on (despite them
    already being on) rather than turning them off.

    Fixes: 39eb5fd13dff ("ASoC: dapm: Delay w->power update until the changes are written")
    Signed-off-by: Charles Keepax
    Link: https://lore.kernel.org/r/20200228153145.21013-1-ckeepax@opensource.cirrus.com
    Signed-off-by: Mark Brown

    Charles Keepax
     

27 Feb, 2020

1 commit


25 Feb, 2020

2 commits

  • Incrementation of avail_clk_cnt was incorrectly moved to error path. Put
    it back to success path.

    Fixes: 6ee927f2f01466 ('ASoC: Intel: Skylake: Fix NULL ptr dereference when unloading clk dev')
    Signed-off-by: Amadeusz Sławiński
    Reviewed-by: Cezary Rojewski
    Reviewed-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200224125202.13784-1-amadeuszx.slawinski@linux.intel.com
    Signed-off-by: Mark Brown

    Amadeusz Sławiński
     
  • commit b0edff42360ab4 ("ASoC: soc-pcm/soc-compress: use
    snd_soc_dapm_stream_stop() for SND_SOC_DAPM_STREAM_STOP")
    uses snd_soc_dapm_stream_stop() for soc_compr_free_fe()
    and dpcm_fe_dai_shutdown() because it didn't care about pmdown_time.
    But, it didn't need to care.
    This patch rollback to original code.
    Some system will wait unneeded timed-out without this patch.
    Special Thanks for reporting to Chris Gorman.
    ...
    intel_sst_acpi 808622A8:00: Wait timed-out condition:0x0, msg_id:0x1 fw_state 0x3
    intel_sst_acpi 808622A8:00: fw returned err -16
    sst-mfld-platform sst-mfld-platform: ASoC: PRE_PMD: pcm0_in event failed: -16
    ...

    Fixes: commit b0edff42360ab4 ("ASoC: soc-pcm/soc-compress: use snd_soc_dapm_stream_stop() for SND_SOC_DAPM_STREAM_STOP")
    Reported-by: Chris Gorman
    Signed-off-by: Kuninori Morimoto
    Link: https://lore.kernel.org/r/87lfowspeb.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown

    Kuninori Morimoto
     

21 Feb, 2020

2 commits

  • Reset the g12a hdmi codec glue on probe. This ensure a sane startup state.

    Signed-off-by: Jerome Brunet
    Link: https://lore.kernel.org/r/20200221121146.1498427-1-jbrunet@baylibre.com
    Signed-off-by: Mark Brown

    Jerome Brunet
     
  • When we get a clock error during probe we have to call
    regulator_bulk_disable before bailing out, otherwise we trigger
    a warning in regulator_put.

    Fix this by using "goto err" like in the error cases above.

    Fixes: 5a3af1293194d ("ASoC: pcm512x: Add PCM512x driver")
    Signed-off-by: Matthias Reichl
    Reviewed-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200220202956.29233-1-hias@horus.com
    Signed-off-by: Mark Brown

    Matthias Reichl
     

20 Feb, 2020

2 commits

  • In case of ABI version mismatch, _manifest needs to be freed as
    it is just a copy of the original topology manifest. However, if
    a driver manifest handler is defined, that would get executed and
    the cleanup is never reached. Fix that by getting the return status
    of manifest() instead of returning directly.

    Fixes: 583958fa2e52 ("ASoC: topology: Make manifest backward compatible from ABI v4")
    Signed-off-by: Dragos Tarcatu
    Link: https://lore.kernel.org/r/20200207185325.22320-3-dragos_tarcatu@mentor.com
    Signed-off-by: Mark Brown

    Dragos Tarcatu
     
  • If soc_tplg_link_config() fails, _link needs to be freed in case of
    topology ABI version mismatch. However the current code is returning
    directly and ends up leaking memory in this case.
    This patch fixes that.

    Fixes: 593d9e52f9bb ("ASoC: topology: Add support to configure existing physical DAI links")
    Signed-off-by: Dragos Tarcatu
    Link: https://lore.kernel.org/r/20200207185325.22320-2-dragos_tarcatu@mentor.com
    Signed-off-by: Mark Brown

    Dragos Tarcatu
     

19 Feb, 2020

5 commits

  • dpcm_show_state() invokes multiple snprintf() calls to concatenate
    formatted strings on the fixed size buffer. The usage of snprintf()
    is supposed for avoiding the buffer overflow, but it doesn't work as
    expected because snprintf() doesn't return the actual output size but
    the size to be written.

    Fix this bug by replacing all snprintf() calls with scnprintf()
    calls.

    Fixes: f86dcef87b77 ("ASoC: dpcm: Add debugFS support for DPCM")
    Signed-off-by: Takashi Iwai
    Acked-by: Cezary Rojewski
    Link: https://lore.kernel.org/r/20200218111737.14193-4-tiwai@suse.de
    Signed-off-by: Mark Brown

    Takashi Iwai
     
  • The debugfs output of intel skl driver writes strings with multiple
    snprintf() calls with the fixed size. This was supposed to avoid the
    buffer overflow but actually it still would, because snprintf()
    returns the expected size to be output, not the actual output size.

    Fix it by replacing snprintf() calls with scnprintf().

    Fixes: d14700a01f91 ("ASoC: Intel: Skylake: Debugfs facility to dump module config")
    Signed-off-by: Takashi Iwai
    Acked-by: Cezary Rojewski
    Link: https://lore.kernel.org/r/20200218111737.14193-3-tiwai@suse.de
    Signed-off-by: Mark Brown

    Takashi Iwai
     
  • skl_print_pins() loops over all given pins but it overwrites the text
    at the very same position while increasing the returned length.
    Fix this to show the all pin contents properly.

    Fixes: d14700a01f91 ("ASoC: Intel: Skylake: Debugfs facility to dump module config")
    Signed-off-by: Takashi Iwai
    Acked-by: Cezary Rojewski
    Link: https://lore.kernel.org/r/20200218111737.14193-2-tiwai@suse.de
    Signed-off-by: Mark Brown

    Takashi Iwai
     
  • Need to chain the THINKPAD_ACPI, otherwise the mute led will not
    work.

    Fixes: d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen")
    Cc:
    Signed-off-by: Hui Wang
    Link: https://lore.kernel.org/r/20200219052306.24935-1-hui.wang@canonical.com
    Signed-off-by: Takashi Iwai

    Hui Wang
     
  • If the bitwidth passed in to the set_bitwidth function is not supported
    then return an error.

    Fixes: 29b74236bd57 ("ASoC: tas2562: Introduce the TAS2562 amplifier")
    Signed-off-by: Dan Murphy
    Link: https://lore.kernel.org/r/20200218185252.26290-1-dmurphy@ti.com
    Signed-off-by: Mark Brown

    Dan Murphy
     

18 Feb, 2020

4 commits


17 Feb, 2020

3 commits


15 Feb, 2020

2 commits


14 Feb, 2020

2 commits

  • snd_seq_check_queue() passes the current tick and time of the given
    queue as a pointer to snd_seq_prioq_cell_out(), but those might be
    updated concurrently by the seq timer update.

    Fix it by retrieving the current tick and time via the proper helper
    functions at first, and pass those values to snd_seq_prioq_cell_out()
    later in the loops.

    snd_seq_timer_get_cur_time() takes a new argument and adjusts with the
    current system time only when it's requested so; this update isn't
    needed for snd_seq_check_queue(), as it's called either from the
    interrupt handler or right after queuing.

    Also, snd_seq_timer_get_cur_tick() is changed to read the value in the
    spinlock for the concurrency, too.

    Reported-by: syzbot+fd5e0eaa1a32999173b2@syzkaller.appspotmail.com
    Link: https://lore.kernel.org/r/20200214111316.26939-3-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The queue flags are represented in bit fields and the concurrent
    access may result in unexpected results. Although the current code
    should be mostly OK as it's only reading a field while writing other
    fields as KCSAN reported, it's safer to cover both with a proper
    spinlock protection.

    This patch fixes the possible concurrent read by protecting with
    q->owner_lock. Also the queue owner field is protected as well since
    it's the field to be protected by the lock itself.

    Reported-by: syzbot+65c6c92d04304d0a8efc@syzkaller.appspotmail.com
    Reported-by: syzbot+e60ddfa48717579799dd@syzkaller.appspotmail.com
    Link: https://lore.kernel.org/r/20200214111316.26939-2-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

13 Feb, 2020

4 commits

  • The commit 66f2d19f8116 ("ALSA: pcm: Fix memory leak at closing a
    stream without hw_free") tried to fix the regression wrt the missing
    hw_free call at closing without SNDRV_PCM_IOCTL_HW_FREE ioctl.
    However, the code change dropped mistakenly the state check, resulting
    in calling hw_free twice when SNDRV_PCM_IOCTL_HW_FRE got called
    beforehand. For most drivers, this is almost harmless, but the
    drivers like SOF show another regression now.

    This patch adds the state condition check before calling do_hw_free()
    at releasing the stream for avoiding the double hw_free calls.

    Fixes: 66f2d19f8116 ("ALSA: pcm: Fix memory leak at closing a stream without hw_free")
    Reported-by: Bard Liao
    Reported-by: Pierre-Louis Bossart
    Tested-by: Pierre-Louis Bossart
    Cc:
    Link: https://lore.kernel.org/r/s5hd0ajyprg.wl-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The PCM runtime was freed during PMU in the case that the event hook
    encountered an error. However, it is also unconditionally freed during
    PMD. Avoid a double-free by dropping the call to kfree in the PMU hook.

    Fixes: a72706ed8208 ("ASoC: codec2codec: remove ephemeral variables")
    Cc: stable@vger.kernel.org
    Signed-off-by: Samuel Holland
    Link: https://lore.kernel.org/r/20200213061147.29386-2-samuel@sholland.org
    Signed-off-by: Mark Brown

    Samuel Holland
     
  • It should be safe to ignore clock validity check result if the following
    conditions are met:
    - only one single sample rate is supported;
    - the terminal is directly connected to the clock source;
    - the clock type is internal.

    This is to deal with some Denon DJ controllers that always reports that
    clock is invalid.

    Tested-by: Tobias Oszlanyi
    Signed-off-by: Alexander Tsoy
    Cc:
    Link: https://lore.kernel.org/r/20200212235450.697348-1-alexander@tsoy.me
    Signed-off-by: Takashi Iwai

    Alexander Tsoy
     
  • Because of MAX BUFFER size in register,when user/app give small
    buffer size produces noise of old data in buffer.
    This patch rectifies this noise when using different
    buffer sizes less than MAX BUFFER.

    Signed-off-by: Ravulapati Vishnu vardhan rao
    Link: https://lore.kernel.org/r/1581426768-8937-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com
    Signed-off-by: Mark Brown

    Ravulapati Vishnu vardhan rao