22 May, 2011

1 commit


19 May, 2011

1 commit

  • The xrun_log function was augmented with the in_interrupt parameter whereas the
    empty macro definition used when xrun logging is disabled was not.

    Add a third parameter to the empty macro definition so as to not cause compiler
    errors when xrun logging (CONFIG_SND_PCM_XRUN_DEBUG) is disabled.

    Signed-off-by: Ben Gardiner
    Signed-off-by: Takashi Iwai

    Ben Gardiner
     

18 May, 2011

1 commit

  • When debugging pcm drivers I found the "period" or "hw" prefix printed
    by either XRUN_DEBUG_PERIODUPDATE or XRUN_DEBUG_PERIODUPDATE events,
    respectively to be very useful is observing the interplay between
    interrupt-context updates and syscall-context updates.

    Similarly, when debugging overruns with XRUN_DEBUG_LOG it is useful to
    see the context of the last 10 positions.

    Add an in_interrupt member to hwptr_log_entry which stores the value of
    the in_interrupt parameter of snd_pcm_update_hw_ptr0 when the log entry
    is created. Print a "[Q]" prefix when dumping the log entries if
    in_interrupt was true.

    Signed-off-by: Ben Gardiner
    Signed-off-by: Takashi Iwai

    Ben Gardiner
     

08 Apr, 2011

1 commit


04 Apr, 2011

2 commits


02 Apr, 2011

1 commit

  • When period interrupts are disabled, snd_pcm_update_hw_ptr0() compares
    the current time against the time estimated for the current hardware
    pointer to detect xruns. The somewhat fuzzy threshold in the while loop
    makes it possible that hdelta becomes negative; the comparison being
    done with unsigned types then makes the loop go through the entire 263
    negative range, and, depending on the value, never reach an unsigned
    value that is small enough to stop the loop. Doing this with interrupts
    disabled results in the machine locking up.

    To prevent this, ensure that the loop condition uses signed types for
    both operands so that the comparison is correctly done.

    Many thanks to Kelly Anderson for debugging this.

    Reported-by: Nix
    Reported-by: "Christopher K."
    Reported-and-tested-by: Kelly Anderson
    Signed-off-by: Kelly Anderson
    [cl: remove unneeded casts; use a temp variable]
    Signed-off-by: Clemens Ladisch
    Cc: 2.6.38

    Signed-off-by: Takashi Iwai

    Kelly Anderson
     

31 Mar, 2011

1 commit


28 Mar, 2011

1 commit


26 Mar, 2011

1 commit

  • This patch fixes a race between snd_card_file_remove() and
    snd_card_disconnect(). When the card is added to shutdown_files list
    in snd_card_disconnect(), but it's freed in snd_card_file_remove() at
    the same time, the shutdown_files list gets corrupted. The list member
    must be freed in snd_card_file_remove() as well.

    Reported-and-tested-by: Russ Dill
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

25 Mar, 2011

1 commit

  • It's a big no-no to use pgprot_noncached() when mmap'ing such buffers
    into userspace since they are mapped cachable in kernel space.

    This can cause all sort of interesting things ranging from to garbled
    sound to lockups on various architectures. I've observed that usb-audio
    is broken on powerpc 4xx for example because of that.

    Also remove the now unused snd_pcm_lib_mmap_noncached(). It's
    an arch business to know when to use uncached mappings, there's
    already hacks for MIPS inside snd_pcm_default_mmap() and other
    archs are supposed to use dma_mmap_coherent().

    (See my separate patch that adds dma_mmap_coherent() to powerpc)

    Signed-off-by: Benjamin Herrenschmidt
    CC:
    Signed-off-by: Takashi Iwai

    Benjamin Herrenschmidt
     

22 Mar, 2011

1 commit

  • Add a function to dynamically replace a given control. If the
    control does not already exist, a third parameter is used to determine
    whether to actually add that control. This is useful in cases where
    downloadable firmware at runtime can add or replace existing controls.
    A separate patch needs to be made to allow ALSA Mixer to render the
    replaced controls on the fly.

    Signed-off-by: Dimitris Papastamos
    Signed-off-by: Takashi Iwai

    Dimitris Papastamos
     

18 Mar, 2011

1 commit


17 Mar, 2011

2 commits


