07 Aug, 2008

2 commits

  • This reverts commit 680db0136e0778a0d7e025af7572c6a8d82279e2. The label
    is actually used, but hidden behind CONFIG_SND_DEBUG and the horrible
    snd_assert() macro.

    That macro could probably be improved to be along the lines of

    #define snd_assert(expr, args...) do { if ((void)(expr),0) { args; } } while (0)

    or similar to make sure that we always both evaluate 'expr' and parse
    'args', but while gcc should optimize it all away, I'm too lazy to
    really verify that. So I'll just admit defeat and will continue to live
    with the annoying warning.

    Noted-by: Robert P. J. Day
    Signed-off-by: Linus "Grr.." Torvalds

    Linus Torvalds
     
  • This fixes the warning

    sound/core/pcm_native.c: In function 'snd_pcm_fasync':
    sound/core/pcm_native.c:3262: warning: label 'out' defined but not used

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

05 Aug, 2008

1 commit


25 Jul, 2008

1 commit

  • On 32-bit architectures PAGE_ALIGN() truncates 64-bit values to the 32-bit
    boundary. For example:

    u64 val = PAGE_ALIGN(size);

    always returns a value < 4GB even if size is greater than 4GB.

    The problem resides in PAGE_MASK definition (from include/asm-x86/page.h for
    example):

    #define PAGE_SHIFT 12
    #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
    #define PAGE_MASK (~(PAGE_SIZE-1))
    ...
    #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)

    The "~" is performed on a 32-bit value, so everything in "and" with
    PAGE_MASK greater than 4GB will be truncated to the 32-bit boundary.
    Using the ALIGN() macro seems to be the right way, because it uses
    typeof(addr) for the mask.

    Also move the PAGE_ALIGN() definitions out of include/asm-*/page.h in
    include/linux/mm.h.

    See also lkml discussion: http://lkml.org/lkml/2008/6/11/237

    [akpm@linux-foundation.org: fix drivers/media/video/uvc/uvc_queue.c]
    [akpm@linux-foundation.org: fix v850]
    [akpm@linux-foundation.org: fix powerpc]
    [akpm@linux-foundation.org: fix arm]
    [akpm@linux-foundation.org: fix mips]
    [akpm@linux-foundation.org: fix drivers/media/video/pvrusb2/pvrusb2-dvb.c]
    [akpm@linux-foundation.org: fix drivers/mtd/maps/uclinux.c]
    [akpm@linux-foundation.org: fix powerpc]
    Signed-off-by: Andrea Righi
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Righi
     

22 Jul, 2008

1 commit


15 Jul, 2008

2 commits

  • * 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits)
    IB/umad: BKL is not needed for ib_umad_open()
    IB/uverbs: BKL is not needed for ib_uverbs_open()
    bf561-coreb: BKL unneeded for open()
    Call fasync() functions without the BKL
    snd/PCM: fasync BKL pushdown
    ipmi: fasync BKL pushdown
    ecryptfs: fasync BKL pushdown
    Bluetooth VHCI: fasync BKL pushdown
    tty_io: fasync BKL pushdown
    tun: fasync BKL pushdown
    i2o: fasync BKL pushdown
    mpt: fasync BKL pushdown
    Remove BKL from remote_llseek v2
    Make FAT users happier by not deadlocking
    x86-mce: BKL pushdown
    vmwatchdog: BKL pushdown
    vmcp: BKL pushdown
    via-pmu: BKL pushdown
    uml-random: BKL pushdown
    uml-mmapper: BKL pushdown
    ...

    Linus Torvalds
     
  • Jonathan Corbet
     

10 Jul, 2008

1 commit


03 Jul, 2008

1 commit


21 Jun, 2008

1 commit


13 Jun, 2008

1 commit


28 May, 2008

1 commit

  • Fix and improve the slots option handling. The sound core tries to
    find the slot with the given module name first and assign if it's
    still available. If all pre-given slots are unavailable, then try
    to find another free slot.

    Also, when a module name begins with '!', it means the negative match:
    the slot will be given for any modules but that one.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

27 May, 2008

2 commits


21 May, 2008

1 commit

  • There is a race from when a device is created with device_create() and
    then the drvdata is set with a call to dev_set_drvdata() in which a
    sysfs file could be open, yet the drvdata will be NULL, causing all
    sorts of bad things to happen.

    This patch fixes the problem by using the new function,
    device_create_drvdata().

    Cc: Kay Sievers
    Cc: Jaroslav Kysela
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

19 May, 2008

1 commit


29 Apr, 2008

