13 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (526 commits)
    ASoC: twl6040 - Add method to query optimum PDM_DL1 gain
    ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
    ALSA: usb-audio: add Yamaha MOX6/MOX8 support
    ALSA: virtuoso: add S/PDIF input support for all Xonars
    ALSA: ice1724 - Support for ooAoo SQ210a
    ALSA: ice1724 - Allow card info based on model only
    ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
    ALSA: hdspm - Provide unique driver id based on card serial
    ASoC: Dynamically allocate the rtd device for a non-empty release()
    ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC
    ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
    ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
    ALSA: hda - Use auto-parser for HP laptops with cx20459 codec
    ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
    ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()
    ALSA: hda/cirrus - support for iMac12,2 model
    ASoC: cx20442: add bias control over a platform provided regulator
    ALSA: usb-audio - Avoid flood of frame-active debug messages
    ALSA: snd-usb-us122l: Delete calls to preempt_disable
    mfd: Put WM8994 into cache only mode when suspending
    ...

    Fix up trivial conflicts in:
    - arch/arm/mach-s3c64xx/mach-crag6410.c:
    renamed speyside_wm8962 to tobermory, added littlemill right
    next to it
    - drivers/base/regmap/{regcache.c,regmap.c}:
    duplicate diff that had already come in with other changes in
    the regmap tree

    Linus Torvalds
     

19 Dec, 2011

1 commit

  • module_param(bool) used to counter-intuitively take an int. In
    fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
    trick.

    It's time to remove the int/unsigned int option. For this version
    it'll simply give a warning, but it'll break next kernel version.

    Signed-off-by: Rusty Russell
    Signed-off-by: Takashi Iwai

    Rusty Russell
     

23 Nov, 2011

1 commit


29 Oct, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (549 commits)
    ALSA: hda - Fix ADC input-amp handling for Cx20549 codec
    ALSA: hda - Keep EAPD turned on for old Conexant chips
    ALSA: hda/realtek - Fix missing volume controls with ALC260
    ASoC: wm8940: Properly set codec->dapm.bias_level
    ALSA: hda - Fix pin-config for ASUS W90V
    ALSA: hda - Fix surround/CLFE headphone and speaker pins order
    ALSA: hda - Fix typo
    ALSA: Update the sound git tree URL
    ALSA: HDA: Add new revision for ALC662
    ASoC: max98095: Convert codec->hw_write to snd_soc_write
    ASoC: keep pointer to resource so it can be freed
    ASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits calls
    ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2
    ASoC: da7210: Add support for line out and DAC
    ASoC: da7210: Add support for DAPM
    ALSA: hda/realtek - Fix DAC assignments of multiple speakers
    ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
    ASoC: Set sgtl5000->ldo in ldo_regulator_register
    ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 Capture
    ASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 Capture
    ...

    Linus Torvalds
     

29 Sep, 2011

1 commit

  • sound_timer.info.name is a 32 character buffer. This function only
    has one caller (in sound/oss/ad1848.c) and it passes as 128 character
    buffer as "name". I don't know if this is a problem in real life,
    and I doubt we're going to add more OSS drivers so it's unlikely to
    become an issue. But we may as well take care of it.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Takashi Iwai

    Dan Carpenter
     

28 Sep, 2011

1 commit

  • There are numerous broken references to Documentation files (in other
    Documentation files, in comments, etc.). These broken references are
    caused by typo's in the references, and by renames or removals of the
    Documentation files. Some broken references are simply odd.

    Fix these broken references, sometimes by dropping the irrelevant text
    they were part of.

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     

08 Aug, 2011

1 commit


04 Aug, 2011

1 commit


28 Jul, 2011

1 commit


20 May, 2011

1 commit


31 Mar, 2011

1 commit


24 Mar, 2011

