06 Dec, 2010

7 commits


01 Dec, 2010

1 commit


24 Nov, 2010

1 commit

  • 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
     

22 Nov, 2010

16 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
     
  • Allow disabling period wakeup interrupts for all PCM streams.

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

    Clemens Ladisch
     
  • Allow disabling period wakeup interrupts for HDA PCM streams.

    Signed-off-by: Pierre-Louis Bossart
    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
     
  • Takashi Iwai
     
  • BugLink: https://launchpad.net/bugs/677652

    The original reporter states that, in 2.6.35, headphones do not appear
    to work, nor does inserting them mute the A52J's onboard speakers. Upon
    inspecting the codec dump, it appears that the newly committed hp-laptop
    quirk will suffice to enable this basic functionality. Testing was done
    with an alsa-driver build from 2010-11-21.

    Reported-and-tested-by: Joan Creus
    Cc: [2.6.35+]
    Signed-off-by: Daniel T Chen
    Signed-off-by: Takashi Iwai

    Daniel T Chen
     
  • After clk_get() pclk is checked second time instead of sample_clk check.

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: Takashi Iwai

    Vasiliy Kulikov
     
  • . Fix PulseAudio "ALSA driver bug" issue
    (if we have two alternated areas within a 64k DMA buffer, then max
    period size should obviously be 32k only).
    Back references:
    http://pulseaudio.org/wiki/AlsaIssues
    http://fedoraproject.org/wiki/Features/GlitchFreeAudio
    . In stop timer function, need to supply ACK in the timer control byte.
    . Minor log output correction

    When I did my first PA testing recently, the period size bug resulted
    in quite precisely observeable half-period-based playback distortion.

    PA-based operation is quite a bit more underrun-prone (despite its
    zero-copy optimizations etc.) than raw ALSA with this rather spartan
    sound hardware implementation on my puny Athlon.

    Note that even with this patch, azt3328 still doesn't work for both
    cases yet, PA tsched=0 and tsched
    (on tsched=0 it will playback tiny fragments of periods, leading to tiny
    stuttering sounds with some pauses in between, whereas with
    timer-scheduled operation playback works fine - minus some quite increased
    underrun trouble on PA vs. ALSA, that is).

    Signed-off-by: Andreas Mohr
    Signed-off-by: Takashi Iwai

    Andreas Mohr
     
  • BugLink: https://launchpad.net/bugs/677830

    The original reporter states that the subwoofer does not mute when
    inserting headphones. We need an entry for his machine's SSID in the
    subwoofer pin fixup list, so add it there (verified using hda_analyzer).

    Reported-and-tested-by: i-NoD
    Cc:
    Signed-off-by: Daniel T Chen
    Signed-off-by: Takashi Iwai

    Daniel T Chen
     
  • BugLink: http://launchpad.net/bugs/669092

    ALC887 does not have any volume control ability on the mixer NIDs,
    so put the volume controls on the dac NIDs instead. Without this
    patch, ALC887 users cannot use alsamixer at all.

    Cc: stable@kernel.org
    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai

    David Henningsson
     
  • Signed-off-by: Joe Perches
    Signed-off-by: Takashi Iwai

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

    Joe Perches
     
  • Using %pR standardizes the struct resource output.

    Signed-off-by: Joe Perches
    Signed-off-by: Takashi Iwai

    Joe Perches
     
  • BugLink: https://launchpad.net/bugs/669279

    The original reporter states: "The Master mixer does not change the
    volume from the headphone output (which is affected by the headphone
    mixer). Instead it only seems to control the on-board speaker volume.
    This confuses PulseAudio greatly as the Master channel is merged into
    the volume mix."

    Fix this symptom by applying the hp_only quirk for the reporter's SSID.
    The fix is applicable to all stable kernels.

    Reported-and-tested-by: Ben Gamari
    Cc: [2.6.32+]
    Signed-off-by: Daniel T Chen
    Signed-off-by: Takashi Iwai

    Daniel T Chen
     

11 Nov, 2010

6 commits

  • The Atmel SSC can divide by even numbers, not only powers of two.

    Signed-off-by: Peter Rosin
    Signed-off-by: Takashi Iwai

    Peter Rosin
     
  • In each function, the value apcm is stored in the private_data field of
    runtime. At the same time the function ct_atc_pcm_free_substream is stored
    in the private_free field of the same structure. ct_atc_pcm_free_substream
    dereferences and ultimately frees the value in the private_data field. But
    each function can exit in an error case with apcm having been freed, in
    which case a subsequent call to the private_free function would perform a
    dereference after free. On the other hand, if the private_free field is
    not initialized, it is NULL, and not invoked (see snd_pcm_detach_substream
    in sound/core/pcm.c). To avoid the introduction of a dangling pointer, the
    initializations of the private_data and private_free fields are moved to
    the end of the function, past any possible free of apcm. This is safe
    because the previous calls to snd_pcm_hw_constraint_integer and
    snd_pcm_hw_constraint_minmax, which take runtime as an argument, do not
    refer to either of these fields.

    In each function, there is one error case where apcm needs to be freed, and
    a call to kfree is added.

    The sematic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression e,e1,e2,e3;
    identifier f,free1,free2;
    expression a;
    @@

    *e->f = a
    ... when != e->f = e1
    when any
    if (...) {
    ... when != free1(...,e,...)
    when != e->f = e2
    * kfree(a)
    ... when != free2(...,e,...)
    when != e->f = e3
    }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Takashi Iwai

    Julia Lawall
     
  • If the platform already provides a definition for these accessors
    do not redefine them. The warning was caught on MIPS.

    Signed-off-by: Florian Fainelli
    Signed-off-by: Takashi Iwai

    Florian Fainelli
     
  • BugLink: http://launchpad.net/bugs/673075

    According to the datasheet of 92HD87B, there is a digital mic
    at nid 0x11, so enable it in order to be able to use the mic.

    Cc: stable@kernel.org
    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai

    David Henningsson
     
  • The [vk][cmz]alloc(_node) family of functions return void pointers which
    it's completely unnecessary/pointless to cast to other pointer types since
    that happens implicitly.

    This patch removes such casts from sound/oss/

    Signed-off-by: Jesper Juhl
    Signed-off-by: Takashi Iwai

    Jesper Juhl
     
  • Signed-off-by: Joe Perches
    Signed-off-by: Takashi Iwai

    Joe Perches
     

03 Nov, 2010

9 commits