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
     

12 Feb, 2020

4 commits

  • MSI-GL73 laptop with ALC1220 codec requires a similar workaround for
    Clevo laptops to enforce the DAC/mixer connection path. Set up a
    quirk entry for that.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204159
    Cc:
    Link: https://lore.kernel.org/r/20200212081047.27727-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Add supported Headset Button for ALC215/ALC285/ALC289.

    Signed-off-by: Kailang Yang
    Cc:
    Link: https://lore.kernel.org/r/948f70b4488f4cc2b629a39ce4e4be33@realtek.com
    Signed-off-by: Takashi Iwai

    Kailang Yang
     
  • The Audioengine D1 (0x2912:0x30c8) does support reading the sample rate,
    but it returns the rate in byte-reversed order.

    When setting sampling rate, the driver produces these warning messages:
    [168840.944226] usb 3-2.2: current rate 4500480 is different from the runtime rate 44100
    [168854.930414] usb 3-2.2: current rate 8436480 is different from the runtime rate 48000
    [168905.185825] usb 3-2.1.2: current rate 30465 is different from the runtime rate 96000

    As can be seen from the hexadecimal conversion, the current rate read
    back is byte-reversed from the rate that was set.

    44100 == 0x00ac44, 4500480 == 0x44ac00
    48000 == 0x00bb80, 8436480 == 0x80bb00
    96000 == 0x017700, 30465 == 0x007701

    Rather than implementing a new quirk to reverse the order, just skip
    checking the rate to avoid spamming the log.

    Signed-off-by: Arvind Sankar
    Cc:
    Link: https://lore.kernel.org/r/20200211162235.1639889-1-nivedita@alum.mit.edu
    Signed-off-by: Takashi Iwai

    Arvind Sankar
     
  • We've got a regression report about M-Audio Fast Track C400 device,
    and the git bisection resulted in the commit e0ccdef92653 ("ALSA:
    usb-audio: Clean up check_input_term()"). This commit was about the
    rewrite of the input terminal parser, and it's not too obvious from
    the change what really broke. The answer is: it's the interpretation
    of UAC2/3 effect units.

    In the original code, UAC2 effect unit is as if through UAC1
    processing unit because both UAC1 PU and UAC2/3 EU share the same
    number (0x07). The old code went through a complex switch-case
    fallthrough, finally bailing out in the middle:

    if (protocol == UAC_VERSION_2 &&
    hdr[2] == UAC2_EFFECT_UNIT) {
    /* UAC2/UAC1 unit IDs overlap here in an
    * uncompatible way. Ignore this unit for now.
    */
    return 0;
    }

    ... and this special handling was missing in the new code; the new
    code treats UAC2/3 effect unit as if it were equivalent with the
    processing unit.

    Actually, the old code was too confusing. The effect unit has an
    incompatible unit description with the processing unit, so we
    shouldn't have dealt with EU in the same way.

    This patch addresses the regression by changing the effect unit
    handling to the own parser function. The own parser function makes
    the clear distinct with PU, so it improves the readability, too.

    The EU parser just sets the type and the id like the old kernels.
    Once when the proper effect unit support is added, we can revisit this
    parser function, but for now, let's keep this simple setup as is.

    Fixes: e0ccdef92653 ("ALSA: usb-audio: Clean up check_input_term()")
    Cc:
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206147
    Link: https://lore.kernel.org/r/20200211160521.31990-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

11 Feb, 2020

1 commit

  • Jabra Evolve 65 headset appears as if supporting lower rates than
    48kHz, but it actually doesn't work but with 48kHz for playback.

    This patch applies a workaround to enforce the 48kHz like LINE6
    devices already did. The workaround is put in a unified helper
    function, set_fixed_rate(), to be called from both places now.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206149
    Link: https://lore.kernel.org/r/20200211111419.5895-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

10 Feb, 2020

4 commits

  • To be compliant with i915 display driver requirements, i915 power-up
    must be done before any HDA communication takes place, including
    parsing the bus capabilities. Otherwise the initial codec probe
    may fail.

    Move i915 initialization earlier in the SOF HDA sequence. This
    sequence is now aligned with the snd-hda-intel driver where the
    display_power() call is before snd_hdac_bus_parse_capabilities()
    and rest of the capability parsing.

    Also remove unnecessary ifdef around hda_codec_i915_init(). There's
    a dummy implementation provided if CONFIG_SND_SOC_SOF_HDA is not
    enabled.

    Signed-off-by: Kai Vehmanen
    Reviewed-by: Ranjani Sridharan
    Reviewed-by: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200206200223.7715-3-kai.vehmanen@linux.intel.com
    Signed-off-by: Mark Brown

    Kai Vehmanen
     
  • When HDA controller is resumed from suspend, i915 HDMI/DP
    codec requires that following order of actions is kept:

    - i915 display power up and configuration of link params
    - hda link reset and setup

    Current SOF HDA code delegates display codec power control
    to the codec driver. This works most of the time, but in
    runtime PM sequences, the above constraint may be violated.
    On platforms where BIOS values for HDA link parameters do
    not match hardware reset defaults, this may lead to errors
    in HDA verb transactions after resume.

    Fix the issue by explicitly powering the display codec
    in the HDA controller resume/suspend calls, thus ensuring
    correct ordering. Special handling is needed for the D0i3
    flow, where display power must be turned off even though
    DSP is left powered.

    Now that we have more invocations of the display power helper
    functions, the conditional checks surrounding each call have
    been moved inside hda_codec_i915_display_power(). The two
    special cases of display powering at initial probe are handled
    separately. The intent is to avoid powering the display whenever
    no display codecs are used.

    Note that early powering of display was removed in
    commit 687ae9e287b3 ("ASoC: intel: skl: Fix display power regression").
    This change was also copied to the SOF driver. No failures
    have resulted as hardware default values for link parameters
    have worked out of the box. However with recent i915 driver
    changes like done in commit 87c1694533c9 ("drm/i915: save
    AUD_FREQ_CNTRL state at audio domain suspend"), this does not
    hold anymore and errors are hit.

    Cc: Takashi Iwai
    Signed-off-by: Kai Vehmanen
    Reviewed-by: Ranjani Sridharan
    Reviewed-by: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200206200223.7715-2-kai.vehmanen@linux.intel.com
    Signed-off-by: Mark Brown

    Kai Vehmanen
     
  • snd_hdac_ext_bus_link_get() does not work correctly in case
    there are multiple codecs on the bus. It unconditionally
    resets the bus->codec_mask value. As per documentation in
    hdaudio.h and existing use in client code, this field should
    be used to store bit flag of detected codecs on the bus.

    By overwriting value of the codec_mask, information on all
    detected codecs is lost. No current user of hdac is impacted,
    but use of bus->codec_mask is planned in future patches
    for SOF.

    Signed-off-by: Kai Vehmanen
    Reviewed-by: Ranjani Sridharan
    Reviewed-by: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Link: https://lore.kernel.org/r/20200206200223.7715-1-kai.vehmanen@linux.intel.com
    Signed-off-by: Mark Brown

    Kai Vehmanen
     
  • The ssc audio driver can call into both pdc and dma backends. With the
    latest rework, the logic to do this in a safe way avoiding link errors
    was removed, bringing back link errors that were fixed long ago in commit
    061981ff8cc8 ("ASoC: atmel: properly select dma driver state") such as

    sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_set_audio':
    atmel_ssc_dai.c:(.text+0xac): undefined reference to `atmel_pcm_pdc_platform_register'

    Fix it this time using Makefile hacks and a comment to prevent this
    from accidentally getting removed again rather than Kconfig hacks.

    Fixes: 18291410557f ("ASoC: atmel: enable SOC_SSC_PDC and SOC_SSC_DMA in Kconfig")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Codrin Ciubotariu
    Link: https://lore.kernel.org/r/20200130130545.31148-1-codrin.ciubotariu@microchip.com
    Reviewed-by: Michał Mirosław
    Signed-off-by: Mark Brown

    Arnd Bergmann
     

06 Feb, 2020

5 commits

  • If the imx-sdma driver is built as a module, the fsl-sai device doesn't
    disable on probing failure, which causes the warning in the next probing:

    ==================================================================
    fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable!
    fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable!
    fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable!
    fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable!
    fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable!
    fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable!
    ==================================================================

    Disabling the device properly fixes the issue.

    Fixes: 812ad463e089 ("ASoC: fsl_sai: Add support for runtime pm")
    Signed-off-by: Oleksandr Suvorov
    Link: https://lore.kernel.org/r/20200205160436.3813642-1-oleksandr.suvorov@toradex.com
    Signed-off-by: Mark Brown

    Oleksandr Suvorov
     
  • Pull sound fixes from Takashi Iwai:
    "A collection of pending small fixes:

    ALSA core:
    - PCM memory leak fix

    ASoC:
    - Lots of SOF and Intel driver fixes
    - Addition of COMMON_CLK for wcd934x
    - Regression fixes for AMD and Tegra platforms

    HD-audio:
    - DP-MST HDMI regression fix, Tegra workarounds, HP quirk fix

    Others:
    - A few fixes relevant with the recent uapi-updates
    - Sparse warnings and endianness fixes"

    * tag 'sound-fix-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (35 commits)
    ALSA: hda: Clear RIRB status before reading WP
    ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic supported
    ASoC: wcd934x: Add missing COMMON_CLK dependency to SND_SOC_ALL_CODECS
    ALSA: hda - Fix DP-MST support for NVIDIA codecs
    ASoC: wcd934x: Add missing COMMON_CLK dependency
    MAINTAINERS: Remove the Bard Liao from the MAINTAINERS of Realtek CODECs
    ASoC: tegra: Revert 24 and 32 bit support
    ASoC: SOF: Intel: add PCI ID for JasperLake
    ALSA: hdsp: Make the firmware loading ioctl a bit more readable
    ALSA: emu10k1: Fix annotation and cast for the recent uapi header change
    ALSA: dummy: Fix PCM format loop in proc output
    ALSA: usb-audio: Annotate endianess in Scarlett gen2 quirk
    ALSA: usb-audio: Fix endianess in descriptor validation
    ALSA: hda: Add JasperLake PCI ID and codec vid
    ALSA: pcm: Fix sparse warnings wrt snd_pcm_state_t
    ALSA: pcm: Fix memory leak at closing a stream without hw_free
    ALSA: uapi: Fix sparse warning
    ASoC: rt715: Add __maybe_unused to PM callbacks
    ASoC: rt711: Add __maybe_unused to PM callbacks
    ASoC: rt700: Add __maybe_unused to PM callbacks
    ...

    Linus Torvalds
     
  • …ie/sound into for-linus

    ASoC: Fix for v5.6

    An incremental fix for the Qualcomm COMMON_CLK issue.

    Takashi Iwai
     
  • RIRB interrupt status getting cleared after the write pointer is read
    causes a race condition, where last response(s) into RIRB may remain
    unserviced by IRQ, eventually causing azx_rirb_get_response to fall
    back to polling mode. Clearing the RIRB interrupt status ahead of
    write pointer access ensures that this condition is avoided.

    Signed-off-by: Mohan Kumar
    Signed-off-by: Viswanath L
    Link: https://lore.kernel.org/r/1580983853-351-1-git-send-email-viswanathl@nvidia.com
    Signed-off-by: Takashi Iwai

    Mohan Kumar
     
  • HP want to keep BIOS verb table for release platform.
    So, it need to add 0x19 pin for quirk.

    Fixes: 5af29028fd6d ("ALSA: hda/realtek - Add Headset Mic supported for HP cPC")
    Signed-off-by: Kailang Yang
    Link: https://lore.kernel.org/r/74636ccb700a4cbda24c58a99dc430ce@realtek.com
    Signed-off-by: Takashi Iwai

    Kailang Yang
     

05 Feb, 2020

3 commits

  • …ie/sound into for-linus

    ASoC: Fixes for v5.6

    A collection of updates for bugs fixed since the initial pull
    request, the most important one being the addition of COMMON_CLK
    for wcd934x which is needed for MFD to be merged.

    Takashi Iwai
     
  • Just adding a dependency on COMMON_CLK to SND_SOC_WCD934X is not
    sufficient, as enabling SND_SOC_ALL_CODECS will still select it,
    breaking the build later:

    WARNING: unmet direct dependencies detected for SND_SOC_WCD934X
    Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && COMMON_CLK [=n] && MFD_WCD934X [=m]
    Selected by [m]:
    - SND_SOC_ALL_CODECS [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && COMPILE_TEST [=y] && MFD_WCD934X [=m]
    ...
    ERROR: "of_clk_add_provider" [sound/soc/codecs/snd-soc-wcd934x.ko] undefined!
    ERROR: "of_clk_src_simple_get" [sound/soc/codecs/snd-soc-wcd934x.ko] undefined!
    ERROR: "clk_hw_register" [sound/soc/codecs/snd-soc-wcd934x.ko] undefined!
    ERROR: "__clk_get_name" [sound/soc/codecs/snd-soc-wcd934x.ko] undefined!

    Fix this by adding the missing dependency to SND_SOC_ALL_CODECS

    Fixes: 42b716359beca106 ("ASoC: wcd934x: Add missing COMMON_CLK dependency")
    Signed-off-by: Geert Uytterhoeven
    Tested-by: Stephen Rothwell
    Link: https://lore.kernel.org/r/20200204131857.7634-1-geert@linux-m68k.org
    Signed-off-by: Mark Brown

    Geert Uytterhoeven
     
  • If dyn_pcm_assign is set, different jack objects are being created
    for pcm and pins.

    If dyn_pcm_assign is set, generic_hdmi_build_jack() calls into
    add_hdmi_jack_kctl() to create and track separate jack object for
    pcm. Like sync_eld_via_acomp(), hdmi_present_sense_via_verbs() also
    need to report status change of the pcm jack.

    Rename pin_idx_to_jack() to pin_idx_to_pcm_jack(). Update
    hdmi_present_sense_via_verbs() to report plug state of pcm jack
    object. Unlike sync_eld_via_acomp(), for !acomp drivers the pcm
    jack's plug state must be consistent with plug state
    of pin's jack.

    Fixes: 5398e94fb753 ("ALSA: hda - Add DP-MST support for NVIDIA codecs")
    Reported-and-tested-by: Martin Regner
    Signed-off-by: Nikhil Mahale
    Reviewed-by: Kai Vehmanen
    Cc:
    Link: https://lore.kernel.org/r/20200204102746.1356-1-nmahale@nvidia.com
    Signed-off-by: Takashi Iwai

    Nikhil Mahale
     

04 Feb, 2020

3 commits

  • Looks like some platforms are not yet using COMMON CLK.

    PowerPC allyesconfig failed with below error in next

    ld: sound/soc/codecs/wcd934x.o:(.toc+0x0):
    undefined reference to `of_clk_src_simple_get'
    ld: sound/soc/codecs/wcd934x.o: in function `.wcd934x_codec_probe':
    wcd934x.c:(.text.wcd934x_codec_probe+0x3d4):
    undefined reference to `.__clk_get_name'
    ld: wcd934x.c:(.text.wcd934x_codec_probe+0x438):
    undefined reference to `.clk_hw_register'
    ld: wcd934x.c:(.text.wcd934x_codec_probe+0x474):
    undefined reference to `.of_clk_add_provider'

    Add the missing COMMON_CLK dependency to fix this errors.

    Reported-by: Stephen Rothwell
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20200204111241.6927-1-srinivas.kandagatla@linaro.org
    Signed-off-by: Mark Brown

    Srinivas Kandagatla
     
  • 'PTR_ERR(p) == -E*' is a stronger condition than IS_ERR(p).
    Hence, IS_ERR(p) is unneeded.

    The semantic patch that generates this commit is as follows:

    //
    @@
    expression ptr;
    constant error_code;
    @@
    -IS_ERR(ptr) && (PTR_ERR(ptr) == - error_code)
    +PTR_ERR(ptr) == - error_code
    //

    Link: http://lkml.kernel.org/r/20200106045833.1725-1-masahiroy@kernel.org
    Signed-off-by: Masahiro Yamada
    Cc: Julia Lawall
    Acked-by: Stephen Boyd [drivers/clk/clk.c]
    Acked-by: Bartosz Golaszewski [GPIO]
    Acked-by: Wolfram Sang [drivers/i2c]
    Acked-by: Rafael J. Wysocki [acpi/scan.c]
    Acked-by: Rob Herring
    Cc: Eric Biggers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     
  • The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in
    seq_file.h.

    Conversion rule is:

    llseek => proc_lseek
    unlocked_ioctl => proc_ioctl

    xxx => proc_xxx

    delete ".owner = THIS_MODULE" line

    [akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c]
    [sfr@canb.auug.org.au: fix kernel/sched/psi.c]
    Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au
    Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2
    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

02 Feb, 2020

4 commits

  • Commit f3ee99087c8ca0ecfdd549ef5a94f557c42d5428 ("ASoC: tegra: Allow
    24bit and 32bit samples") added 24-bit and 32-bit support for to the
    Tegra30 I2S driver. However, there are two additional commits that are
    also needed to get 24-bit and 32-bit support to work correctly. These
    commits are not yet applied because there are still some review comments
    that need to be addressed. With only this change applied, 24-bit and
    32-bit support is advertised by the I2S driver, but it does not work and
    the audio is distorted. Therefore, revert this patch for now until the
    other changes are also ready.

    Furthermore, a clock issue with 24-bit support has been identified with
    this change and so if we revert this now, we can also fix that in the
    updated version.

    Reported-by: Dmitry Osipenko
    Signed-off-by: Jon Hunter
    Tested-by: Dmitry Osipenko
    Link: https://lore.kernel.org/r/20200131091901.13014-1-jonathanh@nvidia.com
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Jon Hunter
     
  • Mirror ID added for legacy HDaudio.

    Signed-off-by: Yong Zhi
    Signed-off-by: Divagar Mohandass
    Signed-off-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200131204032.10213-1-pierre-louis.bossart@linux.intel.com
    Signed-off-by: Mark Brown

    Yong Zhi
     
  • The firmware loading ioctl that is implemented for hdsp hwdep device
    takes the reference of the address pointer, hence the current code is
    rather confusing. Also, due to the recent change in uapi header,
    sparse also complains about the cast.

    This patch tries to improve the readability by converting the
    straightforward copy_from_user of the whole struct (which contains
    only the pointer).

    Fixes: d63e63d42107 ("ALSA: hdsp: Make uapi/hdsp.h compilable again")
    Link: https://lore.kernel.org/r/20200202090724.18232-2-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The recent sound/emu10k1.h uapi header change by the commit
    2e4688676392 ("ALSA: emu10k1: Make uapi/emu10k1.h compilable again")
    made sparse angry because of the inconsistency of __user annotation
    and the own ctl id struct that were changed in uapi header.

    This patch addresses those by adjusting the cast and annotations
    properly again.

    Fixes: 2e4688676392 ("ALSA: emu10k1: Make uapi/emu10k1.h compilable again")
    Link: https://lore.kernel.org/r/20200202090724.18232-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

01 Feb, 2020

1 commit