Commit Graph

16 Commits

Author SHA1 Message Date
Kuninori Morimoto f98fc0f815
ASoC: kirkwood: replace platform to component
Now platform can be replaced to component, let's do it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12 11:45:28 +00:00
Bhumika Goyal f5fe8c4589 ASoC: kirkwood: make kirkwood_soc_platform const
Make kirkwood_soc_platform const as it only passed to a const argument
of the function snd_soc_register_platform in the file referencing it.
Make the declaration const too.

Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-27 10:02:18 -07:00
Russell King a622251c01 ASoC: kirkwood: allow smaller audio periods and smaller number of periods
There is no hardware restriction requiring a minimum of 8 periods, or
a minimum of 2048 bytes in a period.  Let's drop these values so that
userspace has more flexibility in choosing these parameters.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28 13:18:41 +01:00
Russell King 52b896cfef ASoC: kirkwood-i2s: provide helper KIRKWOOD_RECCTL_ENABLE_MASK definition
Add a KIRKWOOD_RECCTL_ENABLE_MASK definition to complement the existing
PLAYCTL definition, and make use of it where we wish to clear both
enable bits.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28 13:18:17 +01:00
Jean-Francois Moine ce3d060990 ASoc: kirkwood: Extend the min and max number of bytes per period
This patch extends the min and max number of bytes per period.
It mainly permits to reduce the sound delay in MIDI real-time playing.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 11:18:36 +01:00
Russell King e4065f3ff1 ASoC: kirkwood: move calculation of max buffer size to kirkwood.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-05 18:06:57 +01:00
Russell King 64ddf1f89c ASoC: kirkwood: combine kirkwood-i2s and kirkwood-dma drivers
These really should be a single driver because they're fully integrated
in hardware.  Make them so.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-05 18:06:30 +01:00
Russell King db43b16fa0 ASoC: kirkwood: provide KIRKWOOD_PLAYCTL_ENABLE_MASK
Provide a helper macro which includes the sum of all enable bits in
the playback control register.  This simplifies the code a little.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-05 18:03:23 +01:00
Russell King a7d0942979 ASoC: kirkwood: merge struct kirkwood_dma_priv with struct kirkwood_dma_data
Merge these two structures together; nothing other than the I2S and
DMA driver makes use of struct kirkwood_dma_data, and it's not like
struct kirkwood_dma_data is really just used to convey DMA specific
data to the backend; it's more a general shared structure between the
two halves.

This will later allow kirkwood-dma.c and kirkwood-i2s.c to be merged
together.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-05 15:49:20 +01:00
Russell King 363589bf11 ASoC: kirkwood-i2s: add support for external clock rates
This is part of a patch found in Rabeeh Khoury's git tree for the
cubox, and cleaned up by me.

Some platforms provide an external clock which can be used to allow
other sample rates to be selected.  Provide support for this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21 10:40:23 +09:00
Russell King d8d11ba566 ASoC: kirkwood-i2s: better handling of play/record control registers
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21 10:40:23 +09:00
Russell King dbc517bf32 ASoC: kirkwood-i2s: use devm_* APIs
Simplify the cleanup paths in the driver by using the devm_* APIs,
ensuring that all error paths are correctly checked.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21 10:40:23 +09:00
Andrew Lunn e919c71665 ARM: Orion: Audio: Add clk/clkdev support
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-05-08 16:34:03 -07:00
Axel Lin d4d9820b4a ASoC: Fix build error in sound/soc/kirkwood/kirkwood-i2s.c
Since commit db33f4de "ARM: Orion: Remove address map info from all platform data structures",
the dram is removed from struct kirkwood_asoc_platform_data.

This patch fixes below build error:
  CC      sound/soc/kirkwood/kirkwood-i2s.o
sound/soc/kirkwood/kirkwood-i2s.c: In function 'kirkwood_i2s_dev_probe':
sound/soc/kirkwood/kirkwood-i2s.c:444: error: 'struct kirkwood_asoc_platform_data' has no member named 'dram'
sound/soc/kirkwood/kirkwood-i2s.c:450: error: 'struct kirkwood_asoc_platform_data' has no member named 'dram'
make[3]: *** [sound/soc/kirkwood/kirkwood-i2s.o] Error 1
make[2]: *** [sound/soc/kirkwood] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 11:37:36 +00:00
arnaud.patard@rtp-net.org dfe4c93627 ASoC: Fix kirkwood i2s mono playback
Kirkwood controller needs to be informed if the audio stream is mono
or not. Failing to do so will result in playing at the wrong speed.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:37:09 +01:00
apatard@mandriva.com f9b95980f8 ASoC: kirkwood: Add i2s support
This patch enables support for the i2s controller available on kirkwood
platforms

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31 13:16:37 +01:00