2 commits

  • Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to
    main tree.

    Signed-off-by: Denis V. Lunev
    Cc: Alexey Dobriyan
    Cc: "Eric W. Biederman"
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis V. Lunev
     
  • Remove proc_root export. Creation and removal works well if parent PDE is
    supplied as NULL -- it worked always that way.

    So, one useless export removed and consistency added, some drivers created
    PDEs with &proc_root as parent but removed them as NULL and so on.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

24 Apr, 2008

8 commits


15 Feb, 2008

1 commit

  • The sound drivers and the pnpbios core test for current->root != NULL. This
    test seems to be unnecessary since we always have rootfs mounted before
    initializing the drivers.

    Signed-off-by: Jan Blunck
    Acked-by: Christoph Hellwig
    Cc: Bjorn Helgaas
    Cc: Jaroslav Kysela
    Acked-by: Takashi Iwai
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     

06 Feb, 2008

1 commit

  • Replace latency.c use with pm_qos_params use.

    Signed-off-by: mark gross
    Cc: "John W. Linville"
    Cc: Len Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Gross
     

01 Feb, 2008

12 commits

  • The PCM OSS emulation can cause Oops at sync operation due to the wrong
    data size calculation. Typically happening on Sparc64:
    http://lkml.org/lkml/2008/1/24/426

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

    Takashi Iwai
     
  • 'snd_shutdown_f_ops' is not a pointer so its address will never be NULL.
    GCC will complain because 'fops_get' will do an unnecessary check because
    '&snd_shutdown_f_ops' is always true.

    Signed-off-by: Miguel Boton
    Signed-off-by: Andrew Morton
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Miguel Boton
     
  • Change semantics for SNDRV_PCM_TSTAMP_MMAP. Doing timestamping only in
    the interrupt handler might cause that hw_ptr is not related to actual
    timestamp. With this change, grab timestamp at every hw_ptr update to
    have always valid timestamp + ring buffer position pair.
    With this change, SNDRV_PCM_TSTAMP_MMAP was renamed to
    SNDRV_PCM_TSTAMP_ENABLE. It's no regression (I think).

    Signed-off-by: Jaroslav Kysela

    Jaroslav Kysela
     
  • snd_rawmidi_kernel_read1/write1 weren't annotated but used
    copy_to_user/copy_from_user when one of parameters (kernel) was equal to 0
    remove it and add properly annotated parameter

    Signed-off-by: Marcin Ślusarz
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Marcin Ślusarz
     
  • This header file exists only for some hacks to adapt alsa-driver
    tree. It's useless for building in the kernel. Let's move a few
    lines in it to sound/core.h and remove it.
    With this patch, sound/driver.h isn't removed but has just a single
    compile warning to include it. This should be really killed in
    future.

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

    Takashi Iwai
     
  • The 'tick' in PCM is set (again) via sw_params. And, nobody uses
    this feature at all except for a command line option of aplay.
    (This is literally 'nobody', as I checked alsa-lib API calls in all
    programs in major distros.)
    Above all, if we need finer wake-ups for the position update, it's
    basically an issue that the driver should solve, not tuned by each
    application.

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

    Takashi Iwai
     
  • Introduce a common helper function for snd_pcm_lib_read and snd_pcm_lib_write
    for cleaning up the code.

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

    Takashi Iwai
     
  • The xfer_align sw_params parameter has never been used in a sane manner,
    and no one understands what this does exactly. The current
    implementation looks also buggy because it allows write of shorter size
    than xfer_align. So, if you do partial writes, the write isn't actually
    aligned at all.
    Removing this parameter will make some pcm_lib_* code more readable
    (and less buggy).

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

    Takashi Iwai
     
  • The snd_pcm_lib_write1() may block in some weird condition:
    - the stream isn't started
    - avail_min is big (e.g. period size)
    - partial write up to buffer_size - avail_min
    The patch fixes this invalid blocking problem.

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

    Takashi Iwai
     
  • This patch removes the indirect control access to the control elements.
    The indirect access has never been used and is even broken on 32bit
    ioctl wrapper. Let's clean it up.
    The pointers still remain in snd_ctl_elem_* structs just to make sure
    that the struct size won't change. Once after checking the size
    consistency, we can get rid of them, too.

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

    Takashi Iwai
     
  • The condition caused that the returned ring buffer position does not match
    with timestamp when SNDRV_PCM_TSTAMP_MMAP mode was enabled. Removing
    condition makes unified behaviour and interrupt based timestamp can be
    accessed via PCM_IOCTL_SYNC_PTR or mmaped status area.

    Signed-off-by: Jaroslav Kysela

    Jaroslav Kysela
     
  • The replaced one should be re-added for older alsa-lib.

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

    Takashi Iwai