11 Mar, 2011

2 commits


08 Mar, 2011

2 commits

  • The return value of snd_ctl_hole_check() is used only to detect whether
    to continue the loop in snd_ctl_find_hole() or not, so we can simplify
    the code by changing this return type to a boolean. Also rename this
    function to better show what it actually does.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • The purpose of the snd_ctl_hole_check() function is to find conflicts
    between the numerical IDs of the new control and those of any existing
    controls. However, it would fail to detect an existing control whose
    count is smaller than the new control's count and whose interval of IDs
    is entirely contained in the interval of the new control's IDs.

    To fix this, use the correct formula to detect overlapping intervals,
    which happens to simplify the condition.

    This problem was not encountered so far because ALSA does not yet allow
    drivers to allocate specific control IDs.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

27 Feb, 2011

1 commit


21 Feb, 2011

1 commit


15 Feb, 2011

1 commit

  • Change the core code where sparse complains. In most cases, this means
    just adding annotations to confirm that we indeed want to do the dirty
    things we're doing.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

11 Feb, 2011

2 commits

  • Commit bb758e9637e5ddc removed snd_hrtimer_callback() from the hardware
    interrupt handler, thus moving it into a tasklet, but did not tell the
    ALSA timer framework about this, so the timer handling would now be done
    in the ALSA timer tasklet scheduled from another tasklet.

    To fix this, add the flag to tell the ALSA timer framework that the
    timer handler is already being invoked in a tasklet.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • If a timer interrupt was delayed too much, hrtimer_forward_now() will
    forward the timer expiry more than once. When this happens, the
    additional number of elapsed ALSA timer ticks must be passed to
    snd_timer_interrupt() to prevent the ALSA timer from falling behind.

    This mostly fixes MIDI slowdown problems on highly-loaded systems with
    badly behaved interrupt handlers.

    Signed-off-by: Clemens Ladisch
    Reported-and-tested-by: Arthur Marsh
    Cc:
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

14 Jan, 2011

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (348 commits)
    ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection
    ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO
    ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO
    ALSA: oxygen: fix Xonar DG input
    ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low
    ALSA: hda - Fix missing EAPD for Acer 4930G
    ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs.
    ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser
    ALSA: hda - Don't refer ELD when unplugged
    ASoC: tpa6130a2: Fix compiler warning
    ASoC: tlv320dac33: Add DAPM selection for LOM invert
    ASoC: DMIC codec: Adding a generic DMIC codec
    ALSA: snd-usb-us122l: Fix missing NULL checks
    ALSA: snd-usb-us122l: Fix MIDI output
    ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()
    ASoC: Fix section mismatch in wm8995.c
    ALSA: oxygen: add S/PDIF source selection for Claro cards
    ALSA: oxygen: fix CD/MIDI for X-Meridian (2G)
    ASoC: fix migor audio build
    ALSA: include delay.h for msleep in Xonar DG support
    ...

    Linus Torvalds
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    Documentation/trace/events.txt: Remove obsolete sched_signal_send.
    writeback: fix global_dirty_limits comment runtime -> real-time
    ppc: fix comment typo singal -> signal
    drivers: fix comment typo diable -> disable.
    m68k: fix comment typo diable -> disable.
    wireless: comment typo fix diable -> disable.
    media: comment typo fix diable -> disable.
    remove doc for obsolete dynamic-printk kernel-parameter
    remove extraneous 'is' from Documentation/iostats.txt
    Fix spelling milisec -> ms in snd_ps3 module parameter description
    Fix spelling mistakes in comments
    Revert conflicting V4L changes
    i7core_edac: fix typos in comments
    mm/rmap.c: fix comment
    sound, ca0106: Fix assignment to 'channel'.
    hrtimer: fix a typo in comment
    init/Kconfig: fix typo
    anon_inodes: fix wrong function name in comment
    fix comment typos concerning "consistent"
    poll: fix a typo in comment
    ...

    Fix up trivial conflicts in:
    - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
    - fs/ext4/ext4.h

    Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.

    Linus Torvalds
     

13 Jan, 2011

1 commit


10 Jan, 2011

2 commits


23 Dec, 2010

1 commit


21 Dec, 2010

1 commit


13 Dec, 2010

1 commit


30 Nov, 2010

