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
     

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

1 commit

  • [ 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
     

17 Dec, 2020

2 commits

  • This is buggy and causes kernel crashes.

    Instead of priv->suspended we can use pm_runtime_suspended call.
    priv->suspended was used to keep track if the SOF device is suspended
    in order to avoid suspending an already suspended device.

    SOF has refined its state machine. One problem for SOF imx
    implementation was that if the DSP is turned of and a System PM
    happens then it will leave the DSP turned on.

    In order to fix this in System PM resume we activate runtime PM suspend.
    Thus after SND_SOF_SUSPEND_DELAY_MS timeout the DSP device will enter
    runtime suspend and the DSP will be turned off.

    Signed-off-by: Daniel Baluta

    Daniel Baluta
     
  • This is used by SOF core to keep track of PM state.

    Each PM handler (system/runtime) must call snd_sof_dsp_set_power_state
    and change the state according to the desired PM state.

    Signed-off-by: Daniel Baluta

    Daniel Baluta
     

14 Dec, 2020

25 commits


24 Oct, 2020

1 commit

  • Do not emit a warning for extended firmware header fields that are
    not used by kernel. This creates unnecessary noise to kernel logs like:

    sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 3 size 0x1c
    sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 4 size 0x10

    Signed-off-by: Bard Liao
    Reviewed-by: Pierre-Louis Bossart
    Reviewed-by: Ranjani Sridharan
    Reviewed-by: Guennadi Liakhovetski
    Signed-off-by: Kai Vehmanen
    Link: https://lore.kernel.org/r/20201021182419.1160391-1-kai.vehmanen@linux.intel.com
    Signed-off-by: Mark Brown

    Bard Liao
     

06 Oct, 2020

1 commit


26 Sep, 2020

2 commits

  • Use SOF defined callbacks (snd_sof_prepare/snd_sof_complete)
    in order to update internal SOF system suspend target.

    Reviewed-by: Kai Vehmanen
    Reviewed-by: Paul Olaru
    Reviewed-by: Pierre-Louis Bossart
    Signed-off-by: Daniel Baluta
    Link: https://lore.kernel.org/r/20200924151518.15841-3-daniel.baluta@oss.nxp.com
    Signed-off-by: Mark Brown

    Daniel Baluta
     
  • SOF boots the DSP at probe and keeps it up all the time.
    With this change, after booting if no one is using the DSP
    the SOF core will turn off the DSP to save power.

    Reviewed-by: Kai Vehmanen
    Reviewed-by: Paul Olaru
    Reviewed-by: Pierre-Louis Bossart
    Signed-off-by: Daniel Baluta
    Link: https://lore.kernel.org/r/20200924151518.15841-2-daniel.baluta@oss.nxp.com
    Signed-off-by: Mark Brown

    Daniel Baluta
     

22 Sep, 2020

6 commits

  • Series that fixes checks for 'size' in kcontrol get/put ext_bytes methods
    for SOF. The gaps in these checks were discovered via cppcheck warnings
    on unused variable values.

    Pierre-Louis Bossart (5):
    ASoC: SOF: control: fix size checks for ext_bytes control .get()
    ASoC: SOF: control: fix size checks for volatile ext_bytes control
    .get()
    ASoC: SOF: control: add size checks for ext_bytes control .put()
    ASoC: SOF: control: remove const in sizeof()
    ASoC: SOF: topology: remove const in sizeof()

    sound/soc/sof/control.c | 53 +++++++++++++++++++++++++++++++---------
    sound/soc/sof/topology.c | 2 +-
    2 files changed, 43 insertions(+), 12 deletions(-)

    --
    2.27.0

    Mark Brown
     
  • To provide backward compatibility to older systems, the SOF HDA driver
    allows user to specify which HDMI codec driver to use at runtime via
    kernel parameter. This mechanism has a subtle flaw in that it assumes
    the codec drivers not to be loaded when the SOF PCI driver is loaded.

    The problem is rooted in use of the hdev->type field.
    snd_hdac_ext_bus_device_init() initializes this field to HDA_DEV_ASOC.
    This signals the HDA core that ASoC drivers should be considered in
    driver matching (hda_bus_match()). The SOF and SST drivers continue by
    overriding this field to HDA_DEV_LEGACY and proceeding to load driver
    modules with request_module(). Correct drivers will get loaded and
    attached.

    If however the codec drivers are already loaded when
    snd_hdac_ext_bus_device_init() is called, the matching will not work as
    expected as device type is still set to HDA_DEV_ASOC. Specifically if
    hdac-hdmi is attached when machine driver is configured to use hdac-hda,
    this leads to out-of-bounds memory access in
    hda_dsp_hdmi_build_controls().

    Fix the issue by adding codec type as a parameter to
    snd_hdac_ext_bus_device_init() and ensuring type is set correctly from
    the start.

    Fixes: 139c7febad1a ("ASoC: SOF: Intel: add support for snd-hda-codec-hdmi")
    Signed-off-by: Kai Vehmanen
    Reviewed-by: Guennadi Liakhovetski
    Reviewed-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200921100841.2882662-1-kai.vehmanen@linux.intel.com
    Signed-off-by: Mark Brown

    Kai Vehmanen
     
  • Make sure the TLV header and size are consistent before copying from
    userspace.

    Fixes: c3078f5397046 ('ASoC: SOF: Add Sound Open Firmware KControl support')
    Signed-off-by: Pierre-Louis Bossart
    Reviewed-by: Ranjani Sridharan
    Reviewed-by: Guennadi Liakhovetski
    Signed-off-by: Kai Vehmanen
    Link: https://lore.kernel.org/r/20200921110814.2910477-4-kai.vehmanen@linux.intel.com
    Signed-off-by: Mark Brown

    Pierre-Louis Bossart
     
  • Mirror addition of checks for regular ext_bytes controls.

    Fixes: 783560d02dd61 ('ASoC: SOF: Implement snd_sof_bytes_ext_volatile_get kcontrol IO')
    Signed-off-by: Pierre-Louis Bossart
    Reviewed-by: Ranjani Sridharan
    Reviewed-by: Guennadi Liakhovetski
    Signed-off-by: Kai Vehmanen
    Link: https://lore.kernel.org/r/20200921110814.2910477-3-kai.vehmanen@linux.intel.com
    Signed-off-by: Mark Brown

    Pierre-Louis Bossart
     
  • cppcheck complains twice:

    sound/soc/sof/control.c:436:2: style: Assignment of function parameter
    has no effect outside the function. [uselessAssignmentArg]
    size -= sizeof(const struct snd_ctl_tlv);
    ^

    sound/soc/sof/control.c:436:7: style: Variable 'size' is assigned a
    value that is never used. [unreadVariable]
    size -= sizeof(const struct snd_ctl_tlv);

    Somehow we dropped the checks for the size argument when upstreaming
    the code, somewhere between v5 and v6.

    Re-add a size check to avoid providing userspace with more data that
    it asked for.

    Also fix all error codes, we should return -ENOSPC instead of -EINVAL.

    Fixes: c3078f5397046 ('ASoC: SOF: Add Sound Open Firmware KControl support')
    Signed-off-by: Pierre-Louis Bossart
    Reviewed-by: Ranjani Sridharan
    Reviewed-by: Guennadi Liakhovetski
    Signed-off-by: Kai Vehmanen
    Link: https://lore.kernel.org/r/20200921110814.2910477-2-kai.vehmanen@linux.intel.com
    Signed-off-by: Mark Brown

    Pierre-Louis Bossart
     
  • Fix build warning:
    WARNING: modpost: missing MODULE_LICENSE() in sound/soc/sof/imx/imx-common.o

    Fixes: 18ebffe4d043 ("ASoC: SOF: imx: Add debug support for imx platforms")
    Reported-by: Stephen Rothwell
    Signed-off-by: Kai Vehmanen
    Reviewed-by: Daniel Baluta
    Reviewed-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200921104746.2903507-1-kai.vehmanen@linux.intel.com
    Signed-off-by: Mark Brown

    Kai Vehmanen