2 commits

  • User-controllable indexes for voice and channel values may cause reading
    and writing beyond the bounds of their respective arrays, leading to
    potentially exploitable memory corruption. Validate these indexes.

    Signed-off-by: Dan Rosenberg
    Cc: stable@kernel.org
    Signed-off-by: Takashi Iwai

    Dan Rosenberg
     
  • Was: [PATCH] sound/oss/midi_synth: prevent underflow, use of
    uninitialized value, and signedness issue

    The offset passed to midi_synth_load_patch() can be essentially
    arbitrary. If it's greater than the header length, this will result in
    a copy_from_user(dst, src, negative_val). While this will just return
    -EFAULT on x86, on other architectures this may cause memory corruption.
    Additionally, the length field of the sysex_info structure may not be
    initialized prior to its use. Finally, a signed comparison may result
    in an unintentionally large loop.

    On suggestion by Takashi Iwai, version two removes the offset argument
    from the load_patch callbacks entirely, which also resolves similar
    issues in opl3. Compile tested only.

    v3 adjusts comments and hopefully gets copy offsets right.

    Signed-off-by: Dan Rosenberg
    Signed-off-by: Takashi Iwai

    Dan Rosenberg
     

11 Mar, 2011

1 commit


10 Mar, 2011

1 commit

  • Since OSS driver creates the device entries for /dev/audio* and
    /dev/dspW* by itself without coping with sound_core, it leads to
    conflicts with others and let sysfs spewing warnings.

    This patch rewrites the registration part of OSS driver to use
    the standard method also for additional minor devices.

    Reported-by: Steven Rostedt (with ktest.pl)
    Tested-by: Steven Rostedt (with ktest.pl)
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

31 Jan, 2011

1 commit


30 Dec, 2010

1 commit

  • The load_mixer_volumes() function, which can be triggered by
    unprivileged users via the SOUND_MIXER_SETLEVELS ioctl, is vulnerable to
    a buffer overflow. Because the provided "name" argument isn't
    guaranteed to be NULL terminated at the expected 32 bytes, it's possible
    to overflow past the end of the last element in the mixer_vols array.
    Further exploitation can result in an arbitrary kernel write (via
    subsequent calls to load_mixer_volumes()) leading to privilege
    escalation, or arbitrary kernel reads via get_mixer_levels(). In
    addition, the strcmp() may leak bytes beyond the mixer_vols array.

    Signed-off-by: Dan Rosenberg
    Cc: stable
    Signed-off-by: Takashi Iwai

    Dan Rosenberg
     

11 Nov, 2010

2 commits


28 Oct, 2010

1 commit


27 Oct, 2010

1 commit

  • Delete successive assignments to the same location.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression i;
    @@

    *i = ...;
    i = ...;
    //

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

    Julia Lawall
     

25 Oct, 2010

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (365 commits)
    ALSA: hda - Disable sticky PCM stream assignment for AD codecs
    ALSA: usb - Creative USB X-Fi volume knob support
    ALSA: ca0106: Use card specific dac id for mute controls.
    ALSA: ca0106: Allow different sound cards to use different SPI channel mappings.
    ALSA: ca0106: Create a nice spot for mapping channels to dacs.
    ALSA: ca0106: Move enabling of front dac out of hardcoded setup sequence.
    ALSA: ca0106: Pull out dac powering routine into separate function.
    ALSA: ca0106 - add Sound Blaster 5.1vx info.
    ASoC: tlv320dac33: Use usleep_range for delays
    ALSA: usb-audio: add Novation Launchpad support
    ALSA: hda - Add workarounds for CT-IBG controllers
    ALSA: hda - Fix wrong TLV mute bit for STAC/IDT codecs
    ASoC: tpa6130a2: Error handling for broken chip
    ASoC: max98088: Staticise m98088_eq_band
    ASoC: soc-core: Fix codec->name memory leak
    ALSA: hda - Apply ideapad quirk to Acer laptops with Cxt5066
    ALSA: hda - Add some workarounds for Creative IBG
    ALSA: hda - Fix wrong SPDIF NID assignment for CA0110
    ALSA: hda - Fix codec rename rules for ALC662-compatible codecs
    ALSA: hda - Add alc_init_jacks() call to other codecs
    ...

    Linus Torvalds
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Update broken web addresses in arch directory.
    Update broken web addresses in the kernel.
    Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
    Revert "Fix typo: configuation => configuration" partially
    ida: document IDA_BITMAP_LONGS calculation
    ext2: fix a typo on comment in ext2/inode.c
    drivers/scsi: Remove unnecessary casts of private_data
    drivers/s390: Remove unnecessary casts of private_data
    net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
    drivers/infiniband: Remove unnecessary casts of private_data
    drivers/gpu/drm: Remove unnecessary casts of private_data
    kernel/pm_qos_params.c: Remove unnecessary casts of private_data
    fs/ecryptfs: Remove unnecessary casts of private_data
    fs/seq_file.c: Remove unnecessary casts of private_data
    arm: uengine.c: remove C99 comments
    arm: scoop.c: remove C99 comments
    Fix typo configue => configure in comments
    Fix typo: configuation => configuration
    Fix typo interrest[ing|ed] => interest[ing|ed]
    Fix various typos of valid in comments
    ...

    Fix up trivial conflicts in:
    drivers/char/ipmi/ipmi_si_intf.c
    drivers/usb/gadget/rndis.c
    net/irda/irnet/irnet_ppp.c

    Linus Torvalds
     

