11 Oct, 2010

1 commit


17 Sep, 2010

1 commit


14 Sep, 2010

1 commit


18 Aug, 2010

2 commits

  • The current code in pcm_lib.c do all checks using only the position
    in the ring buffer. Unfortunately, where the interrupts gets delayed or
    merged into one, we need another timing source to check when the
    buffer size boundary overlaps to avoid the wrong updating of the
    ring buffer pointers.

    This code uses jiffies to check the right time window without any
    performance impact.

    Signed-off-by: Jaroslav Kysela
    Signed-off-by: Takashi Iwai

    Jaroslav Kysela
     
  • With some hardware combinations, the PCM interrupts are acknowledged
    before the period boundary from the emu10k1 chip. The midlevel PCM code
    gets confused and the playback stream is interrupted.

    It seems that the interrupt processing shift by 2 samples is enough
    to fix this issue. This default value does not harm other,
    non-affected hardware.

    More information: Kernel bugzilla bug#16300

    [A copmile warning fixed by tiwai]

    Signed-off-by: Jaroslav Kysela
    Cc:
    Signed-off-by: Takashi Iwai

    Jaroslav Kysela
     

19 Jul, 2010

1 commit

  • All current users of pm_qos_add_request() have the ability to supply
    the memory required by the pm_qos routines, so make them do this and
    eliminate the kmalloc() with pm_qos_add_request(). This has the
    double benefit of making the call never fail and allowing it to be
    called from atomic context.

    Signed-off-by: James Bottomley
    Signed-off-by: mark gross
    Signed-off-by: Rafael J. Wysocki

    James Bottomley
     

21 May, 2010

3 commits

  • Commit 7910b4a1db63fefc3d291853d33c34c5b6352e8e in 2.6.34 changed the
    runtime->boundary calculation to make this value a multiple of both the
    buffer_size and the period_size, because the latter is assumed by the
    runtime->hw_ptr_interrupt calculation.

    However, due to the lack of a ioctl that could read the software
    parameters before they are set, the kernel requires that alsa-lib
    calculates the boundary value, too. The changed algorithm leads to
    a different boundary value used by alsa-lib, which makes, e.g., mplayer
    fail to play a 44.1 kHz file because the silence_size parameter is now
    invalid; bug report:
    .

    This patch reverts the change to the boundary calculation, and instead
    fixes the hw_ptr_interrupt calculation to be period-aligned regardless
    of the boundary value.

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

    Clemens Ladisch
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (250 commits)
    ALSA: hda: Storage class should be before const qualifier
    ASoC: tpa6130a2: Remove CPVSS and HPVdd supplies
    ASoC: tpa6130a2: Define output pins with SND_SOC_DAPM_OUTPUT
    ASoC: sdp4430 - add sdp4430 pcm ops to DAI.
    ASoC: TWL6040: Enable earphone path in codec
    ASoC: SDP4430: Add support for Earphone speaker
    ASoC: SDP4430: Add sdp4430 machine driver
    ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF
    ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
    ALSA: sound/pci/asihpi: Use kzalloc
    ALSA: hdmi - dont fail on extra nodes
    ALSA: intelhdmi - add id for the CougarPoint chipset
    ALSA: intelhdmi - user friendly codec name
    ALSA: intelhdmi - add dependency on SND_DYNAMIC_MINORS
    ALSA: asihpi: incorrect range check
    ALSA: asihpi: testing the wrong variable
    ALSA: es1688: add pedantic range checks
    ARM: McBSP: Add support for omap4 in McBSP driver
    ARM: McBSP: Fix request for irq in OMAP4
    OMAP: McBSP: Add 32-bit mode support
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    PM: PM QOS update fix
    Freezer / cgroup freezer: Update stale locking comments
    PM / platform_bus: Allow runtime PM by default
    i2c: Fix bus-level power management callbacks
    PM QOS update
    PM / Hibernate: Fix block_io.c printk warning
    PM / Hibernate: Group swap ops
    PM / Hibernate: Move the first_sector out of swsusp_write
    PM / Hibernate: Separate block_io
    PM / Hibernate: Snapshot cleanup
    FS / libfs: Implement simple_write_to_buffer
    PM / Hibernate: document open(/dev/snapshot) side effects
    PM / Runtime: Add sysfs debug files
    PM: Improve device power management document
    PM: Update device power management document
    PM: Allow runtime_suspend methods to call pm_schedule_suspend()
    PM: pm_wakeup - switch to using bool

    Linus Torvalds
     

