30 Jan, 2021

1 commit

  • This is similar with the refactor for i.MX8MP added in commit
    ba2d283f5d9 ("LF-3026-2 ASoC: SOF: imx8m: Remove internal
    priv->suspended variable").

    Because SOF state machine assumes that even if the DSP wasn't previously
    active at a System resume, will re-load the firmware we need to make sure
    that all needed resources are active.

    Kernel core will take care of enabling the PD, we need to make sure that
    we request the MU channels.

    Signed-off-by: Daniel Baluta

    Daniel Baluta
     

20 Jan, 2021

6 commits

  • This is the 5.10.9 stable release

    * tag 'v5.10.9': (153 commits)
    Linux 5.10.9
    netfilter: nf_nat: Fix memleak in nf_nat_init
    netfilter: conntrack: fix reading nf_conntrack_buckets
    ...

    Signed-off-by: Jason Liu

    Jason Liu
     
  • commit f373a811fd9a69fc8bafb9bcb41d2cfa36c62665 upstream.

    Return -ETIMEDOUT if the dsp boot times out instead of returning
    success.

    Fixes: cb6a55284629 ("ASoC: Intel: cnl: Add sst library functions for cnl platform")
    Signed-off-by: Dan Carpenter
    Reviewed-by: Cezary Rojewski
    Link: https://lore.kernel.org/r/X9NEvCzuN+IObnTN@mwanda
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • commit a84dfb3d55934253de6aed38ad75990278a2d21e upstream.

    The signal captured on from tdm decoder of the AXG SoC is incorrect. It
    appears amplified. The skew offset of the decoder is wrong.

    Setting the skew offset to 3, like the g12 and sm1 SoCs, solves and gives
    correct data.

    Fixes: 13a22e6a98f8 ("ASoC: meson: add tdm input driver")
    Signed-off-by: Jerome Brunet
    Link: https://lore.kernel.org/r/20201217150834.3247526-1-jbrunet@baylibre.com
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Jerome Brunet
     
  • commit 671ee4db952449acde126965bf76817a3159040d upstream.

    When the axg-tdm-interface was introduced, the backend DAI was marked as an
    endpoint when DPCM was walking the DAPM graph to find a its BE.

    It is no longer the case since this
    commit 8dd26dff00c0 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks")
    Because of this, when DPCM finds a BE it does everything it needs on the
    DAIs but it won't power up the widgets between the FE and the BE if there
    is no actual endpoint after the BE.

    On meson-axg HWs, the loopback is a special DAI of the tdm-interface BE.
    It is only linked to the dummy codec since there no actual HW after it.
    >From the DAPM perspective, the DAI has no endpoint. Because of this, the TDM
    decoder, which is a widget between the FE and BE is not powered up.

    >From the user perspective, everything seems fine but no data is produced.

    Connecting the Loopback DAI to a dummy DAPM endpoint solves the problem.

    Fixes: 8dd26dff00c0 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks")
    Cc: Charles Keepax
    Signed-off-by: Jerome Brunet
    Link: https://lore.kernel.org/r/20201217150812.3247405-1-jbrunet@baylibre.com
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Jerome Brunet
     
  • commit 5c6679b5cb120f07652418524ab186ac47680b49 upstream.

    A widget's "dirty" list_head, much like its "list" list_head, eventually
    chains back to a list_head on the snd_soc_card itself. This means that
    the list can stick around even after the widget (or all widgets) have
    been freed. Currently, however, widgets that are in the dirty list when
    freed remain there, corrupting the entire list and leading to memory
    errors and undefined behavior when the list is next accessed or
    modified.

    I encountered this issue when a component failed to probe relatively
    late in snd_soc_bind_card(), causing it to bail out and call
    soc_cleanup_card_resources(), which eventually called
    snd_soc_dapm_free() with widgets that were still dirty from when they'd
    been added.

    Fixes: db432b414e20 ("ASoC: Do DAPM power checks only for widgets changed since last run")
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Hebb
    Reviewed-by: Charles Keepax
    Link: https://lore.kernel.org/r/f8b5f031d50122bf1a9bfc9cae046badf4a7a31a.1607822410.git.tommyhebb@gmail.com
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Thomas Hebb
     
  • commit 1f092d1c8819679d78a7d9c62a46d4939d217a9d upstream.

    The ThinkPad X395 latop does not have the internal digital
    microphone connected to the AMD's ACP bridge, but it's advertised
    via BIOS. The internal microphone is connected to the HDA codec.

    Use DMI to block the microphone PCM device for this platform.

    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1892115
    Cc:
    Signed-off-by: Jaroslav Kysela
    Link: https://lore.kernel.org/r/20201227164109.269973-1-perex@perex.cz
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Jaroslav Kysela
     

06 Jan, 2021

4 commits


04 Jan, 2021

1 commit

  • This is the 5.10.4 stable release

    * tag 'v5.10.4': (717 commits)
    Linux 5.10.4
    x86/CPU/AMD: Save AMD NodeId as cpu_die_id
    drm/edid: fix objtool warning in drm_cvt_modes()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/gpu/drm/imx/dcss/dcss-plane.c
    drivers/media/i2c/ov5640.c

    Jason Liu
     

30 Dec, 2020

22 commits

  • commit 55d8e6a85bce21f748c42eedea63681219f70523 upstream.

    The Raven and Renoir ACP can be distinguished by the PCI revision.
    Let's do the check very early, otherwise the wrong probe code
    can be run.

    Link: https://lore.kernel.org/alsa-devel/2e4587f8-f602-cf23-4845-fd27a32b1cfc@amd.com/
    Cc:
    Cc: Vijendar Mukunda
    Cc: Mark Brown
    Signed-off-by: Jaroslav Kysela
    Link: https://lore.kernel.org/r/20201208181233.2745726-1-perex@perex.cz
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Jaroslav Kysela
     
  • commit 718c406e1ffaca4eac987b957bbb36ce1090797a upstream.

    Users reported that some Lenovo AMD platforms do not have ACP microphone,
    but the BIOS advertises it via ACPI.

    This patch create a simple DMI table, where those machines with the broken
    BIOS can be added. The DMI description for Lenovo IdeaPad 5 and
    IdeaPad Flex 5 devices are added there.

    Also describe the dmic_acpi_check kernel module parameter in a more
    understandable way.

    Cc:
    Cc: Vijendar Mukunda
    Cc: Mark Brown
    Signed-off-by: Jaroslav Kysela
    Link: https://lore.kernel.org/r/20201208171200.2737620-1-perex@perex.cz
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Jaroslav Kysela
     
  • commit 0d024a8bec084205fdd9fa17479ba91f45f85db3 upstream.

    The cx2072x codec driver defines multiple DAIs with the same stream
    name "Playback" and "Capture". Although the current code works more
    or less as is as the secondary streams are never used, it still leads
    the error message like:
    debugfs: File 'Playback' in directory 'dapm' already present!
    debugfs: File 'Capture' in directory 'dapm' already present!

    Fix it by renaming the secondary streams to unique names.

    Fixes: a497a4363706 ("ASoC: Add support for Conexant CX2072X CODEC")
    Cc:
    Signed-off-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20201208135154.9188-1-tiwai@suse.de
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • [ Upstream commit 85a7555575a0e48f9b73db310d0d762a08a46d63 ]

    The error handling frees "ctl" but it's still on the "dsp->ctl_list"
    list so that could result in a use after free. Remove it from the list
    before returning.

    Fixes: 2323736dca72 ("ASoC: wm_adsp: Add basic support for rev 1 firmware file format")
    Signed-off-by: Dan Carpenter
    Acked-by: Charles Keepax
    Link: https://lore.kernel.org/r/X9B0keV/02wrx9Xs@mwanda
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Dan Carpenter
     
  • [ Upstream commit 3cea33b6f2d7782d1be17c71509986f33ee93541 ]

    These error paths return success but they should return -EINVAL.

    Fixes: 97ed3e509ee6 ("ASoC: max98390: Fix potential crash during param fw loading")
    Signed-off-by: Dan Carpenter
    Link: https://lore.kernel.org/r/X9B0uz4svyNTqeMb@mwanda
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Dan Carpenter
     
  • [ Upstream commit 95d3befbc5e1ee39fc8a78713924cf7ed2b3cabe ]

    cz_da7219_init() does not check the return values of clk_get(),
    while da7219_clk_enable() calls clk_set_rate() to dereference
    the pointers.
    Add checks to fix the problems.
    Also, change clk_get() to devm_clk_get() to avoid data leak after
    failures.

    Fixes: bb24a31ed584 ("ASoC: AMD: Configure wclk and bclk of master codec")
    Signed-off-by: Chuhong Yuan
    Link: https://lore.kernel.org/r/20201204063610.513556-1-hslester96@gmail.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Chuhong Yuan
     
  • [ Upstream commit b1b8eb1283c90a953089d988930d7b6156418958 ]

    The previous fix left another warning in randconfig builds:

    WARNING: unmet direct dependencies detected for SND_SOC_QDSP6
    Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_QCOM [=y] && QCOM_APR [=y] && COMMON_CLK [=n]
    Selected by [y]:
    - SND_SOC_MSM8996 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_QCOM [=y] && QCOM_APR [=y]

    Add one more dependency for this one.

    Fixes: 2bc8831b135c ("ASoC: qcom: fix SDM845 & QDSP6 dependencies more")
    Signed-off-by: Arnd Bergmann
    Reviewed-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20201203231443.1483763-1-arnd@kernel.org
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Arnd Bergmann
     
  • [ Upstream commit 29275309b0e32bb838d67158c6b6e687275f43e9 ]

    Compile-testing this driver on an older platform without CONFIG_COMMON_CLK fails with

    ERROR: modpost: "clk_set_min_rate" [sound/soc/atmel/snd-soc-mchp-spdifrx.ko] undefined!

    Make this is a strict dependency.

    Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX")
    Signed-off-by: Arnd Bergmann
    Reviewed-by: Codrin Ciubotariu
    Link: https://lore.kernel.org/r/20201203223815.1353451-1-arnd@kernel.org
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Arnd Bergmann
     
  • [ Upstream commit 7061b8a52296e044eed47b605d136a48da1a7761 ]

    gcc points out a memory area that is copied to a device
    but not initialized:

    sound/soc/codecs/cros_ec_codec.c: In function 'i2s_rx_event':
    arch/x86/include/asm/string_32.h:83:20: error: '*((void *)&p+4)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    83 | *((int *)to + 1) = *((int *)from + 1);

    Initialize all the unused fields to zero.

    Fixes: 727f1c71c780 ("ASoC: cros_ec_codec: refactor I2S RX")
    Signed-off-by: Arnd Bergmann
    Acked-by: Tzung-Bi Shih
    Link: https://lore.kernel.org/r/20201203225458.1477830-1-arnd@kernel.org
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Arnd Bergmann
     
  • [ Upstream commit 7e20ae1208daaf6dad85c2dcb968fc590b6f3b99 ]

    setting clock rate on child clocks without a parent clock rate will
    result in zero clk rate for child. This also means that when audio
    is started dsp will attempt to access registers without enabling
    clock resulting in board boot up.

    Fix this by adding the missing parent clock rate.

    Fixes: 520a1c396d196 ("ASoC: q6afe-clocks: add q6afe clock controller")
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20201204164228.1826-1-srinivas.kandagatla@linaro.org
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Srinivas Kandagatla
     
  • [ Upstream commit 1c1fb2653a0c2e3f310c07eacd8fc3a10e08c97a ]

    jz4740_i2s_set_sysclk() does not check the return values of clk_get(),
    while the file dereferences the pointers in clk_put().
    Add the missed checks to fix it.

    Fixes: 11bd3dd1b7c2 ("ASoC: Add JZ4740 ASoC support")
    Signed-off-by: Chuhong Yuan
    Link: https://lore.kernel.org/r/20201203144227.418194-1-hslester96@gmail.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Chuhong Yuan
     
  • [ Upstream commit 0d7f2459ae926a964ab211aac413d72074131727 ]

    Speaker amp's SSP bclk configuration was changed in the topology file to be
    based on 12.288MHz and dai_ops->hw_params is based on s32le format.
    But, the TDM slot size remained set to 24 bits.
    This inconsistency created audible noises and needs to be corrected.
    This patch updates TDM slot width to 32.

    Fixes: bc7477fc2ab4 ("ASoC: Intel: Boards: tgl_max98373: Update TDM configuration in hw_params")

    Signed-off-by: Sathyanarayana Nujella
    Reviewed-by: Pierre-Louis Bossart
    Signed-off-by: Ranjani Sridharan
    Link: https://lore.kernel.org/r/20201201211150.433472-1-ranjani.sridharan@linux.intel.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Sathyanarayana Nujella
     
  • [ Upstream commit 9a207228bdf0a4933b794c944d7111564353ea94 ]

    The Intel Keem Bay audio module is only present on Intel Keem Bay SoCs.
    Hence add a dependency on ARCH_KEEMBAY, to prevent asking the user about
    this driver when configuring a kernel without Intel Keem Bay platform
    support.

    Fixes: c544912bcc2dc806 ("ASoC: Intel: Add makefiles and kconfig changes for KeemBay")
    Signed-off-by: Geert Uytterhoeven
    Link: https://lore.kernel.org/r/20201110145001.3280479-1-geert+renesas@glider.be
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Geert Uytterhoeven
     
  • [ Upstream commit 299fe9937dbd1a4d9a1da6a2b6f222298534ca57 ]

    When compiled with CONFIG_HAVE_CLK, the kernel need to get provider for the
    clock API. This is usually selected by the platform and the sound drivers
    should not really care about this. However COMPILE_TEST is special and the
    platform required may not have been selected, leading to this type of
    error:

    > aiu-encoder-spdif.c:(.text+0x3a0): undefined reference to `clk_set_parent'

    Since we need a sane provider of the API with COMPILE_TEST, depends on
    COMMON_CLK.

    Fixes: 6dc4fa179fb8 ("ASoC: meson: add axg fifo base driver")
    Reported-by: kernel test robot
    Signed-off-by: Jerome Brunet
    Link: https://lore.kernel.org/r/20201116172423.546855-1-jbrunet@baylibre.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Jerome Brunet
     
  • [ Upstream commit 358f0ac1f2791c80c19cc26706cf34664c9fd756 ]

    SND_INTEL_DSP_CONFIG is selected by the HDaudio, Skylake and SOF
    drivers. When the HDaudio link is not selected as a option, this
    Kconfig option is not touched and will default to whatever other
    drivers selected. In the case e.g. where HDaudio is compiled as
    built-in, the linker will complain:

    ld: sound/soc/sof/sof-pci-dev.o: in function `sof_pci_probe':
    sof-pci-dev.c:(.text+0x5c): undefined reference to
    `snd_intel_dsp_driver_probe'

    Adding the select for all HDaudio platforms, regardless of whether
    they rely on the HDaudio link or not, solves the problem.

    Reported-by: Randy Dunlap
    Acked-by: Randy Dunlap
    Fixes: 82d9d54a6c0ee ('ALSA: hda: add Intel DSP configuration / probe code')
    Signed-off-by: Pierre-Louis Bossart
    Reviewed-by: Ranjani Sridharan
    Link: https://lore.kernel.org/r/20201112164425.25603-5-pierre-louis.bossart@linux.intel.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Pierre-Louis Bossart
     
  • [ Upstream commit 5e7aace13df24ff72511f29c14ebbfe638ef733c ]

    In the normal path, we should not free the arizona,
    we should return immediately. It will be free when
    call remove operation.

    Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe")
    Reported-by: Richard Fitzgerald
    Signed-off-by: Zhang Qilong
    Acked-by: Richard Fitzgerald
    Link: https://lore.kernel.org/r/20201111130923.220186-2-zhangqilong3@huawei.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Zhang Qilong
     
  • [ Upstream commit 193aa0a043645220d2a2f783ba06ae13d4601078 ]

    The pm_runtime_enable will increase power disable depth. Thus
    a pairing decrement is needed on the error handling path to
    keep it balanced according to context.

    Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe")
    Signed-off-by: Zhang Qilong
    Reviewed-by: Richard Fitzgerald
    Link: https://lore.kernel.org/r/20201111041326.1257558-4-zhangqilong3@huawei.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Zhang Qilong
     
  • [ Upstream commit b8161cbe55a1892a19a318eaebbda92438fa708c ]

    The pm_runtime_enable will increase power disable depth. Thus
    a pairing decrement is needed on the error handling path to
    keep it balanced according to context.

    Fixes: 57e265c8d71fb ("ASoC: wm8994: Move runtime PM init to platform device init")
    Signed-off-by: Zhang Qilong
    Reviewed-by: Richard Fitzgerald
    Link: https://lore.kernel.org/r/20201111041326.1257558-2-zhangqilong3@huawei.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Zhang Qilong
     
  • [ Upstream commit 4e59dd249cd513a211e2ecce2cb31f4e29a5ce5b ]

    There are two issues in this function.

    1) We can't drop the refrences on "cpu", "codec" and "platform" before
    we take the reference. This doesn't cause a problem on the first
    iteration because those pointers start as NULL so the of_node_put()
    is a no-op. But on the subsequent iterations, it will lead to a use
    after free.

    2) If the devm_kzalloc() allocation failed then the code returned
    directly instead of cleaning up.

    Fixes: c1e6414cdc37 ("ASoC: qcom: common: Fix refcount imbalance on error")
    Fixes: 1e36ea360ab9 ("ASoC: qcom: common: use modern dai_link style")
    Signed-off-by: Dan Carpenter
    Link: https://lore.kernel.org/r/20201105125154.GA176426@mwanda
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Dan Carpenter
     
  • [ Upstream commit 4c22b80f61540ea99d9b4af0127315338755f05b ]

    soc-pcm's dpcm_fe_dai_do_trigger() supported DRAIN commnad up to kernel
    v5.4 where explicit switch(cmd) has been introduced which takes into
    account all SNDRV_PCM_TRIGGER_xxx but SNDRV_PCM_TRIGGER_DRAIN. Update
    switch statement to reactive support for it.

    As DRAIN is somewhat unique by lacking negative/stop counterpart, bring
    behaviour of dpcm_fe_dai_do_trigger() for said command back to its
    pre-v5.4 state by adding it to START/RESUME/PAUSE_RELEASE group.

    Fixes: acbf27746ecf ("ASoC: pcm: update FE/BE trigger order based on the command")
    Signed-off-by: Cezary Rojewski
    Reviewed-by: Ranjani Sridharan
    Link: https://lore.kernel.org/r/20201026100129.8216-1-cezary.rojewski@intel.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Cezary Rojewski
     
  • [ Upstream commit 93c0210671d8f3ec2262da703fab93a1497158a8 ]

    Left and Right justified mode are computed using the same formula
    as DSP_A and DSP_B mode.
    Which is wrong and the user manual explicitly says:

    LRCK_PERDIOD:
    PCM Mode: Number of BCLKs within (Left + Right) channel width.
    I2S/Left-Justified/Right-Justified Mode: Number of BCLKs within each
    individual channel width(Left or Right)

    Fix this by using the same formula as the I2S mode.

    Fixes: 7ae7834ec446 ("ASoC: sun4i-i2s: Add support for DSP formats")
    Signed-off-by: Clément Péron
    Acked-by: Maxime Ripard
    Link: https://lore.kernel.org/r/20201030144648.397824-2-peron.clem@gmail.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Clément Péron
     
  • [ Upstream commit bcc96dc3cf8048c80af7c487af17e19be27ac57d ]

    The check for an error return from the call to snd_pcm_format_width
    is never true as the unsigned int bitwidth can never be less than
    zero. Fix this by making bitwidth an int.

    Fixes: 7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver")
    Signed-off-by: Colin Ian King
    Link: https://lore.kernel.org/r/20201028115112.109017-1-colin.king@canonical.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Colin Ian King
     

18 Dec, 2020

6 commits