23 Oct, 2010

1 commit

  • * 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
    vfs: make no_llseek the default
    vfs: don't use BKL in default_llseek
    llseek: automatically add .llseek fop
    libfs: use generic_file_llseek for simple_attr
    mac80211: disallow seeks in minstrel debug code
    lirc: make chardev nonseekable
    viotape: use noop_llseek
    raw: use explicit llseek file operations
    ibmasmfs: use generic_file_llseek
    spufs: use llseek in all file operations
    arm/omap: use generic_file_llseek in iommu_debug
    lkdtm: use generic_file_llseek in debugfs
    net/wireless: use generic_file_llseek in debugfs
    drm: use noop_llseek

    Linus Torvalds
     

18 Oct, 2010

1 commit

  • The patch below updates broken web addresses in the kernel

    Signed-off-by: Justin P. Mattock
    Cc: Maciej W. Rozycki
    Cc: Geert Uytterhoeven
    Cc: Finn Thain
    Cc: Randy Dunlap
    Cc: Matt Turner
    Cc: Dimitry Torokhov
    Cc: Mike Frysinger
    Acked-by: Ben Pfaff
    Acked-by: Hans J. Koch
    Reviewed-by: Finn Thain
    Signed-off-by: Jiri Kosina

    Justin P. Mattock
     

15 Oct, 2010

