1. 13 Nov, 2013 1 commit
  2. 12 Nov, 2013 1 commit
    • ALSA: msnd: Avoid duplicated driver name · 092f9cd1
      Takashi Iwai authored
      msnd_pinnacle.c is used for both snd-msnd-pinnacle and
      snd-msnd-classic drivers, and both should have different driver
      names.  Using the same driver name results in the sysfs warning for
      duplicated entries like
       kobject: 'msnd-pinnacle.7' (cec33408): kobject_release, parent   (null) (delayed)
       kobject: 'msnd-pinnacle' (cecd4980): kobject_release, parent cf3ad9b0 (delayed)
       ------------[ cut here ]------------
       WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:486 sysfs_warn_dup+0x7d/0xa0()
       sysfs: cannot create duplicate filename '/bus/isa/drivers/msnd-pinnacle'
       ......
      Reported-by: 's avatarFengguang Wu <fengguang.wu@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
  3. 07 Nov, 2013 1 commit
  4. 06 Nov, 2013 1 commit
  5. 28 Aug, 2013 1 commit
    • ALSA: opti9xx: Fix conflicting driver object name · fb615499
      Takashi Iwai authored
      The recent commit to delay the release of kobject triggered NULL
      dereferences of opti9xx drivers.  The cause is that all
      snd-opti92x-ad1848, snd-opti92x-cs4231 and snd-opti93x drivers
      register the PnP card driver with the very same name, and also
      snd-opti92x-ad1848 and -cs4231 drivers register the ISA driver with
      the same name, too.  When these drivers are built in, quick
      "register-release-and-re-register" actions occur, and this results in
      Oops because of the same name is assigned to the kobject.
      
      The fix is simply to assign individual names.  As a bonus, by using
      KBUILD_MODNAME, the patch reduces more lines than it adds.
      
      The fix is based on the suggestion by Russell King.
      Reported-and-tested-by: 's avatarFengguang Wu <fengguang.wu@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
  6. 08 Aug, 2013 1 commit
  7. 29 May, 2013 1 commit
  8. 07 Dec, 2012 2 commits
  9. 24 Oct, 2012 1 commit
  10. 21 Oct, 2012 1 commit
    • ALSA: sound/isa/opti9xx/miro.c: eliminate possible double free · edb66893
      Julia Lawall authored
      snd_miro_probe is a static function that is only called twice in the file
      that defines it.  At each call site, its argument is freed using
      snd_card_free.  Thus, there is no need for snd_miro_probe to call
      snd_card_free on its argument on any of its error exit paths.
      
      Because snd_card_free both reads the fields of its argument and kfrees its
      argments, the results of the second snd_card_free should be unpredictable.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      identifier f,free,a;
      parameter list[n] ps;
      type T;
      expression e;
      @@
      
      f(ps,T a,...) {
        ... when any
            when != a = e
        if(...) { ... free(a); ... return ...; }
        ... when any
      }
      
      @@
      identifier r.f,r.free;
      expression x,a;
      expression list[r.n] xs;
      @@
      
      * x = f(xs,a,...);
        if (...) { ... free(a); ... return ...; }
      // </smpl>
      Signed-off-by: 's avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
  11. 06 Oct, 2012 1 commit
  12. 28 Aug, 2012 1 commit
    • ALSA: emu8000: fix emu8000 DRAM sized 512 KiB too small · 1338fc97
      David Flater authored
      v2:  Fixed result still wrong in the case of 512 KiB DRAM.  Oops.
      
      Applicable to 3.5.3 mainline.
      
      In emu8000.c, size_dram determines the amount of memory on the sound card by
      doing write/readback tests starting at 512 KiB and incrementing by 512 KiB.
      On success, detected_size is updated to the successful address and testing
      continues.  On failure, the loop is immediately exited.  The resulting
      detected_size is 512 KiB too small except in two special cases:
      
      1. If there is no memory, the initial 0 value of detected_size is used, which
         is correct.
      2. If the address space wraps around, detected_size is updated before the
         bailout, so the result is correct.
      
      The patch corrects all cases and was tested with an AWE64 Gold.  Before:
        EMU8000 [0x620]: 3584 Kb on-board memory detected
        asfxload 4GMGSMT.SF2 (4174814 B) fails.
      After:
        EMU8000 [0x620]: 4096 Kb on-board memory detected
        asfxload 4GMGSMT.SF2 succeeds.
      
      I do not have a card with 512 KiB to test with, but by forcibly enabling the
      added conditional I verified on the AWE64 Gold that it detects 512 KiB
      (successfully reading from the first memory location) and does not hang the
      card.
      
      C.f. Bug 46451 https://bugzilla.kernel.org/show_bug.cgi?id=46451Signed-off-by: 's avatarDavid Flater <dave@flaterco.com>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
  13. 24 Aug, 2012 1 commit
  14. 21 Aug, 2012 2 commits
    • ALSA: introduce snd-cmi8328: C-Media CMI8328 driver · f9933487
      Ondrej Zary authored
      Introduce snd-cmi8328 driver for C-Media CMI8328-based sound cards, such as
      AudioExcel AV500.
      
      It supports PCM playback and capture (full-duplex) through wss_lib, gameport,
      OPL3 and MPU401. The AV500 card has onboard Dream wavetable synth connected
      to the MPU401 port and Aux 1 input internally which works too.
      The CDROM interface is not supported (as the drivers for these CDROMs were
      removed from the kernel some time ago).
      
      A separate driver is needed because CMI8328 is completely different chip to
      CMI8329/CMI8330. It's configured by magic registers (there's no PnP). Sound is
      provided by a real WSS codec (CS4231A) and the SB part is just a SB Pro
      emulation (for DOS games, useless for Linux).
      
      When SB is enabled, the CMI8328 chip disables access to the WSS codec,
      emulates SoundBlaster on one side and outputs sound data to the codec - so SB
      and WSS can't work together with this card. The WSS codec can do full duplex
      by itself so there's no need for crazy things like snd-cmi8330 does
      (combining SB and WSS parts into one driver).
      Signed-off-by: 's avatarOndrej Zary <linux@rainbow-software.org>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
    • ALSA: snd-als100: fix suspend/resume · 53e1719f
      Ondrej Zary authored
      snd_card_als100_probe() does not set pcm field in struct snd_sb.
      As a result, PCM is not suspended and applications don't know that they need
      to resume the playback.
      
      Tested with Labway A381-F20 card (ALS120).
      Signed-off-by: 's avatarOndrej Zary <linux@rainbow-software.org>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
  15. 20 Aug, 2012 2 commits
  16. 06 Aug, 2012 1 commit
  17. 03 Aug, 2012 1 commit
  18. 30 Jul, 2012 1 commit
    • ALSA: es1688 - freeup resources on init failure · e5b35420
      Fengguang Wu authored
      This will fix the following oops:
      
      [    6.169981] genirq: Flags mismatch irq 5. 00000000 (ES1688) vs. 00000000 (ES1688)
      [    6.170851] Pid: 1, comm: swapper Not tainted 3.5.0-00004-gceee0e95 #14
      [    6.170851] Call Trace:
      [    6.170851]  [<c1062237>] ? __setup_irq+0x3c7/0x420
      [    6.170851]  [<c1062486>] ? request_threaded_irq+0x76/0x140
      [    6.170851]  [<c1290220>] ? snd_es1688_ioctl+0x10/0x10
      [    6.170851]  [<c10624c2>] ? request_threaded_irq+0xb2/0x140
      [    6.170851]  [<c1291196>] ? snd_es1688_create+0x96/0x330
      [    6.170851]  [<c138365d>] ? snd_gusextreme_probe+0x18d/0x5a2
      [    6.170851]  [<c11c9d80>] ? __driver_attach+0x80/0x80
      [    6.170851]  [<c10db22f>] ? sysfs_create_link+0xf/0x20
      [    6.170851]  [<c11c9d80>] ? __driver_attach+0x80/0x80
      [    6.170851]  [<c11d1502>] ? isa_bus_probe+0x12/0x20
      [    6.170851]  [<c11c9b95>] ? driver_probe_device+0x55/0x1c0
      [    6.170851]  [<c13ae04f>] ? _raw_spin_unlock+0xf/0x30
      [    6.170851]  [<c13705ea>] ? klist_next+0x6a/0xe0
      [    6.170851]  [<c11d15c1>] ? isa_bus_match+0x21/0x40
      [    6.170851]  [<c11c8a24>] ? bus_for_each_drv+0x34/0x70
      [    6.170851]  [<c11c9e4b>] ? device_attach+0x7b/0x90
      [    6.170851]  [<c11c9d80>] ? __driver_attach+0x80/0x80
      [    6.170851]  [<c11c8bff>] ? bus_probe_device+0x5f/0x80
      [    6.170851]  [<c11c7493>] ? device_add+0x573/0x620
      [    6.170851]  [<c1042820>] ? complete_all+0x40/0x60
      [    6.170851]  [<c13ae08a>] ? _raw_spin_unlock_irqrestore+0x1a/0x30
      [    6.170851]  [<c11d16c6>] ? isa_register_driver+0xb6/0x150
      [    6.170851]  [<c15c9002>] ? alsa_card_gusmax_init+0xf/0xf
      [    6.170851]  [<c15a99bc>] ? do_one_initcall+0x7f/0x12b
      [    6.170851]  [<c15a9b7a>] ? kernel_init+0x112/0x1a9
      [    6.170851]  [<c15a9423>] ? do_early_param+0x77/0x77
      [    6.170851]  [<c15a9a68>] ? do_one_initcall+0x12b/0x12b
      [    6.170851]  [<c13aefbe>] ? kernel_thread_helper+0x6/0xd
      [    6.190170] es1688: can't grab IRQ 5
      [    6.190613] genirq: Flags mismatch irq 5. 00000000 (ES1688) vs. 00000000 (ES1688)
      [    6.191566] Pid: 1, comm: swapper Not tainted 3.5.0-00004-gceee0e95 #14
      [    6.192394] Call Trace:
      [    6.192685]  [<c1062237>] ? __setup_irq+0x3c7/0x420
      [    6.193342]  [<c1062486>] ? request_threaded_irq+0x76/0x140
      [    6.194081]  [<c1290220>] ? snd_es1688_ioctl+0x10/0x10
      [    6.194607]  [<c10624c2>] ? request_threaded_irq+0xb2/0x140
      [    6.194607]  [<c1291196>] ? snd_es1688_create+0x96/0x330
      [    6.194607]  [<c138365d>] ? snd_gusextreme_probe+0x18d/0x5a2
      [    6.194607]  [<c11c9d80>] ? __driver_attach+0x80/0x80
      [    6.194607]  [<c10db22f>] ? sysfs_create_link+0xf/0x20
      [    6.194607]  [<c11c9d80>] ? __driver_attach+0x80/0x80
      [    6.194607]  [<c11d1502>] ? isa_bus_probe+0x12/0x20
      [    6.194607]  [<c11c9b95>] ? driver_probe_device+0x55/0x1c0
      [    6.194607]  [<c13ae04f>] ? _raw_spin_unlock+0xf/0x30
      [    6.194607]  [<c13705ea>] ? klist_next+0x6a/0xe0
      [    6.194607]  [<c11d15c1>] ? isa_bus_match+0x21/0x40
      [    6.194607]  [<c11c8a24>] ? bus_for_each_drv+0x34/0x70
      [    6.194607]  [<c11c9e4b>] ? device_attach+0x7b/0x90
      [    6.194607]  [<c11c9d80>] ? __driver_attach+0x80/0x80
      [    6.194607]  [<c11c8bff>] ? bus_probe_device+0x5f/0x80
      [    6.194607]  [<c11c7493>] ? device_add+0x573/0x620
      [    6.194607]  [<c1042820>] ? complete_all+0x40/0x60
      [    6.194607]  [<c13ae08a>] ? _raw_spin_unlock_irqrestore+0x1a/0x30
      [    6.194607]  [<c11d16c6>] ? isa_register_driver+0xb6/0x150
      [    6.194607]  [<c15c9002>] ? alsa_card_gusmax_init+0xf/0xf
      [    6.194607]  [<c15a99bc>] ? do_one_initcall+0x7f/0x12b
      [    6.194607]  [<c15a9b7a>] ? kernel_init+0x112/0x1a9
      [    6.194607]  [<c15a9423>] ? do_early_param+0x77/0x77
      [    6.194607]  [<c15a9a68>] ? do_one_initcall+0x12b/0x12b
      [    6.194607]  [<c13aefbe>] ? kernel_thread_helper+0x6/0xd
      [    6.210779] es1688: can't grab IRQ 5
      [    6.211305] gusextreme: probe of gusextreme.0 failed with error -16
      Signed-off-by: 's avatarDaniel Mack <zonque@gmail.com>
      Signed-off-by: 's avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
  19. 17 Jul, 2012 2 commits
  20. 16 Jul, 2012 2 commits
  21. 18 Jun, 2012 1 commit
  22. 10 Apr, 2012 1 commit
  23. 29 Mar, 2012 1 commit
  24. 28 Mar, 2012 1 commit
  25. 06 Feb, 2012 1 commit
  26. 19 Dec, 2011 1 commit
  27. 31 Oct, 2011 4 commits
  28. 22 Sep, 2011 1 commit
  29. 14 Sep, 2011 1 commit
    • ALSA: mpu401: clean up interrupt specification · dba8b469
      Clemens Ladisch authored
      The semantics of snd_mpu401_uart_new()'s interrupt parameters are
      somewhat counterintuitive:  To prevent the function from allocating its
      own interrupt, either the irq number must be invalid, or the irq_flags
      parameter must be zero.  At the same time, the irq parameter being
      invalid specifies that the mpu401 code has to work without an interrupt
      allocated by the caller.  This implies that, if there is an interrupt
      and it is allocated by the caller, the irq parameter must be set to
      a valid-looking number which then isn't actually used.
      
      With the removal of IRQF_DISABLED, zero becomes a valid irq_flags value,
      which forces us to handle the parameters differently.
      
      This patch introduces a new flag MPU401_INFO_IRQ_HOOK for when the
      device interrupt is handled by the caller, and makes the allocation of
      the interrupt to depend only on the irq parameter.  As suggested by
      Takashi, the irq_flags parameter was dropped because, when used, it had
      the constant value IRQF_DISABLED.
      Signed-off-by: 's avatarClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
  30. 26 Jul, 2011 1 commit
  31. 31 Mar, 2011 1 commit
  32. 01 Nov, 2010 1 commit