22 Aug, 2020

1 commit

  • Pull sound fixes from Takashi Iwai:
    "A collection of small fixes over several drivers, but all are driver-
    specific and nothing looks scary.

    Slightly large changes are seen in ASoC qcom driver for the bugs that
    were revealed by the recent ASoC core change to report the invalid
    register access errors. Also ASoC fsl got a slight intensive change
    for the distortion fix.

    Others are only trivial fixes or device-specific quirks"

    * tag 'sound-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits)
    ALSA: hda: avoid reset of sdo_limit
    ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion
    ALSA: usb-audio: ignore broken processing/extension unit
    ASoC: intel: Fix memleak in sst_media_open
    ASoC: wm8994: Avoid attempts to read unreadable registers
    ASoC: msm8916-wcd-analog: fix register Interrupt offset
    ASoC: wm8994: Prevent access to invalid VU register bits on WM1811
    ALSA: hda/realtek: Add model alc298-samsung-headphone
    ALSA: usb-audio: Update documentation comment for MS2109 quirk
    ALSA: isa: fix spelling mistakes in the comments
    ALSA: usb-audio: Add capture support for Saffire 6 (USB 1.1)
    ALSA: hda/realtek: Add quirk for Samsung Galaxy Flex Book
    ASoC: q6routing: add dummy register read/write function
    ASoC: q6afe-dai: mark all widgets registers as SND_SOC_NOPM
    ASoC: Make soc_component_read() returning an error code again
    ASoC: amd: Replacing component->name with codec_dai->name.
    ASoC: fsl: Fix unused variable warning
    ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=n
    ASoC: tegra: tegra210_dmic: Fix compile warning with CONFIG_PM=n
    ASoC: tegra: tegra210_ahub: Fix compile warning with CONFIG_PM=n
    ...

    Linus Torvalds
     

16 Aug, 2020

1 commit


07 Aug, 2020

1 commit

  • Pull sound updates from Takashi Iwai:
    "This became wide and scattered updates all over the sound tree as
    diffstat shows: lots of (still ongoing) refactoring works in ASoC,
    fixes and cleanups caught by static analysis, inclusive term
    conversions as well as lots of new drivers. Below are highlights:

    ASoC core:
    - API cleanups and conversions to the unified mute_stream() call
    - Simplify I/O helper functions
    - Use helper macros to retrieve RTD from substreams

    ASoC drivers:
    - Lots of fixes and cleanups in Intel ASoC drivers
    - Lots of new stuff: Freescale MQS and i.MX6sx, Intel KeemBay I2S,
    Maxim MAX98360A and MAX98373 SoundWire, various Mediatek boards,
    nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries
    boards, TI J721e EVM

    ALSA core:
    - Minor code refacotring for SG-buffer handling

    HD-audio:
    - Generalization of mute-LED handling with LED classdev
    - Intel silent stream support for HDMI
    - Device-specific fixes: CA0132, Loongson-3

    Others:
    - Usual USB- and HD-audio quirks for various devices
    - Fixes for echoaudio DMA position handling
    - Various documents and trivial fixes for sparse warnings
    - Conversion to adopt inclusive terms"

    * tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (479 commits)
    ALSA: pci: delete repeated words in comments
    ALSA: isa: delete repeated words in comments
    ALSA: hda/tegra: Add 100us dma stop delay
    ALSA: hda: Add dma stop delay variable
    ASoC: hda/tegra: Set buffer alignment to 128 bytes
    ALSA: seq: oss: Serialize ioctls
    ALSA: hda/hdmi: Add quirk to force connectivity
    ALSA: usb-audio: add startech usb audio dock name
    ALSA: usb-audio: Add support for Lenovo ThinkStation P620
    Revert "ALSA: hda: call runtime_allow() for all hda controllers"
    ALSA: hda/ca0132 - Fix AE-5 microphone selection commands.
    ALSA: hda/ca0132 - Add new quirk ID for Recon3D.
    ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.
    ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops
    ALSA: docs: fix typo
    ALSA: doc: use correct config variable name
    ASoC: core: Two step component registration
    ASoC: core: Simplify snd_soc_component_initialize declaration
    ASoC: core: Relocate and expose snd_soc_component_initialize
    ASoC: sh: Replace 'select' DMADEVICES 'with depends on'
    ...

    Linus Torvalds
     

06 Aug, 2020

1 commit


17 Jul, 2020