1 commit

  • All file_operations should get a .llseek operation so we can make
    nonseekable_open the default for future file operations without a
    .llseek pointer.

    The three cases that we can automatically detect are no_llseek, seq_lseek
    and default_llseek. For cases where we can we can automatically prove that
    the file offset is always ignored, we use noop_llseek, which maintains
    the current behavior of not returning an error from a seek.

    New drivers should normally not use noop_llseek but instead use no_llseek
    and call nonseekable_open at open time. Existing drivers can be converted
    to do the same when the maintainer knows for certain that no user code
    relies on calling seek on the device file.

    The generated code is often incorrectly indented and right now contains
    comments that clarify for each added line why a specific variant was
    chosen. In the version that gets submitted upstream, the comments will
    be gone and I will manually fix the indentation, because there does not
    seem to be a way to do that using coccinelle.

    Some amount of new code is currently sitting in linux-next that should get
    the same modifications, which I will do at the end of the merge window.

    Many thanks to Julia Lawall for helping me learn to write a semantic
    patch that does all this.

    ===== begin semantic patch =====
    // This adds an llseek= method to all file operations,
    // as a preparation for making no_llseek the default.
    //
    // The rules are
    // - use no_llseek explicitly if we do nonseekable_open
    // - use seq_lseek for sequential files
    // - use default_llseek if we know we access f_pos
    // - use noop_llseek if we know we don't access f_pos,
    // but we still want to allow users to call lseek
    //
    @ open1 exists @
    identifier nested_open;
    @@
    nested_open(...)
    {

    }

    @ open exists@
    identifier open_f;
    identifier i, f;
    identifier open1.nested_open;
    @@
    int open_f(struct inode *i, struct file *f)
    {

    }

    @ read disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {

    }

    @ read_no_fpos disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ write @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {

    }

    @ write_no_fpos @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ fops0 @
    identifier fops;
    @@
    struct file_operations fops = {
    ...
    };

    @ has_llseek depends on fops0 @
    identifier fops0.fops;
    identifier llseek_f;
    @@
    struct file_operations fops = {
    ...
    .llseek = llseek_f,
    ...
    };

    @ has_read depends on fops0 @
    identifier fops0.fops;
    identifier read_f;
    @@
    struct file_operations fops = {
    ...
    .read = read_f,
    ...
    };

    @ has_write depends on fops0 @
    identifier fops0.fops;
    identifier write_f;
    @@
    struct file_operations fops = {
    ...
    .write = write_f,
    ...
    };

    @ has_open depends on fops0 @
    identifier fops0.fops;
    identifier open_f;
    @@
    struct file_operations fops = {
    ...
    .open = open_f,
    ...
    };

    // use no_llseek if we call nonseekable_open
    ////////////////////////////////////////////
    @ nonseekable1 depends on !has_llseek && has_open @
    identifier fops0.fops;
    identifier nso ~= "nonseekable_open";
    @@
    struct file_operations fops = {
    ... .open = nso, ...
    +.llseek = no_llseek, /* nonseekable */
    };

    @ nonseekable2 depends on !has_llseek @
    identifier fops0.fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ... .open = open_f, ...
    +.llseek = no_llseek, /* open uses nonseekable */
    };

    // use seq_lseek for sequential files
    /////////////////////////////////////
    @ seq depends on !has_llseek @
    identifier fops0.fops;
    identifier sr ~= "seq_read";
    @@
    struct file_operations fops = {
    ... .read = sr, ...
    +.llseek = seq_lseek, /* we have seq_read */
    };

    // use default_llseek if there is a readdir
    ///////////////////////////////////////////
    @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier readdir_e;
    @@
    // any other fop is used that changes pos
    struct file_operations fops = {
    ... .readdir = readdir_e, ...
    +.llseek = default_llseek, /* readdir is present */
    };

    // use default_llseek if at least one of read/write touches f_pos
    /////////////////////////////////////////////////////////////////
    @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read.read_f;
    @@
    // read fops use offset
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = default_llseek, /* read accesses f_pos */
    };

    @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ... .write = write_f, ...
    + .llseek = default_llseek, /* write accesses f_pos */
    };

    // Use noop_llseek if neither read nor write accesses f_pos
    ///////////////////////////////////////////////////////////

    @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    identifier write_no_fpos.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ...
    .write = write_f,
    .read = read_f,
    ...
    +.llseek = noop_llseek, /* read and write both use no f_pos */
    };

    @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write_no_fpos.write_f;
    @@
    struct file_operations fops = {
    ... .write = write_f, ...
    +.llseek = noop_llseek, /* write uses no f_pos */
    };

    @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    @@
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = noop_llseek, /* read uses no f_pos */
    };

    @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    @@
    struct file_operations fops = {
    ...
    +.llseek = noop_llseek, /* no read or write fn */
    };
    ===== End semantic patch =====

    Signed-off-by: Arnd Bergmann
    Cc: Julia Lawall
    Cc: Christoph Hellwig

    Arnd Bergmann
     

11 Oct, 2010

3 commits


23 Sep, 2010

1 commit

  • Remove the SH DAC oss driver since there is an equivalent alsa driver.
    oss has been deprecated for years. Furthermore this driver has BKL code
    which we are trying to remove. Rather than attempt to fix this, simply
    remove the driver.

    Signed-off-by: John Kacur
    Acked-by: Paul Mundt
    Acked-by: Ralf Baechle
    Signed-off-by: Takashi Iwai

    John Kacur
     

15 Sep, 2010

1 commit

  • The usage of the BKL in the OSS sound drivers is
    trivial, and each of them only locks against itself,
    so it can be turned into per-driver mutexes.

    This is the script that was used for the conversion:

    file=$1
    name=$2
    if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
    sed -i '/include.*/d' ${file}
    else
    sed -i 's/include.*.*$/include /g' ${file}
    fi
    sed -i ${file} \
    -e "/^#include.*linux.mutex.h/,$ {
    1,/^\(static\|int\|long\)/ {
    /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

    } }" \
    -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
    -e '/[ ]*cycle_kernel_lock();/d'
    else
    sed -i -e '/include.*\/d' ${file} \
    -e '/cycle_kernel_lock()/d'
    fi

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Takashi Iwai

    Arnd Bergmann
     

07 Sep, 2010

1 commit


28 Aug, 2010

1 commit


12 Aug, 2010

1 commit


06 Aug, 2010

2 commits


29 Jul, 2010

2 commits


26 Jul, 2010

2 commits