History log of /linux-master/sound/atmel/ac97c.c
Revision Date Author Comments
# 7e9f2839 14-Jul-2023 Rob Herring <robh@kernel.org>

ALSA: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230714175109.4066599-1-robh@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 45cc35e8 15-Mar-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ALSA: atmel: ac97: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20230315150745.67084-5-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# a971b42c 02-Sep-2020 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ALSA: atmel: ac97: clarify operator precedence

Fix cppcheck warnings:

sound/atmel/ac97c.c:478:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
casr & AC97C_CSR_OVRUN ? " OVRUN" : "",
^
sound/atmel/ac97c.c:479:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
casr & AC97C_CSR_RXRDY ? " RXRDY" : "",
^
sound/atmel/ac97c.c:480:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
casr & AC97C_CSR_UNRUN ? " UNRUN" : "",
^
sound/atmel/ac97c.c:481:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
casr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "",
^
sound/atmel/ac97c.c:482:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
casr & AC97C_CSR_TXRDY ? " TXRDY" : "",
^
sound/atmel/ac97c.c:524:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
cosr & AC97C_CSR_OVRUN ? " OVRUN" : "",
^
sound/atmel/ac97c.c:525:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
cosr & AC97C_CSR_RXRDY ? " RXRDY" : "",
^
sound/atmel/ac97c.c:526:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
cosr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "",
^
sound/atmel/ac97c.c:527:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
cosr & AC97C_CSR_TXRDY ? " TXRDY" : "",
^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200902212133.30964-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4d6cd8f1 09-Jul-2020 Takashi Iwai <tiwai@suse.de>

ALSA: atmel: Remove invalid "fall through" comments

The comments about fall through in sound/atmel/ac97.c are just
superfluous and rather confusing. Let's remove them.

Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200709111750.8337-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c0dbbdad 08-Jul-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

ALSA: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3a3fac8b 03-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: atmel: Constify snd_ac97_bus_ops definitions

Now snd_ac97_bus() takes the const ops pointer, so we can define the
snd_ac97_bus_ops locally as const as well for further optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-26-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1eb1a950 09-Dec-2019 Takashi Iwai <tiwai@suse.de>

ALSA: atmel: Drop superfluous ioctl PCM ops

PCM core deals the empty ioctl field now as default(*).
Let's kill the redundant lines.

