1. 18 Dec, 2009 1 commit
  2. 17 Dec, 2009 1 commit
  3. 15 Dec, 2009 4 commits
    • André Goddard Rosa's avatar
      tree-wide: convert open calls to remove spaces to skip_spaces() lib function · e7d2860b
      André Goddard Rosa authored
      Makes use of skip_spaces() defined in lib/string.c for removing leading
      spaces from strings all over the tree.
      
      It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
         text    data     bss     dec     hex filename
        64688     584     592   65864   10148 (TOTALS-BEFORE)
        64641     584     592   65817   10119 (TOTALS-AFTER)
      
      Also, while at it, if we see (*str && isspace(*str)), we can be sure to
      remove the first condition (*str) as the second one (isspace(*str)) also
      evaluates to 0 whenever *str == 0, making it redundant. In other words,
      "a char equals zero is never a space".
      
      Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
      and found occurrences of this pattern on 3 more files:
          drivers/leds/led-class.c
          drivers/leds/ledtrig-timer.c
          drivers/video/output.c
      
      @@
      expression str;
      @@
      
      ( // ignore skip_spaces cases
      while (*str &&  isspace(*str)) { \(str++;\|++str;\) }
      |
      - *str &&
      isspace(*str)
      )
      Signed-off-by: default avatarAndré Goddard Rosa <andre.goddard@gmail.com>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
      Cc: David Howells <dhowells@redhat.com>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e7d2860b
    • Andres Salomon's avatar
      ALSA: cs5535audio: free OLPC quirks from reliance on MGEODE_LX cpu optimization · 3c554946
      Andres Salomon authored
      Previously, OLPC support for the mic extensions was only enabled in the
      ALSA driver if CONFIG_OLPC and CONFIG_MGEODE_LX were both set.  This was
      because the old geode GPIO code was written in a manner that assumed
      CONFIG_MGEODE_LX.  With the new cs553x-gpio driver, this is no longer the
      case; as such, we can drop the requirement on CONFIG_MGEODE_LX and instead
      include a requirement on GPIOLIB.
      
      We use the generic GPIO API rather than the cs553x-specific API.
      Signed-off-by: default avatarAndres Salomon <dilinger@collabora.co.uk>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Jordan Crouse <jordan@cosmicpenguin.net>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3c554946
    • Alexey Dobriyan's avatar
    • Steve Soule's avatar
      ALSA: ac97_codec - increase timeout for analog sections to 5 second · f7489027
      Steve Soule authored
      I have a Soundblaster 16PCI. For many years, alsa has had a bug where
      not all of the card's controls are detected (many alsa versions,
      many kernel versions). In particular, Master Playback Volume is
      usually not detected, and so I get no sound or extremely faint sound.
      The problem has always been inconsistent: sometimes all of the controls
      are detected correctly, and sometimes a partial set is detected. It works
      correctly about 10% of the time.
      
      Finally, I got around to tracking down the problem. When the driver
      fails, it prints the kernel message "AC'97 0 analog subsections not
      ready". This message is generated from the function snd_ac97_mixer()
      in ac97_codec.c. The message indicates that the card failed to come
      back after reset within the time limit. The time limit is
      120 milliseconds.
      
      I tried increasing the time limit to 1 second, and found that this
      made the driver work about 70% of the time. I tried increasing it
      to 5 seconds, and it now seems to work 100% of the time.
      
      I expect that this change would be completely harmless for
      existing cards that work, and would only introduce additional
      delay for cards that do not work.
      
      ALSA bug#4032.
      Signed-off-by: default avatarSteve Soule <sts11dbxr@gmail.com>
      Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
      f7489027
  4. 14 Dec, 2009 5 commits
  5. 13 Dec, 2009 4 commits
  6. 12 Dec, 2009 1 commit
    • Alexey Fisher's avatar
      ALSA: hda - Overwrite pin config on intel DG45ID board. · 52dc4386
      Alexey Fisher authored
      The pin config provided by BIOS have some problems:
      0x0221401f: [Jack] HP Out at Ext Front  <-- other association and sequence
      0x02a19020: [Jack] Mic at Ext Front     <-- other association
      0x01113014: [Jack] Speaker at Ext Rear  <-- line out (not speaker)
      0x01114010: [Jack] Speaker at Ext Rear  <-- line out
      0x01a19030: [Jack] Mic at Ext Rear      <-- other association
      0x01111012: [Jack] Speaker at Ext Rear  <-- line out
      0x01116011: [Jack] Speaker at Ext Rear  <-- line out
      0x40f000f0: [N/A] Other at Ext N/A
      0x40f000f0: [N/A] Other at Ext N/A
      0x40f000f0: [N/A] Other at Ext N/A
      0x40f000f0: [N/A] Other at Ext N/A
      0x40f000f0: [N/A] Other at Ext N/A
      0x01451140: [Jack] SPDIF Out at Ext Rear
      0x40f000f0: [N/A] Other at Ext N/A
      
      just overwrite it.
      Signed-off-by: default avatarAlexey Fisher <bug-track@fisher-privat.net>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      52dc4386
  7. 11 Dec, 2009 7 commits
  8. 10 Dec, 2009 3 commits
    • Olof Johansson's avatar
      ASoC: Fix build of OMAP sound drivers · 761c9d45
      Olof Johansson authored
      There are build errors when building for some of the omap2/3 boards without
      enabling sound:
      
      sound/built-in.o:(.data+0x43bc): undefined reference to `soc_codec_dev_tlv320aic23'
      sound/built-in.o:(.data+0x43cc): undefined reference to `tlv320aic23_dai'
      
      Confused me quite a bit since the drivers that had references to the
      codec weren't enabled. Turns out the Makefile was using the wrong
      config option to enable them. Patch below.
      Reported-by: default avatarAnand Gadiyar <gadiyar@ti.com>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      761c9d45
    • Christoph Hellwig's avatar
      vfs: Implement proper O_SYNC semantics · 6b2f3d1f
      Christoph Hellwig authored
      While Linux provided an O_SYNC flag basically since day 1, it took until
      Linux 2.4.0-test12pre2 to actually get it implemented for filesystems,
      since that day we had generic_osync_around with only minor changes and the
      great "For now, when the user asks for O_SYNC, we'll actually give
      O_DSYNC" comment.  This patch intends to actually give us real O_SYNC
      semantics in addition to the O_DSYNC semantics.  After Jan's O_SYNC
      patches which are required before this patch it's actually surprisingly
      simple, we just need to figure out when to set the datasync flag to
      vfs_fsync_range and when not.
      
      This patch renames the existing O_SYNC flag to O_DSYNC while keeping it's
      numerical value to keep binary compatibility, and adds a new real O_SYNC
      flag.  To guarantee backwards compatiblity it is defined as expanding to
      both the O_DSYNC and the new additional binary flag (__O_SYNC) to make
      sure we are backwards-compatible when compiled against the new headers.
      
      This also means that all places that don't care about the differences can
      just check O_DSYNC and get the right behaviour for O_SYNC, too - only
      places that actuall care need to check __O_SYNC in addition.  Drivers and
      network filesystems have been updated in a fail safe way to always do the
      full sync magic if O_DSYNC is set.  The few places setting O_SYNC for
      lower layers are kept that way for now to stay failsafe.
      
      We enforce that O_DSYNC is set when __O_SYNC is set early in the open path
      to make sure we always get these sane options.
      
      Note that parisc really screwed up their headers as they already define a
      O_DSYNC that has always been a no-op.  We try to repair it by using it for
      the new O_DSYNC and redefinining O_SYNC to send both the traditional
      O_SYNC numerical value _and_ the O_DSYNC one.
      
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Grant Grundler <grundler@parisc-linux.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andreas Dilger <adilger@sun.com>
      Acked-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      Acked-by: default avatarKyle McMartin <kyle@mcmartin.ca>
      Acked-by: default avatarUlrich Drepper <drepper@redhat.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      6b2f3d1f
    • Krzysztof Helt's avatar
      ALSA: opti93x: fix irq releasing if the irq cannot be allocated · 5f60e496
      Krzysztof Helt authored
      Use the chip->irq to check if the irq should be released so the irq is not released
      if it has not been allocated.
      Signed-off-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5f60e496
  9. 09 Dec, 2009 3 commits
  10. 08 Dec, 2009 7 commits
  11. 07 Dec, 2009 1 commit
  12. 04 Dec, 2009 3 commits