1 commit

  • Using uninitialized_var() is dangerous as it papers over real bugs[1]
    (or can in the future), and suppresses unrelated compiler warnings
    (e.g. "unused variable"). If the compiler thinks it is uninitialized,
    either simply initialize the variable or make compiler changes.

    In preparation for removing[2] the[3] macro[4], remove all remaining
    needless uses with the following script:

    git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \
    xargs perl -pi -e \
    's/\buninitialized_var\(([^\)]+)\)/\1/g;
    s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;'

    drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid
    pathological white-space.

    No outstanding warnings were found building allmodconfig with GCC 9.3.0
    for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64,
    alpha, and m68k.

    [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
    [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
    [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
    [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

    Reviewed-by: Leon Romanovsky # drivers/infiniband and mlx4/mlx5
    Acked-by: Jason Gunthorpe # IB
    Acked-by: Kalle Valo # wireless drivers
    Reviewed-by: Chao Yu # erofs
    Signed-off-by: Kees Cook

    Kees Cook
     

10 Jul, 2020

1 commit


09 Jul, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva
    Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor
    Signed-off-by: Takashi Iwai

    Gustavo A. R. Silva
     

07 Jul, 2020

2 commits

  • Fix W=1 warning by noting variable as __always_unused.

    sound/isa/gus/gus_uart.c: In function ‘snd_gf1_interrupt_midi_in’:
    sound/isa/gus/gus_uart.c:16:22: warning: variable ‘data’ set but not
    used [-Wunused-but-set-variable]
    16 | unsigned char stat, data, byte;

    Signed-off-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200702193604.169059-3-pierre-louis.bossart@linux.intel.com
    Signed-off-by: Takashi Iwai

    Pierre-Louis Bossart
     
  • Fix W=1 warnings by adding prototypes to header file

    sound/isa/gus/gus_timer.c:141:6: warning: no previous prototype for
    ‘snd_gf1_timers_init’ [-Wmissing-prototypes]
    141 | void snd_gf1_timers_init(struct snd_gus_card * gus)
    | ^~~~~~~~~~~~~~~~~~~
    sound/isa/gus/gus_timer.c:177:6: warning: no previous prototype for
    ‘snd_gf1_timers_done’ [-Wmissing-prototypes]
    177 | void snd_gf1_timers_done(struct snd_gus_card * gus)
    | ^~~~~~~~~~~~~~~~~~~

    Signed-off-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200702193604.169059-2-pierre-louis.bossart@linux.intel.com
    Signed-off-by: Takashi Iwai

    Pierre-Louis Bossart
     

03 Jun, 2020

1 commit

  • snd_es968_pnp_detect() misses a snd_card_free() in a failed path.
    Add the missed function call to fix it.

    Fixes: a20971b201ac ("ALSA: Merge es1688 and es968 drivers")
    Signed-off-by: Chuhong Yuan
    Cc:
    Link: https://lore.kernel.org/r/20200603092459.1424093-1-hslester96@gmail.com
    Signed-off-by: Takashi Iwai

    Chuhong Yuan
     

28 May, 2020

1 commit


01 May, 2020

1 commit


30 Apr, 2020

1 commit

  • gcc-10 points out a few instances of suspicious integer arithmetic
    leading to value truncation:

    sound/isa/opti9xx/opti92x-ad1848.c: In function 'snd_opti9xx_configure':
    sound/isa/opti9xx/opti92x-ad1848.c:322:43: error: overflow in conversion from 'int' to 'unsigned char' changes value from '(int)snd_opti9xx_read(chip, 3) & -256 | 240' to '240' [-Werror=overflow]
    322 | (snd_opti9xx_read(chip, reg) & ~(mask)) | ((value) & (mask)))
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
    sound/isa/opti9xx/opti92x-ad1848.c:351:3: note: in expansion of macro 'snd_opti9xx_write_mask'
    351 | snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(3), 0xf0, 0xff);
    | ^~~~~~~~~~~~~~~~~~~~~~
    sound/isa/opti9xx/miro.c: In function 'snd_miro_configure':
    sound/isa/opti9xx/miro.c:873:40: error: overflow in conversion from 'int' to 'unsigned char' changes value from '(int)snd_miro_read(chip, 3) & -256 | 240' to '240' [-Werror=overflow]
    873 | (snd_miro_read(chip, reg) & ~(mask)) | ((value) & (mask)))
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
    sound/isa/opti9xx/miro.c:1010:3: note: in expansion of macro 'snd_miro_write_mask'
    1010 | snd_miro_write_mask(chip, OPTi9XX_MC_REG(3), 0xf0, 0xff);
    | ^~~~~~~~~~~~~~~~~~~

    These are all harmless here as only the low 8 bit are passed down
    anyway. Change the macros to inline functions to make the code
    more readable and also avoid the warning.

    Strictly speaking those functions also need locking to make the
    read/write pair atomic, but it seems unlikely that anyone would
    still run into that issue.

    Fixes: 1841f613fd2e ("[ALSA] Add snd-miro driver")
    Signed-off-by: Arnd Bergmann
    Link: https://lore.kernel.org/r/20200429190216.85919-1-arnd@arndb.de
    Signed-off-by: Takashi Iwai

    Arnd Bergmann
     

17 Apr, 2020

1 commit


10 Feb, 2020

1 commit

  • Fixes the sparse warnings. The cast to __user pointer needs __force:
    sound/isa/sb/emu8000_pcm.c:528:9: warning: cast removes address space '' of expression

    No functional changes, just sparse warning fixes.

    Link: https://lore.kernel.org/r/20200206163152.6073-4-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

29 Jan, 2020

1 commit

  • Pull sound updates from Takashi Iwai:
    "As the diffstat shows we've had again a lot of works done for this
    cycle: the majority of changes are the continued componentization and
    code refactoring in ASoC, the tree-wide PCM API updates and cleanups
    and SOF updates while a few ASoC driver updates are seen, too.

    Here we go, some highlights:

    Core:
    - Finally y2038 support landed to ALSA ABI; some ioctls have been
    extended and lots of tricks were applied
    - Applying the new managed PCM buffer API to all drivers; the API
    itself was already merged in 5.5
    - The already deprecated dimension support in ALSA control API is
    dropped completely now
    - Verification of ALSA control elements to catch API misuses

    ASoC:
    - Further code refactorings and moving things to the component level
    - Lots of updates and improvements on SOF / Intel drivers; now
    including common HDMI driver and SoundWire support
    - New driver support for Ingenic JZ4770, Mediatek MT6660, Qualcomm
    WCD934x and WSA881x, and Realtek RT700, RT711, RT715, RT1011,
    RT1015 and RT1308

    HD-audio:
    - Improved ring-buffer communications using waitqueue
    - Drop the superfluous buffer preallocation on x86

    Others:
    - Many code cleanups, mostly constifications over the whole tree
    - USB-audio: quirks for MOTU, Corsair Virtuoso, Line6 Helix
    - FireWire: code refactoring for oxfw and dice drivers"

    * tag 'sound-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (638 commits)
    ALSA: usb-audio: add quirks for Line6 Helix devices fw>=2.82
    ALSA: hda: Add Clevo W65_67SB the power_save blacklist
    ASoC: soc-core: remove null_snd_soc_ops
    ASoC: soc-pcm: add soc_rtd_trigger()
    ASoC: soc-pcm: add soc_rtd_hw_free()
    ASoC: soc-pcm: add soc_rtd_hw_params()
    ASoC: soc-pcm: add soc_rtd_prepare()
    ASoC: soc-pcm: add soc_rtd_shutdown()
    ASoC: soc-pcm: add soc_rtd_startup()
    ASoC: rt1015: add rt1015 amplifier driver
    ASoC: madera: Correct some kernel doc
    ASoC: topology: fix soc_tplg_fe_link_create() - link->dobj initialization order
    ASoC: Intel: skl_hda_dsp_common: Fix global-out-of-bounds bug
    ASoC: madera: Correct DMIC only input hook ups
    ALSA: cs46xx: fix spelling mistake "to" -> "too"
    ALSA: hda - Add docking station support for Lenovo Thinkpad T420s
    ASoC: Add MediaTek MT6660 Speaker Amp Driver
    ASoC: dt-bindings: rt5645: add suppliers
    ASoC: max98090: fix deadlock in max98090_dapm_put_enum_double()
    ASoC: dapm: add snd_soc_dapm_put_enum_double_locked
    ...

    Linus Torvalds
     

06 Jan, 2020

1 commit


05 Jan, 2020

10 commits

  • Apply const prefix to the static resource tables.

    Just for minor optimization and no functional changes.

    Link: https://lore.kernel.org/r/20200105144823.29547-53-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Apply const prefix to the static tables for parameters.

    Just for minor optimization and no functional changes.

    Link: https://lore.kernel.org/r/20200105144823.29547-52-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Apply const prefix to the static resource tables, the mc size tables
    and the string arrays.

    Just for minor optimization and no functional changes.

    Link: https://lore.kernel.org/r/20200105144823.29547-51-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Apply const prefix to each possible place: the static resource tables,
    the volume table, etc.

    Just for minor optimization and no functional changes.

    Link: https://lore.kernel.org/r/20200105144823.29547-50-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Apply const prefix to the static map tables and the static resource
    tables.

    Just for minor optimization and no functional changes.

    Link: https://lore.kernel.org/r/20200105144823.29547-49-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Apply const prefix to the static resource tables and init tables.

    Just for minor optimization and no functional changes.

    Link: https://lore.kernel.org/r/20200105144823.29547-48-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Apply const prefix to the static tables for the register, controls and
    callbacks.

    Just for minor optimization and no functional changes.

    Link: https://lore.kernel.org/r/20200105144823.29547-47-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Apply const prefix to each possible place: the static tables for the
    resources, controls, registers, values and parameters.

    Just for minor optimization and no functional changes.

    Link: https://lore.kernel.org/r/20200105144823.29547-46-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Apply const prefix to the static mapping table.

    Just for minor optimization and no functional changes.

    Link: https://lore.kernel.org/r/20200105144823.29547-45-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Apply const prefix to the static resource tables.

    Just for minor optimization and no functional changes.

    Link: https://lore.kernel.org/r/20200105144823.29547-44-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

03 Jan, 2020

4 commits

  • Most of snd_kcontrol_new definitions are read-only and passed as-is.
    Let's declare them as const for further optimization.

    There should be no functional changes by this patch.

    Link: https://lore.kernel.org/r/20200103081714.9560-36-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The reference to snd_info_entry_ops is rather read-only, so declare it
    as a const pointer. This allows a bit more optimization.

    There should be no functional changes by this patch.

    Link: https://lore.kernel.org/r/20200103081714.9560-29-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Most of snd_timer_hardware definitions do simply copying to another
    struct as-is. Mark them as const for further optimization.

    There should be no functional changes by this patch.

    Link: https://lore.kernel.org/r/20200103081714.9560-22-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Now we may declare const for snd_device_ops definitions, so let's do
    it for optimization.

    There should be no functional changes by this patch.

    Link: https://lore.kernel.org/r/20200103081714.9560-8-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

01 Jan, 2020

1 commit

  • The snd_ad1816a_timer_table structure is only copied into
    another structure, so make it const.

    The opportunity for this change was found using Coccinelle.

    Signed-off-by: Julia Lawall
    Link: https://lore.kernel.org/r/1577864614-5543-2-git-send-email-Julia.Lawall@inria.fr
    Signed-off-by: Takashi Iwai

    Julia Lawall
     

11 Dec, 2019

8 commits

  • The driver invokes snd_pcm_period_elapsed() simply from the interrupt
    handler. Set card->sync_irq for enabling the missing sync_stop PCM
    operation.

    Link: https://lore.kernel.org/r/20191210063454.31603-49-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The driver invokes snd_pcm_period_elapsed() simply from the interrupt
    handler. Set card->sync_irq for enabling the missing sync_stop PCM
    operation.

    Link: https://lore.kernel.org/r/20191210063454.31603-48-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The driver invokes snd_pcm_period_elapsed() simply from the interrupt
    handler. Set card->sync_irq for enabling the missing sync_stop PCM
    operation.

    Link: https://lore.kernel.org/r/20191210063454.31603-47-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The driver invokes snd_pcm_period_elapsed() simply from the interrupt
    handler. Set card->sync_irq for enabling the missing sync_stop PCM
    operation.

    Link: https://lore.kernel.org/r/20191210063454.31603-46-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The driver invokes snd_pcm_period_elapsed() simply from the interrupt
    handler. Set card->sync_irq for enabling the missing sync_stop PCM
    operation.

    Link: https://lore.kernel.org/r/20191210063454.31603-45-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The driver invokes snd_pcm_period_elapsed() simply from the interrupt
    handler. Set card->sync_irq for enabling the missing sync_stop PCM
    operation.

    Link: https://lore.kernel.org/r/20191210063454.31603-44-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The driver invokes snd_pcm_period_elapsed() simply from the interrupt
    handler. Set card->sync_irq for enabling the missing sync_stop PCM
    operation.

    Link: https://lore.kernel.org/r/20191210063454.31603-43-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The driver invokes snd_pcm_period_elapsed() simply from the interrupt
    handler. Set card->sync_irq for enabling the missing sync_stop PCM
    operation.

    Link: https://lore.kernel.org/r/20191210063454.31603-42-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai