08 Jan, 2012

1 commit

  • This is a follow up on 53dea36c70c1857 which fixes the other affected
    pcm engines.

    Description from 53dea36c70c1857:
    Don't rely on the codec's channels_min information to decide wheter or
    not allocate a substream's DMA buffer. Rather check if the substream
    itself was allocated previously.

    Without this patch I was seeing null-pointer dereferenc in atmel-pcm.

    Signed-off-by: Joachim Eastwood
    Signed-off-by: Mark Brown

    Joachim Eastwood
     

02 Jan, 2012

3 commits

  • The various devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_kzalloc, devm_request_mem_region and
    devm_ioremap for data that is allocated in the probe function of a platform
    device and is only freed in the remove function.

    In this case, the original code did not contain a call to iounmap, nor does
    one appear anywhere else in the file. I have assumed that it is safe to
    use devm_ioremap for the allocation in any case.

    Signed-off-by: Julia Lawall
    Signed-off-by: Mark Brown

    Julia Lawall
     
  • The various devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_kzalloc, devm_request_mem_region and
    devm_ioremap for data that is allocated in the probe function of a platform
    device and is only freed in the remove function.

    In this case, the original code did not contain a call to iounmap, nor does
    one appear anywhere else in the file. I have assumed that it is safe to
    use devm_ioremap for the allocation in any case.

    Signed-off-by: Julia Lawall
    Signed-off-by: Mark Brown

    Julia Lawall
     
  • The various devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_kzalloc, devm_request_mem_region and
    devm_ioremap for data that is allocated in the probe function of a platform
    device and is only freed in the remove function.

    Signed-off-by: Julia Lawall
    Signed-off-by: Mark Brown

    Julia Lawall
     

23 Dec, 2011

1 commit


25 Nov, 2011

1 commit


23 Nov, 2011

1 commit

  • Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
    introduced the possibility to have constant DAI ops structures, yet this is
    barley used in both existing drivers and also new drivers being submitted,
    although none of them modifies its DAI ops structure. The later is not
    surprising since existing drivers are often used as templates for new drivers.
    So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
    the issue altogether.

    The patch was generated with the following coccinelle semantic patch:
    //
    @@
    identifier ops;
    @@
    -struct snd_soc_dai_ops ops =
    +const struct snd_soc_dai_ops ops =
    { ... };
    //

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

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
     

14 Oct, 2011

1 commit


08 Oct, 2011

1 commit


30 Sep, 2011

1 commit

  • Commit 75d9ac4 ("ASoC: Allow DAI formats to be specified in the dai_link")
    changed DAI format flag values and we cannot simply invert anymore e.g.
    frame-sync with ^= SND_SOC_DAIFMT_NB_IF (which was anyway misuse) as there
    is no anymore fixed bit position for bit-clock or frame-sync inversion.

    Fix this by relying only on DAI format flag values passed to us and by not
    making any assumption on individual bit positions

    Signed-off-by: Jarkko Nikula
    Cc: Vaibhav Bedia
    Cc: Sekhar Nori
    Cc: Kevin Hilman
    Signed-off-by: Mark Brown

    Jarkko Nikula
     

16 Sep, 2011

1 commit

  • The ambiguously named variable 'link' is used as a temporary throughout
    davinci-pcm -- its presence makes grepping (and groking) the code
    difficult.

    Replace link with the value of link in almost all sites. The exception
    is a couple places where the last-assigned link/chan needs to be
    returned by a function -- in these cases, rename to last_link.

    Signed-off-by: Ben Gardiner
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     

29 Aug, 2011

1 commit

  • Although the McASP supports sign-extending samples in RX or TX [1]; the
    davinci-mcasp driver does not touch the {R,X}PBIT or {R,X}PAD field of the
    {R,X}FMT registers meaning that the McASP will serialize the bytes it is given
    regardless of their signedness. So supporting unsigned formats is as simple
    as adding them to the metadata of the davinci-mcasp driver.

    Update the FMTBITs reported in the snd_soc_dai_driver and also update the case
    statements in davinci-mcasp's hw_params() function so that the McASP can be
    connected to CODECs that use unsigned values.

    [1] http://www.ti.com/lit/ug/sprufm1/sprufm1.pdf

    Signed-off-by: Ben Gardiner
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     

21 Jul, 2011

2 commits

  • In davinci_vcif_trigger() function, a break() statement was missing
    causing the davinci_vcif_stop() function to be called as a fallback
    after calling davinci_vcif_start().

    Signed-off-by: Rajashekhara, Sudhakar
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Cc: stable@kernel.org

    Rajashekhara, Sudhakar
     
  • According to DM365 voice codec data sheet at [1], before starting
    recording or playback, ADC/DAC modules should follow a reset and
    enable cycle. Writing a 1 to the ADC/DAC bit in the register resets
    the module and clearing the bit to 0 will enable the module. But the
    driver seems to be doing the reverse of it.

    [1] http://focus.ti.com/lit/ug/sprufi9b/sprufi9b.pdf

    Signed-off-by: Rajashekhara, Sudhakar
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Cc: stable@kernel.org

    Rajashekhara, Sudhakar
     

08 Jun, 2011

1 commit


06 Jun, 2011

1 commit


30 May, 2011

1 commit


27 May, 2011

1 commit

  • With the addition of a platform device mfd_cell pointer, MFD drivers
    can go back to passing platform back to their sub drivers.
    This allows for an mfd_cell->mfd_data removal and thus keep the
    sub drivers MFD agnostic. This is mostly needed for non MFD aware
    sub drivers.

    Cc: Miguel Aguilar
    Cc: Mark Brown
    Cc: Liam Girdwood
    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     

25 May, 2011

7 commits

  • In the previous commit 'ASoC: davinci-pcm: convert to BATCH mode', the phase
    offset of 2 was mentioned in the commit message but not well commented in the
    source.

    Add descriptive comments of the phase offset with and without ping-pong
    buffers enabled.

    Signed-off-by: Ben Gardiner
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • The davinci-pcm driver's snd_pcm_ops pointer function currently calls into
    the edma controller driver to read the current positions of the edma channels
    to determine pos to return to the ALSA framework. In particular,
    davinci_pcm_pointer() calls edma_get_position() and the latter has a comment
    indicating that "Its channel should not be active when this is called" whereas
    the channel is surely active when snd_pcm_ops.pointer is called.

    The operation of davinci-pcm in capture and playback appears to follow close
    the other pcm drivers who export SNDRV_PCM_INFO_BATCH except that davinci-pcm
    does not report it's positions from pointer() using the last transferred
    chunk. Instead it peeks directly into the edma controller to determine the
    current position as discussed above.

    Convert the davinci-pcm driver to BATCH mode: count the periods elapsed in the
    prtd->period member and use its value to report the 'pos' to the alsa
    framework in the davinci_pcm_pointer function.

    There is a phase offset of 2 periods between the position used by dma setup
    and the position reported in the pointer function. Either +2 in the dma
    setup or -2 in the pointer function (with wrapping, both) accounts for this
    offset -- I opted for the latter since it makes the first-time setup clearer.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • Extract functions that modify the prtd->period member in preparation for
    conversion to BATCH mode playback.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • The release of the dma channels was being performed in prepare and there was a
    edma_resume call for the asp-channel only being executed on START, RESUME and
    PAUSE_RELEASE.

    The mcasp on da850evm with ping-pong buffers enabled was exhibiting an audible
    glitch on every playback after the first. It was determined through trial and
    error that the following two changes fix this problem:

    1) Move the edma_start calls from prepare to trigger and 2) reverse the order
    of starting the asp and ram channels.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • Based on the registration of davinci-mcasp.1 in the davinci-evm platform
    setup for da830 and dm6467, davinci-pcm can handle more than the currently
    reported maximum channels of 2.

    Increase the maximum channels to 384 to match the maximum reported by
    davinci-mcasp.1.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • Based on the data_type test in ping_pong_dma_setup, davinci-pcm is capable of
    handling data of width up to and including 32bits.

    "
    if ((data_type == 0) || (data_type > 4)) {
    printk(KERN_ERR "%s: data_type=%i\n", __func__, data_type);
    return -EINVAL;
    }
    "

    Update the .format member of the snd_pcm_hardware instances it registers to
    reflect this capability.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • The setup of the pong channel uses EDMA_CHAN_SLOT instead of & 0x3f as the
    setup of the ping channel does.

    Make the setup of ping and pong symmetric. There is no functional change
    introduced by this patch.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     

20 May, 2011

1 commit


26 Apr, 2011

4 commits

  • The current davinci_mcasp_set_dai_fmt() sets bits ACLKX and ACLKR in the PDIR
    register for the codec clock-master/frame-slave mode; however, this results in
    the ACLKX and ACLKR pins being outputs according to SPRUFM1 [1] which
    conflicts with "codec is clock master."

    Similarly to the previous patch in this series, "fix _CBM_CFS hw_params" --
    For codec clock-master/frame-slave mode (_CMB_CFS), clear bits ACLKX and ACLKR
    in the PDIR register to set the pins as inputs and hence allow externally
    sourced bit-clocks.

    [1] http://www.ti.com/litv/pdf/sprufm1

    Signed-off-by: Ben Gardiner
    Reviewed-by: James Nuss
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • The current davinci_mcasp_set_dai_fmt() sets bits ACLKXE and ACLKRE (CLKXM
    and CLKRM as they are reffered to in SPRUFM1 [1]) for codec clock-slave/
    frame-slave mode (_CBS_CFS) which selects internally generated bit-clock and
    frame-sync signals; however, it does the same thing again for codec
    clock-master/frame-slave mode (_CBM_CFS) in the very next case statement which
    is incorrectly selecting internally generated bit-clocks in this mode.

    For codec clock-master/frame-slave mode (_CBM_CFS), clear bits ACLKXE and
    ACLKRE to select externally-generated bit-clocks.

    [1] http://www.ti.com/litv/pdf/sprufm1

    Signed-off-by: Ben Gardiner
    Reviewed-by: James Nuss
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • The current driver creates value for set/clr of PDIR using (x<
    Reviewed-by: James Nuss
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • The current check for the number of tdm-slots specified by platform data is
    always true (x >= 2 || x
    Reviewed-by: James Nuss
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     

23 Mar, 2011

1 commit


10 Feb, 2011

3 commits


04 Feb, 2011

1 commit


22 Jan, 2011

1 commit

  • The codec_name entry for da8xx evm in sound/soc/davinci/davinci-evm.c
    is not matching with the i2c ids in the board file. Without this fix the
    soundcard does not get detected on da850/omap-l138/am18x evm.

    Signed-off-by: Rajashekhara, Sudhakar
    Tested-by: Dan Sharon
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Cc: stable@kernel.org (for 2.6.37)

    Rajashekhara, Sudhakar
     

05 Jan, 2011

1 commit


25 Nov, 2010

2 commits