20 May, 2010

2 commits


12 May, 2010

1 commit

  • MIPS non-coherent archs need the noncached pgprot in mmap of PCM buffers.
    But, since the coherency needs to be checked dynamically via
    plat_device_is_coherent(), we need an ugly check dependent on MIPS
    in ALSA core code.

    This should be cleaned up in MIPS arch side (e.g. creating
    dma_mmap_coherent()) in near future.

    Tested-by: Wu Zhangjin
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

11 May, 2010

1 commit

  • This patch changes the string based list management to a handle base
    implementation to help with the hot path use of pm-qos, it also renames
    much of the API to use "request" as opposed to "requirement" that was
    used in the initial implementation. I did this because request more
    accurately represents what it actually does.

    Also, I added a string based ABI for users wanting to use a string
    interface. So if the user writes 0xDDDDDDDD formatted hex it will be
    accepted by the interface. (someone asked me for it and I don't think
    it hurts anything.)

    This patch updates some documentation input I got from Randy.

    Signed-off-by: markgross
    Signed-off-by: Rafael J. Wysocki

    Mark Gross
     

13 Apr, 2010

1 commit

  • Set no_llseek to llseek file ops of each sound component (but for hwdep).
    This avoids the implicit BKL invocation via generic_file_llseek() used
    as default when fops.llseek is NULL.

    Also call nonseekable_open() at each open ops to ensure the file flags
    have no seek bit.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

08 Apr, 2010

1 commit


10 Mar, 2010

1 commit

  • Shared memory mappings on nommu machines require a get_unmapped_area
    file operation that suggests an address for the mapping. The current
    implementation returns 0 and thus forces the driver to implement an
    mmap handler that fixes up the start and end address of the vma.

    This patch returns the address of the dma buffer, so it should work
    out of the box for all drivers that use the snd_pcm_runtime->dma_area
    pointer.

    Addresses for mapping the status and control pages are returned as
    well, but to make those work the conditional compilation of
    snd_pcm_mmap_{status,control} would need to be revised.

    URL: http://thread.gmane.org/gmane.linux.alsa.devel/61230
    Signed-off-by: Daniel Glöckner
    Signed-off-by: Cliff Cai
    Signed-off-by: Mike Frysinger
    Signed-off-by: Takashi Iwai

    Daniel Glöckner
     

17 Feb, 2010

1 commit


16 Feb, 2010

1 commit


01 Feb, 2010

1 commit


28 Jan, 2010

1 commit

  • The code in pcm_lib updating runtime->hw_ptr_interrupt expects
    that runtime->boundary is divisible with runtime->period_size.
    Thanks are going to Clemens Ladisch for the notice.

    Fix the runtime->boundary calculation using buffer_size * period_size
    as base and find a least common multiple for 32bit platforms when
    the expression might overflow.

    Signed-off-by: Jaroslav Kysela

    Jaroslav Kysela
     

27 Jan, 2010

2 commits

  • Takashi Iwai
     
  • Clemens Ladisch noted for hw_ptr_removal in "cleanup & merge hw_ptr
    update functions" commit:

    "It is possible for the status/delay ioctls to be called when the sound
    card's pointer register alreay shows a position at the beginning of the
    new period, but immediately before the interrupt is actually executed.
    (This happens regularly on a SMP machine with mplayer.) When that
    happens, the code thinks that the position must be at least one period
    ahead of the current position and drops an entire buffer of data."

    Return back the hw_ptr_interrupt variable. The last interrupt pointer
    is always computed from the latest hw_ptr instead of tracking it
    separately (in this case all hw_ptr checks and modifications might
    influence also hw_ptr_interrupt and it is difficult to keep it
    consistent).

    Signed-off-by: Jaroslav Kysela

    Jaroslav Kysela
     