(*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops")

Link: https://lore.kernel.org/r/20191210061145.24641-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 37b9b9a5 09-Dec-2019 Takashi Iwai <tiwai@suse.de>

ALSA: atmel: Use managed buffer allocation

Clean up the driver with the new managed buffer allocation API.
The hw_free_free callbacks became superfluous and got dropped.

Link: https://lore.kernel.org/r/20191209094943.14984-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500

Based on 2 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e6e8c82b 04-Feb-2019 Takashi Iwai <tiwai@suse.de>

ALSA: atmel: Drop superfluous PCM preallocation error checks

snd_pcm_lib_preallocate_pages() and co always succeed, so the error
check is simply redundant. Drop it.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5f10e849 01-Sep-2017 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

ALSA: atmel: convert AC97c driver to GPIO descriptor API

Convert the driver to use GPIO descriptor API.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0515760f 30-Aug-2017 Christophe Jaillet <christophe.jaillet@wanadoo.fr>

ALSA: ac97c: Fix an error handling path in 'atmel_ac97c_probe()'

If 'clk_prepare_enable()' fails, we must release some resources before
returning. Add a new label in the existing error handling path and 'goto'
there.

Fixes: 260ea95cc027 ("ASoC: atmel: ac97c: Handle return value of clk_prepare_enable.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3ca8590b 23-Aug-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

ALSA: ac97c: constify ac97_pcm structures

ac97_pcm are not supposed to change at runtime. All functions
working with ac97_pcm provided by <sound/ac97_codec.h> work with
const ac97_pcm. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 10863737 18-Aug-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

ALSA: atmel: constify snd_pcm_ops structures

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 85ab3738 17-Aug-2017 Bhumika Goyal <bhumirks@gmail.com>

ALSA: atmel: make snd_pcm_hardware const

Make this const as it is only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 260ea95c 25-Jul-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

ASoC: atmel: ac97c: Handle return value of clk_prepare_enable.

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 77201135 30-Jun-2017 Gustavo A. R. Silva <garsilva@embeddedor.com>

ALSA: atmel: ac97c: fix error return code in atmel_ac97c_probe()

platform_get_irq() returns an error code, but the ac97c
driver ignores it and always returns -ENXIO. This is not correct,
and prevents -EPROBE_DEFER from being propagated properly.
Notice that platform_get_irq() no longer returns 0 on error.

Print and propagate the return value of platform_get_irq on failure.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 020c5260 09-May-2017 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

ALSA: atmel: Remove AVR32 bits from the driver

AVR32 is gone. Now it's time to clean up the driver by removing
leftovers that was used by AVR32 related code.

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 976fa9a3 19-May-2015 Arnd Bergmann <arnd@arndb.de>

ALSA: sound/atmel/ac97c.c: remove unused variable

The recently added DT support for the ac97 driver is causing
a gcc warning:

sound/atmel/ac97c.c: In function 'atmel_ac97c_probe_dt':
sound/atmel/ac97c.c:919:29: warning: unused variable 'match' [-Wunused-variable]
const struct of_device_id *match;

The variable is clearly unused, so we can remove it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Alexander Stein <alexanders83@web.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b2d8957f 29-Dec-2014 Alexander Stein <alexanders83@web.de>

ALSA: sound/atmel/ac97c.c: Add device tree support

This adds device tree support for the AC97 controller. It uses the
soc-ac97link bindings, but actually only ac97-reset is used.

Signed-off-by: Alexander Stein <alexanders83@web.de>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 270384cc 26-Dec-2014 Arnd Bergmann <arnd@arndb.de>

ALSA: atmel: fix building the ac97 driver for at91-multiplatform

at91 will no longer export the mach/cpu.h and mach/hardware.h header files
in the future, which would break building the atmel ac97c driver.

Since the cpu_is_* check is only used to find out whether we are running
on avr32 or arm/at91, we can hardcode that check in the ARM case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: http://www.spinics.net/lists/arm-kernel/msg382068.html
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1132015b 05-Dec-2014 Alexander Stein <alexanders83@web.de>

ALSA: sound/atmel/ac97c.c: Add missing clock prepare

Clocks must be prepared before enabling them. Do this in one step.
Replace clk_enable with clk_prepare_enable and clk_disable with
clk_disable_unprepare. This fixes the following warning:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:895 __clk_enable+0x24/0x9c()
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Tainted: G W 3.18.0-rc7+ #245
[<c000dce8>] (unwind_backtrace) from [<c000bcf0>] (show_stack+0x10/0x14)
[<c000bcf0>] (show_stack) from [<c001664c>] (warn_slowpath_common+0x60/0x80)
[<c001664c>] (warn_slowpath_common) from [<c00166fc>] (warn_slowpath_null+0x18/0x20)
[<c00166fc>] (warn_slowpath_null) from [<c02fd7ac>] (__clk_enable+0x24/0x9c)
[<c02fd7ac>] (__clk_enable) from [<c02fdbb4>] (clk_enable+0x18/0x2c)
[<c02fdbb4>] (clk_enable) from [<c0322688>] (atmel_ac97c_probe+0x154/0x694)
[<c0322688>] (atmel_ac97c_probe) from [<c0235e08>] (platform_drv_probe+0x48/0x94)
[<c0235e08>] (platform_drv_probe) from [<c02345f8>] (driver_probe_device+0x138/0x350)
[<c02345f8>] (driver_probe_device) from [<c02348bc>] (__driver_attach+0x68/0x8c)
[<c02348bc>] (__driver_attach) from [<c0232bd0>] (bus_for_each_dev+0x70/0x84)
[<c0232bd0>] (bus_for_each_dev) from [<c0233cd8>] (bus_add_driver+0xfc/0x1f8)
[<c0233cd8>] (bus_add_driver) from [<c0234f0c>] (driver_register+0x9c/0xe0)
[<c0234f0c>] (driver_register) from [<c0008ac4>] (do_one_initcall+0x110/0x1c8)
[<c0008ac4>] (do_one_initcall) from [<c053cd58>] (kernel_init_freeable+0xf8/0x1b8)
[<c053cd58>] (kernel_init_freeable) from [<c03c0414>] (kernel_init+0x8/0xe4)
[<c03c0414>] (kernel_init) from [<c00096d0>] (ret_from_fork+0x14/0x24)
---[ end trace cb88537fdc8fa201 ]---
atmel_ac97c fffa0000.sound: AC'97 0 does not respond - RESET
atmel_ac97c fffa0000.sound: AC'97 0 access is not valid [0xffffffff], removing mixer.
------------[ cut here ]------------

Signed-off-by: Alexander Stein <alexanders83@web.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ca460cc2 05-Dec-2014 Alexander Stein <alexanders83@web.de>

ALSA: sound/atmel/ac97c.c: Fix device index for pcm

chip->pdev->id is -1 by default. This is an invalid index resulting in
device file names like /dev/snd/pcmC0D-1p.

Signed-off-by: Alexander Stein <alexanders83@web.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 16573a98 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

ALSA: atmel: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# 3d588f83 23-Sep-2014 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

dmaengine: dw: split dma-dw.h to platform and private parts

The introduced include/linux/dma/dw.h is going to contain the private
extensions and structures which are shared for dw_dmac users in the kernel.
Meanwhile include/linux/platform_data/dma-dw.h keeps only platform related data
types and definitions.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# 3d598f47 19-Aug-2014 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

dmaengine: dw: move dw_dmac.h to where it belongs to

There is a common storage for platform data related structures and definitions
inside kernel source tree. The patch moves file from include/linux to
include/linux/platform_data and renames it acoordingly. The users are also
updated.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
[For the arch/avr32/.* and .*sound/atmel.*]
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# 4b973ee0 15-Apr-2014 Alexander Stein <alexanders83@web.de>

ALSA: sound/atmel/ac97c.c: Convert to module_platform_driver

This reduces some boilerplate code.

Signed-off-by: Alexander Stein <alexanders83@web.de>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a4f2473d 29-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: atmel: Convert to snd_card_new() with a device pointer

Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a1c22cdc 05-Nov-2013 Linus Walleij <linus.walleij@linaro.org>

ALSA: atmel: remove dependency on <mach/gpio.h>

This include is completely unused since the AT91 sound driver
actually uses gpiolib properly.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9ea6cfbc 02-May-2013 Sachin Kamat <sachin.kamat@linaro.org>

ALSA: atmel: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 74c34ca1 22-Apr-2013 Eldad Zack <eldad@fogrefinery.com>

ALSA: pcm_format_to_bits strong-typed conversion

Add a function to handle conversion from snd_pcm_format_t
to bitwise with proper typing.

Change such conversions to use this function and silence sparse
warnings.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 61dc674c 05-Dec-2012 Bill Pemberton <wfp5p@virginia.edu>

ALSA: atmel: remove __dev* attributes

CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0c23e46e 19-Aug-2012 Julia Lawall <Julia.Lawall@lip6.fr>

ALSA: sound/atmel/ac97c.c: fix error return code

In the first case, the second test of whether retval is negative is
redundant. It is dropped and the previous and subsequent tests are
combined.

In the second case, add an initialization of retval on failure of ioremap.

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

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d34e4e00 09-Aug-2012 Takashi Iwai <tiwai@suse.de>

ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PM

When CONFIG_PM is set but CONFIG_PM_SLEEP is unset,
SIMPLE_DEV_PM_OPS() ignores the given functions, and this leads to
compile warnings.

For avoiding this, simply check CONFIG_PM_SLEEP instead of CONFIG_PM.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 284e7ca7 02-Jul-2012 Takashi Iwai <tiwai@suse.de>

ALSA: convert PM ops of platform_driver to new pm ops

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8bf01d8a 02-Jul-2012 Takashi Iwai <tiwai@suse.de>

ALSA: Add missing .owner=THIS_MODULE to platform_driver definitions

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b2522f92 11-May-2012 Bo Shen <voice.shen@atmel.com>

ALSA: atmel/ac97c: correct the unexpected behavior when using uninitial value for reset pin

When pdata->reset_pin is passed with a negative value (means gpio
is invalid), then chip->reset_pin will not be assigned to a vaule,
it will use default value 0. This will cause unexpected behavior.

So, add this patch to correct.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e2b35f3d 01-Feb-2012 Viresh Kumar <vireshk@kernel.org>

dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config changes

There are few existing user drivers of dw_dmac. They will break as soon as we
remove unused fields from struct dw_dma_slave. This patch focuses to fix these
user drivers to use dma_slave_config() routine.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>


# 8015e3de 19-Dec-2011 Bo Shen <voice.shen@atmel.com>

ALSA: atmel/ac97c: using software reset instead hardware reset if not available

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 35e16581 13-Oct-2011 Vinod Koul <vkoul@kernel.org>

sound-soc: move to dma_transfer_direction

fixup usage of dma direction by introducing dma_transfer_direction,
this patch moves asoc drivers to use new enum

Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 0cfae7c9 28-Jun-2011 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

ALSA: atmel - update author email for ABDAC, AC97C and AT73C213

This patch updates the email address of the sound drivers supported by me to an
email account I will use on a more regular basis in the future.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 28f65c11 09-Jun-2011 Joe Perches <joe@perches.com>

treewide: Convert uses of struct resource to resource_size(ptr)

Several fixes as well where the +1 was missing.

Done via coccinelle scripts like:

@@
struct resource *ptr;
@@

- ptr->end - ptr->start + 1
+ resource_size(ptr)

and some grep and typing.

Mostly uncompiled, no cross-compilers.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# fd76804f 24-Jan-2011 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

ALSA: fix invalid hardware.h include in ac97c for AVR32 architecture

This patch fixes the non-compiling AC97C driver for AVR32 architecture by
include mach/hardware.h only for AT91 architecture. The AVR32 architecture does
not supply the hardware.h include file.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
CC: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f5341163 08-Jun-2010 Yegor Yefremov <yegorslists@googlemail.com>

ALSA: atmel: set "channel A event" output to debug

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ec2755a9 25-Feb-2010 Sedji Gaouaou <sedji.gaouaou@atmel.com>

ALSA: AC97: add full duplex support for atmel AT91 and AVR.

This patch add full duplex support on AT91 and AVR.
It was a bug: we needed to check first if there are some chips opened so we
could enable both reception and sending of the data.

Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7177395f 28-Feb-2010 Sedji Gaouaou <sedji.gaouaou@atmel.com>

ALSA: AC97: add AC97 support for AT91.

This patch add AC97 support for ATMEL AT91, using the AVR32 code.
While AVR is using a DMA, the AT91 chips are using a Peripheral Data
Controller.

Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23572856 02-Apr-2009 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

ALSA: snd-atmel-ac97c: replace bus_id with dev_name()

This patch replaces the references to bus_id to the new dev_name() API.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bd74a184 02-Apr-2009 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

ALSA: snd-atmel-ac97c: cleanup registers when removing driver

This patch will set the channel A and control channel mode register to
zero before disabling the AC97C peripheral.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 81baf3a7 02-Apr-2009 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

ALSA: snd-atmel-ac97c: do a proper reset of the external codec

This patch will enable the AC97C before resetting the external codec,
leaving the AC97C disabled will result in floating I/O lines that can
affect the reset procedure.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# df163587 02-Apr-2009 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

ALSA: snd-atmel-ac97c: enable interrupts to catch events for error reporting

This patch will enable interrupts from AC97C and report about error
conditions that occurs.

On channel A both overrun and underrun will be enabled depending if
playback and/or capture are enabled. On the control channel the overrun
interrupt is enabled.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c42eec0f 02-Apr-2009 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

ALSA: snd-atmel-ac97c: set correct size for buffer hardware parameter

This patch will set a proper maximum bytes for the buffer, which is:
channels * bytes per sample * maximum periods * maximum bytes per period.

It also sets the minimum periods to 6, a value chosen from testing, with
a minimum of 6 periods the system has good time to fill in new audio
data without skipping.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 128ed6a9 02-Apr-2009 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

ALSA: snd-atmel-ac97c: do not overwrite OCA and ICA when assigning channels

This patch will take care not to overwrite OCA and ICA registers when
assigning input and output channels. It will also make sure the
registers are at a known state when enabling a channel and clean up
properly in case of an error.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d54bb9f0 02-Apr-2009 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

ALSA: snd-atmel-ac97c: remove dead break statements after return in switch case

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4ede028f 05-Feb-2009 Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

ALSA: Add ALSA driver for Atmel AC97 controller

This patch adds ALSA support for the AC97 controller found on Atmel
AVR32 devices.

Tested on ATSTK1006 + ATSTK1000 with a development board with a AC97
codec.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>