1 commit


24 Nov, 2010

2 commits

  • If CONFIG_SND_DYNAMIC_MINORS is used, assign /dev/snd/seq and
    /dev/snd/timer the usual static minors, and export specific
    module aliases to generate udev module on-demand loading
    instructions:

    $ cat /lib/modules/2.6.33.4-smp/modules.devname
    # Device nodes to trigger on-demand module loading.
    microcode cpu/microcode c10:184
    fuse fuse c10:229
    ppp_generic ppp c108:0
    tun net/tun c10:200
    uinput uinput c10:223
    dm_mod mapper/control c10:236
    snd_timer snd/timer c116:33
    snd_seq snd/seq c116:1

    The last two lines instruct udev to create device nodes, even
    when the modules are not loaded at that time.

    As soon as userspace accesses any of these nodes, the in-kernel
    module-loader will load the module, and the device can be used.

    The header file minor calculation needed to be simplified to
    make __stringify() (supports only two indirections) in
    the MODULE_ALIAS macro work.

    This is part of systemd's effort to get rid of unconditional
    module load instructions and needless init scripts.

    Cc: Lennart Poettering
    Signed-off-by: Kay Sievers
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Kay Sievers
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (41 commits)
    ALSA: hda - Identify more variants for ALC269
    ALSA: hda - Fix wrong ALC269 variant check
    ALSA: hda - Enable jack sense for Thinkpad Edge 11
    ALSA: Revert "ALSA: hda - Fix switching between dmic and mic using the same mux on IDT/STAC"
    ALSA: hda - Fixed ALC887-VD initial error
    ALSA: atmel - Fix the return value in error path
    ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J
    ALSA: snd-atmel-abdac: test wrong variable
    ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer
    ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup
    ALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdata
    ALSA: sound/core/pcm_lib.c: Remove unnecessary semicolons
    ALSA: sound/ppc: Use printf extension %pR for struct resource
    ALSA: ac97: Apply quirk for Dell Latitude D610 binding Master and Headphone controls
    ASoC: uda134x - set reg_cache_default to uda134x_reg
    ASoC: Add support for MAX98089 CODEC
    ASoC: davinci: fixes for multi-component
    ASoC: Fix register cache setup WM8994 for multi-component
    ASoC: Fix dapm_seq_compare() for multi-component
    ASoC: RX1950: Fix hw_params function
    ...

    Linus Torvalds
     

22 Nov, 2010

5 commits

  • Increase the default timer limit so that snd-hrtimer.ko can be
    automatically loaded when needed, e.g., when used as the default
    sequencer timer. This replaces the check for the obsolete
    CONFIG_SND_HPET.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • Add a lightweight condition on top of the xrun checking so that we can
    avoid the division when the application is calling the update function
    often enough.

    Suggested-by: Jaroslav Kysela
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • When period wakeups are disabled, successive calls to the pointer update
    function do not have a maximum allowed distance, so xruns cannot be
    detected with the pointer value only.

    To detect xruns, compare the actually elapsed time with the time that
    should have theoretically elapsed since the last update. When the
    hardware pointer has wrapped around due to an xrun, the actually elapsed
    time will be too big by about hw_ptr_buffer_jiffies.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • This patch allows to disable period interrupts which are
    not needed when the application relies on a system timer
    to wake-up and refill the ring buffer. The behavior of
    the driver is left unchanged, and interrupts are only
    disabled if the application requests this configuration.
    The behavior in case of underruns is slightly different,
    instead of being detected during the period interrupts the
    underruns are detected when the application calls
    snd_pcm_update_avail, which in turns forces a refresh of the
    hw pointer and shows the buffer is empty.

    More specifically this patch makes a lot of sense when
    PulseAudio relies on timer-based scheduling to access audio
    devices such as HDAudio or Intel SST. Disabling interrupts
    removes two unwanted wake-ups due to period elapsed events
    in low-power playback modes. It also simplifies PulseAudio
    voice modules used for speech calls.

    To quote Lennart "This patch looks very interesting and
    desirable. This is something have long been waiting for."

    Support for this in hardware drivers is optional.

    Signed-off-by: Pierre-Louis Bossart
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • Signed-off-by: Joe Perches
    Signed-off-by: Takashi Iwai

    Joe Perches