31 Jul, 2009

1 commit

  • Check that the result of kzalloc is not NULL before a dereference.

    The semantic match that finds this problem is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    expression *x;
    identifier f;
    constant char *C;
    @@

    x = \(kmalloc\|kcalloc\|kzalloc\)(...);
    ... when != x == NULL
    when != x != NULL
    when != (x || ...)
    (
    kfree(x)
    |
    f(...,C,...,x,...)
    |
    *f(...,x,...)
    |
    *x->f
    )
    //

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

    Julia Lawall
     

12 May, 2009

1 commit

  • In the near future, the driver core is going to not allow direct access
    to the driver_data pointer in struct device. Instead, the functions
    dev_get_drvdata() and dev_set_drvdata() should be used. These functions
    have been around since the beginning, so are backwards compatible with
    all older kernel versions.

    Signed-off-by: Greg Kroah-Hartman
    Acked-by: Mark Brown
    Signed-off-by: Takashi Iwai

    Greg Kroah-Hartman
     

21 Apr, 2009

1 commit


24 Mar, 2009

1 commit


16 Jan, 2009

2 commits

  • Some machines have a master amp GPIO that needs to be toggled to
    get sound output, in addition to speaker/headphone/line-out amps.
    This makes snd-aoa handle it, if present in the device tree, thus
    making snd-aoa be able to output sound on PowerMac3,6, which was
    previously handled by snd-powermac which also doesn't use the
    master amp GPIO.

    Signed-off-by: Johannes Berg
    Signed-off-by: Takashi Iwai

    Johannes Berg
     
  • This patch changes snd-aoa to handle some older machines that are
    currently handled by snd-powermac. snd-aoa has a number of advantages
    though, notably it can autoload better and is generally a more modern
    driver.

    By hardcoding the accepted device-ids (last hunk of the patch) I'm
    trying to avoid regressions because this driver will otherwise load
    automatically and not let snd-powermac load. People who are unhappy
    with snd-powermac and have a device-id property in the device tree
    are encouraged to read this patch and make a patch to amend this as
    appropriate.

    Signed-off-by: Johannes Berg
    Signed-off-by: Takashi Iwai

    Johannes Berg
     

12 Jan, 2009

1 commit


25 Dec, 2008

1 commit


03 Nov, 2008

2 commits


24 Oct, 2008

3 commits


15 Oct, 2008

1 commit


25 Aug, 2008

1 commit


20 Aug, 2008

1 commit


27 May, 2008

1 commit


01 Feb, 2008

4 commits


16 Oct, 2007

2 commits


13 Oct, 2007

1 commit

  • This changes the uevent buffer functions to use a struct instead of a
    long list of parameters. It does no longer require the caller to do the
    proper buffer termination and size accounting, which is currently wrong
    in some places. It fixes a known bug where parts of the uevent
    environment are overwritten because of wrong index calculations.

    Many thanks to Mathieu Desnoyers for finding bugs and improving the
    error handling.

    Signed-off-by: Kay Sievers
    Cc: Mathieu Desnoyers
    Cc: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

20 Jul, 2007

1 commit


11 May, 2007

3 commits


07 May, 2007

1 commit


30 Apr, 2007

1 commit


28 Apr, 2007

1 commit


13 Apr, 2007

2 commits


09 Feb, 2007

7 commits

  • This fixes the problem of getting extra bytes inserted at the
    beginning of a recording when using the Apple i2s interface and DBDMA
    controller. It turns out that we can't just abort the DMA; we have to
    let it stop at the end of a command, and then wait for the S7 bit to
    be set before turning off the DBDMA controller. Doing that for
    playback doesn't seem to be necessary, but doesn't hurt either.
    We use the technique used by the Darwin driver: make each transfer
    command branch to a stop command if the S0 status bit is set. Thus we
    can ask the DMA controller to stop at the end of the current command
    by setting S0.
    The interrupt routine now looks at and clears the status word of the
    DBDMA command ring. This is necessary so it can know when the DBDMA
    controller has seen that S0 is set, and so when it should look for the
    DBDMA controller being stopped and S7 being set. This also ended up
    simplifying the calculation in i2sbus_pcm_pointer.
    Tested on a 15 inch albook.
    [Addition by Johannes]
    I modified this patch and added the suspend/resume bits to it to get my
    powermac into a decent state when playing sound across suspend to disk
    that has a different bitrate from what the firmware programs the
    hardware to.
    I also added the SNDRV_PCM_INFO_JOINT_DUPLEX flag because it seemed the
    right thing to do and I was looking at the info stuff.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Johannes Berg
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Paul Mackerras
     
  • This just removes two useless printks.

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

    Johannes Berg
     
  • This patch removes redundant argument checks for of_node_put() and kfree().
    Acked-by: Johannes Berg

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

    Mariusz Kozlowski
     
  • When the machine resumes the onyx codec might be in a weird state. Hence,
    simply fully reset it once (and keep the code to take it out of suspend in
    case the suspend of the codec chip survives a reset).

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

    Johannes Berg
     
  • create sysfs driver symlink for snd-aoa in /sys/bus/aoa-soundbus/devices/*/
    Acked-by: Johannes Berg

    Signed-off-by: Olaf Hering
    Signed-off-by: Andrew Morton
    Signed-off-by: Jaroslav Kysela

    Olaf Hering
     
  • create sysfs device symlinks for snd-aoa in /sys/class/sound/controlC0 This
    allows hald to recognize the device as sound device. Furthermore it allows
    the desktop user to actually access the sound device nodes. hald and
    related packages will modify the acl attributes.
    Fixes https://bugzilla.novell.com/show_bug.cgi?id=106294
    Acked-by: Johannes Berg

    Signed-off-by: Olaf Hering
    Signed-off-by: Andrew Morton
    Signed-off-by: Jaroslav Kysela

    Olaf Hering
     
  • This patch changes i2sbus_attach_codec to implement a proper error handling
    strategy using labels to jump to the right part. Since it has an elaborate
    set-up sequence it also needs that tear-down, which I had hard-coded
    inbetween all the checks. This increases readability and should reduce .text
    size as well.

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

    Johannes Berg