21 Jan, 2010

3 commits


18 Jan, 2010

2 commits


12 Jan, 2010

1 commit


07 Jan, 2010

2 commits

  • As noted by pl bossart , the PCM I/O routines
    (snd_pcm_lib_write1, snd_pcm_lib_read1) should block wake_up() calls
    until all samples are not processed.

    Signed-off-by: Jaroslav Kysela

    Jaroslav Kysela
     
  • Do general cleanup in snd_pcm_update_hw_ptr*() routines and merge them.
    The main change is hw_ptr_interrupt variable removal to simplify code
    logic. This variable can be computed directly from hw_ptr.

    Ensure that updated hw_ptr is not lower than previous one (it was possible
    with old code in some obscure situations when interrupt was delayed or
    the lowlevel driver returns wrong ring buffer position value).

    Signed-off-by: Jaroslav Kysela

    Jaroslav Kysela
     

25 Dec, 2009

1 commit


27 Nov, 2009

2 commits

  • The non-cohernet PPC arch doesn't give the correct address by a simple
    virt_to_page() for pages allocated via dma_alloc_coherent().
    This patch adds a hack to fix the conversion similarly like MIPS.

    Note that this doesn't fix perfectly: the pages should be marked with
    proper pgprot value. This will be done in a future implementation like
    the conversion to dma_mmap_coherent().

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

    Takashi Iwai
     
  • The non-coherent MIPS arch doesn't give the correct address by a simple
    virt_to_page() for pages allocated via dma_alloc_coherent().

    Original patch by Wu Zhangjin .
    [Ralf mentioned: "The origins of this patch go back far further.
    The oldest patch I could find which is a superset of this was written
    by Atsushi Nemoto and various incarnations of it have been sumitted
    to and reject by me a number of times through the years."]
    A proper check of the buffer allocation type was added to avoid the
    wrong conversion.

    Note that this doesn't fix perfectly: the pages should be marked with
    proper pgprot value. This will be done in a future implementation like
    the conversion to dma_mmap_coherent().

    Acked-by: Ralf Baechle
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

26 Nov, 2009

2 commits


28 Sep, 2009

1 commit


21 Sep, 2009

1 commit


10 Sep, 2009

1 commit


20 Aug, 2009

1 commit

  • The current PCM core has the following problems regarding PCM draining
    in non-blocking mode:

    - the current f_flags isn't checked in snd_pcm_drain(), thus changing
    the mode dynamically via snd_pcm_nonblock() after open doesn't work.
    - calling drain in non-blocking mode just return -EAGAIN error, but
    doesn't provide any way to sync with draining.

    This patch fixes these issues.
    - check file->f_flags in snd_pcm_drain() properly
    - when O_NONBLOCK is set, PCM core sets the stream(s) to DRAIN state
    but quits ioctl immediately without waiting the whole drain; the
    caller can sync the drain manually via poll()

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

03 Aug, 2009

1 commit

  • Return STRPIPE instead of EBADF when userspace attempts to rewind
    of forward a stream that was suspended in meanwhile, so that it
    can be recovered by snd_pcm_recover().

    This was causing Pulseaudio to unload the ALSA sink module under a race
    condition when it attempted to rewind the stream right after resume from
    suspend, before writing to the stream which would cause it to revive the
    stream otherwise. Tested to work with Pulseaudio patched to attempt to
    snd_pcm_recover() upon receiving an error from snd_pcm_rewind().

    Signed-off-by: Lubomir Rintel
    Signed-off-by: Takashi Iwai

    Lubomir Rintel