Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Apr 12, 2022
  2. Mar 14, 2022
  3. Nov 14, 2021
  4. Jul 19, 2021
  5. Jun 09, 2021
  6. Mar 17, 2021
  7. Jan 05, 2020
  8. Jan 03, 2020
  9. Dec 17, 2019
    • Takashi Iwai's avatar
      ALSA: cmipci: Allow disabling MPU port via module option · d8cac620
      Takashi Iwai authored
      Patrick May reported that his sound card with CMI8378 chip causes a
      crash / reboot when accessing the MIDI port that isn't actually
      present on the board.  Moreover, despite of the documentation,
      passing mpu_port=0 doesn't disable the MIDI port on this board.
      
      It implies that the chip is a newer revision and the MPU401 port is
      integrated and mapped on the PCI register.  For this chip model, the
      driver enables the MPU port unconditionally, so far.
      
      Although fixing the unexpected reboot would be the best solution, it's
      not so trivial to identify the cause.  So, as a plan B, this patch
      extends the existing mpu_port option usage to allow disabling the port
      by specifying the value 0, just like we applied for fm_port option in
      commit 2f24d159
      
       ("[ALSA] cmipci - Allow to disable integrated FM
      port").  As default, the MPU port is still enabled, but user can pass
      mpu_port=0 to disable it.
      
      Reported-and-tested-by: default avatarPatrick May <dusthillresident@gmail.com>
      Link: https://lore.kernel.org/r/20191217081448.1144-1-tiwai@suse.de
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d8cac620
  10. Dec 11, 2019
  11. Nov 06, 2019
  12. May 30, 2019
    • Thomas Gleixner's avatar
      treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 · 1a59d1b8
      Thomas Gleixner authored
      
      Based on 1 normalized pattern(s):
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version this program is distributed in the
        hope that it will be useful but without any warranty without even
        the implied warranty of merchantability or fitness for a particular
        purpose see the gnu general public license for more details you
        should have received a copy of the gnu general public license along
        with this program if not write to the free software foundation inc
        59 temple place suite 330 boston ma 02111 1307 usa
      
      extracted by the scancode license scanner the SPDX license identifier
      
        GPL-2.0-or-later
      
      has been chosen to replace the boilerplate/reference in 1334 file(s).
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: Allison Randal <a...
      1a59d1b8
  13. Feb 06, 2019
  14. Jan 15, 2019
  15. Apr 16, 2018
  16. Aug 22, 2017
  17. Aug 12, 2017
  18. Jun 09, 2017
  19. Apr 20, 2017
    • David Howells's avatar
      Annotate hardware config module parameters in sound/pci/ · 6192c41f
      David Howells authored
      
      When the kernel is running in secure boot mode, we lock down the kernel to
      prevent userspace from modifying the running kernel image.  Whilst this
      includes prohibiting access to things like /dev/mem, it must also prevent
      access by means of configuring driver modules in such a way as to cause a
      device to access or modify the kernel image.
      
      To this end, annotate module_param* statements that refer to hardware
      configuration and indicate for future reference what type of parameter they
      specify.  The parameter parser in the core sees this information and can
      skip such parameters with an error message if the kernel is locked down.
      The module initialisation then runs as normal, but just sees whatever the
      default values for those parameters is.
      
      Note that we do still need to do the module initialisation because some
      drivers have viable defaults set in case parameters aren't specified and
      some drivers support automatic configuration (e.g. PNP or PCI) in addition
      to manually coded parameters.
      
      This patch annotates drivers in sound/pci/.
      
      Suggested-by: default avatarAlan Cox <gnomes@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Jaroslav Kysela <perex@perex.cz>
      cc: Takashi Iwai <tiwai@suse.com>
      cc: alsa-devel@alsa-project.org
      6192c41f
  20. Feb 21, 2017
    • Bhumika Goyal's avatar
      ALSA: pci: constify snd_kcontrol_new structures · f3b827e0
      Bhumika Goyal authored
      
      Declare snd_kcontrol_new structures as const as they are only passed as
      an argument to the function snd_ctl_new1. This argument is of type
      const, so snd_kcontrol_new structures having the same property can be
      made const too.
      Done using Coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct snd_kcontrol_new i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      expression e1;
      @@
      snd_ctl_new1(&i@p,e1)
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct snd_kcontrol_new i;
      
      Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f3b827e0
  21. Nov 13, 2016
  22. Sep 02, 2016
    • Julia Lawall's avatar
      ALSA: constify snd_pcm_ops structures · 6769e988
      Julia Lawall authored
      Check for snd_pcm_ops structures that are only stored in the ops field of a
      snd_soc_platform_driver structure or passed as the third argument to
      snd_pcm_set_ops.  The corresponding field or parameter is declared const,
      so snd_pcm_ops structures that have this property can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/
      
      )
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct snd_pcm_ops i@p = { ... };
      
      @ok1@
      identifier r.i;
      struct snd_soc_platform_driver e;
      position p;
      @@
      e.ops = &i@p;
      
      @ok2@
      identifier r.i;
      expression e1, e2;
      position p;
      @@
      snd_pcm_set_ops(e1, e2, &i@p)
      
      @bad@
      position p != {r.p,ok1.p,ok2.p};
      identifier r.i;
      struct snd_pcm_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct snd_pcm_ops i = { ... };
      // </smpl>
      
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6769e988
  23. May 29, 2015
  24. Feb 25, 2015
  25. Jan 28, 2015
  26. Jan 09, 2015
    • Takashi Iwai's avatar
      ALSA: cmipci: Simplify PM callbacks · 5762fdb5
      Takashi Iwai authored
      This is a similar cleanup like the commit [3db084fd
      
      : ALSA: fm801:
      PCI core handles power state for us].
      
      Since pci_set_power_state(), pci_save_state() and pci_restore_state()
      are already done in the PCI core side, so we don't need to it doubly.
      
      Also, pci_enable_device(), pci_disable_device() and pci_set_master()
      calls in PM callbacks are superfluous nowadays, too, so get rid of
      them as well.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5762fdb5
  27. Aug 12, 2014
  28. Feb 26, 2014
  29. Feb 12, 2014
  30. May 29, 2013
    • Takashi Iwai's avatar
      ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove · 20a24225
      Takashi Iwai authored
      
      As drvdata is cleared to NULL at probe failure or at removal by the
      driver core, we don't have to call pci_set_drvdata(pci, NULL) any
      longer in each driver.
      
      The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in
      hda_intel.c.  Since this function itself releases the card instance,
      we need to clear drvdata here as well, so that it won't be released
      doubly in the remove callback.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      20a24225
  31. Dec 07, 2012
  32. Sep 06, 2012
  33. Aug 14, 2012
  34. Jul 03, 2012
  35. Apr 24, 2012
  36. Dec 19, 2011
  37. Oct 31, 2011