27 May, 2009

2 commits

  • The PCM hw_ptr jiffies check results sometimes in problems when a
    hardware doesn't give smooth hw_ptr updates. So far, au88x0 and some
    other drivers appear not working due to this strict check.
    However, this check is a nice debug tool, and the capability should be
    still kept.

    Hence, we disable this check now as default unless the user enables it
    by setting the xrun_debug mode to the specific stream via a proc file.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The hw_ptr_jiffies has to be reset properly to avoid the invalid
    check of jiffies delta in snd_pcm_update_hw_ptr*() functions.
    Especailly this patch fixes the bogus jiffies check after the puase
    and resume.

    This patch is a modified version of the original patch by Jaroslav.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

28 Apr, 2009

1 commit

  • The hardware devices with SNDRV_PCM_INFO_BATCH flag can't give the
    precise current position. And such hardwares have often big FIFO
    in addition to the ring buffer, and it screws up the jiffies check
    in pcm_lib.c.

    This patch adds a simple check of info flag so that the driver skips
    the jiffies check in snd_pcm_period_elapsed() when BATCH flag is set.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

15 Apr, 2009

2 commits


14 Apr, 2009

2 commits


10 Apr, 2009

1 commit


07 Apr, 2009

1 commit

  • Added an else part to check
    SNDRV_MIXER_OSS_PRESENT_CVOLUME for MIC (slot 7)
    in commit 36c7b833e5d2501142a371e4e75281d3a29fbd6b

    Similarly, checks and volume control is required for
    SNDRV_MIXER_OSS_PRESENT_CSWITCH and SNDRV_MIXER_OSS_PRESENT_CROUTE
    as well.

    Signed-off-by: Deepika Makhija
    Signed-off-by: Viral Mehta
    Signed-off-by: Takashi Iwai

    Deepika Makhija
     

31 Mar, 2009

1 commit

  • Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
    as correctly noted at bug #12454. Someone can lookup entry with NULL
    ->owner, thus not pinning enything, and release it later resulting
    in module refcount underflow.

    We can keep ->owner and supply it at registration time like ->proc_fops
    and ->data.

    But this leaves ->owner as easy-manipulative field (just one C assignment)
    and somebody will forget to unpin previous/pin current module when
    switching ->owner. ->proc_fops is declared as "const" which should give
    some thoughts.

    ->read_proc/->write_proc were just fixed to not require ->owner for
    protection.

    rmmod'ed directories will be empty and return "." and ".." -- no harm.
    And directories with tricky enough readdir and lookup shouldn't be modular.
    We definitely don't want such modular code.

    Removing ->owner will also make PDE smaller.

    So, let's nuke it.

    Kudos to Jeff Layton for reminding about this, let's say, oversight.

    http://bugzilla.kernel.org/show_bug.cgi?id=12454

    Signed-off-by: Alexey Dobriyan

    Alexey Dobriyan
     

27 Mar, 2009

1 commit


24 Mar, 2009

9 commits


20 Mar, 2009

1 commit


19 Mar, 2009

4 commits


18 Mar, 2009

3 commits

  • In snd_free_sgbuf_pags(), vunmap() is called after releasing the SG
    pages, and it causes errors on Xen as Xen manages the pages
    differently. Although no significant errors have been reported on
    the actual hardware, this order should be fixed other way round,
    first vunmap() then free pages.

    Cc: Jan Beulich
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • s/mutex_lock/mutex_unlock/ on 2 fail paths in snd_pcm_oss_proc_write.
    Probably a typo, lock should be unlocked when leaving the function.

    Signed-off-by: Jiri Slaby
    Cc:
    Signed-off-by: Takashi Iwai

    Jiri Slaby
     
  • At the time of initialization, SNDRV_MIXER_OSS_PRESENT_PVOLUME bit is not
    set for MIC (slot 7).
    So, the same should not be checked when an application tries to do gain
    control for audio recording devices.

    Just check slot->present for SNDRV_MIXER_OSS_PRESENT_CVOLUME independently.
    Verified with a simple application which opens /dev/dsp for recording and
    /dev/mixer for volume control.

    Have tested two usb audio mic devices.

    Signed-off-by: Viral Mehta
    Signed-off-by: Takashi Iwai

    Viral Mehta
     

16 Mar, 2009

2 commits

  • Most fasync implementations do something like:

    return fasync_helper(...);

    But fasync_helper() will return a positive value at times - a feature used
    in at least one place. Thus, a number of other drivers do:

    err = fasync_helper(...);
    if (err < 0)
    return err;
    return 0;

    In the interests of consistency and more concise code, it makes sense to
    map positive return values onto zero where ->fasync() is called.

    Cc: Al Viro
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     
  • Traditionally, changes to struct file->f_flags have been done under BKL
    protection, or with no protection at all. This patch causes all f_flags
    changes after file open/creation time to be done under protection of
    f_lock. This allows the removal of some BKL usage and fixes a number of
    longstanding (if microscopic) races.

    Reviewed-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

09 Mar, 2009

7 commits


23 Feb, 2009

1 commit


18 Feb, 2009

1 commit

  • Currently the jack layer refers to card->longname as a part of
    its input device name string. However, longname is often really long
    and way too ugly as an identifier, such as,
    "HDA Intel at 0xf8400000 irq 21".

    This patch changes the code to use card->shortname instead.
    The shortname string contains usually the h/w vendor and product
    names but without messy I/O port or IRQ numbers.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

10 Feb, 2009

1 commit