Commit graph

159 commits

Author SHA1 Message Date
Mark Brown fed25395ff Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/doc', 'asoc/topic/dpcm', 'asoc/topic/dwc' and 'asoc/topic/fsi' into asoc-next 2014-12-08 13:11:56 +00:00
Markus Elfring e98c89e05e ASoC: fsi: Deletion of unnecessary checks before the function call "clk_disable"
The clk_disable() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03 18:29:04 +00:00
Kuninori Morimoto c1b9b9b1ad ASoC: fsi: remove unsupported PAUSE flag
FSI doesn't support PAUSE.
Remove SNDRV_PCM_INFO_PAUSE flags from snd_pcm_hardware info

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-10-29 11:02:43 +00:00
Lars-Peter Clausen 6c7d1dfca9 ASoC: sh: Fix dma direction type
dmaengine_prep_slave_single() expects a enum dma_transfer_direction and not a
enum dma_data_direction. Since the integer representations of both DMA_TO_DEVICE
and DMA_MEM_TO_DEV aswell as DMA_FROM_DEVICE and DMA_DEV_TO_MEM have the same
value the code worked fine even though it was using the wrong type.

Fixes the following warnings from sparse:
	sound/soc/sh/fsi.c:1307:42: warning: mixing different enum types
	sound/soc/sh/fsi.c:1307:42:     int enum dma_data_direction  versus
	sound/soc/sh/fsi.c:1307:42:     int enum dma_transfer_direction

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:34:05 -05:00
Mark Brown c1bd940afd Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/rt5677', 'asoc/topic/s6000', 'asoc/topic/samsung' and 'asoc/topic/sh-fsi' into asoc-next 2014-08-04 16:32:01 +01:00
Kuninori Morimoto 8457e0e9e2 ASoC: fsi: use dmaengine_prep_dma_cyclic() for DMA transfer
Current FSI driver is using DMAEngine directly,
but, ASoC is requesting to use common DMA transfer method,
like snd_dmaengine_pcm_trigger() or dmaengine_pcm_ops.
It is difficult to switch at this point, since Renesas
driver is also supporting PIO transfer.
This patch uses dmaengine_prep_dma_cyclic() instead
of dmaengine_prep_slave_single().
It is used in requested method,
and is good first step to switch over.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28 14:41:18 +01:00
Kuninori Morimoto d403e24908 ASoC: fsi: add fsi_pointer_update() for common pointer method
fsi PIO/DMA handler are using each own pointer update method,
but these can be share.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28 14:41:18 +01:00
Kuninori Morimoto ffb83e8cb1 ASoC: fsi: use SNDRV_DMA_TYPE_DEV for sound buffer
Current fsi driver is using SNDRV_DMA_TYPE_CONTINUOUS
for snd_pcm_lib_preallocate_pages_for_all().
But, it came from original dma-sh7760.c,
and no longer needed.
This patch exchange its parameter, and removed
original dma mapping and un-needed
dma_sync_single_xxx() from driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28 14:41:18 +01:00
Lars-Peter Clausen 9f98cd69c1 ASoC: sh/fsi: Make one-bit bitfields unsigned
One-bit signed bitfields have two possible values: 0 and -1. This sometimes
leads to unexpected results (e.g. foo.bar = 1; foo.bar == 1 => false) which is
why it is recommended to make one-bit bitfields unsigned.

This fixes the following sparse warnings:
	sound/soc/sh/fsi.c:267:25: error: dubious one-bit signed bitfield
	sound/soc/sh/fsi.c:268:22: error: dubious one-bit signed bitfield
	sound/soc/sh/fsi.c:269:20: error: dubious one-bit signed bitfield
	sound/soc/sh/fsi.c:270:28: error: dubious one-bit signed bitfield
	sound/soc/sh/fsi.c:271:26: error: dubious one-bit signed bitfield
	sound/soc/sh/fsi.c:272:25: error: dubious one-bit signed bitfield

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 21:02:08 +01:00
Kuninori Morimoto c7a507eea1 ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags
SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode.
Then, FSI will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.

This patch fixup platform settings too.
Then, it tidyups SND_SOC_DAIFMT_INV settings.

Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-14 19:30:59 +00:00
Mark Brown 701caa51a2 Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/atmel', 'asoc/topic/bcm2835', 'asoc/topic/docs', 'asoc/topic/fsl', 'asoc/topic/generic', 'asoc/topic/kirkwood', 'asoc/topic/mc13783', 'asoc/topic/mxs', 'asoc/topic/nuc900', 'asoc/topic/sai', 'asoc/topic/sh', 'asoc/topic/ssm2602', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl4030', 'asoc/topic/ux500', 'asoc/topic/width' and 'asoc/topic/x86' into for-tiwai 2014-01-16 12:44:01 +00:00
Lars-Peter Clausen a7ddf151b0 ASoC: sh: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:29:44 +00:00
Kuninori Morimoto a073278228 ASoC: fsi: remove original filter from fsi_dma_probe()
Remove original filter from fsi_dma_probe(),
and use SH-DMA suitable filter.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-11 11:07:56 +00:00
Kuninori Morimoto 53110a256a ASoC: fsi: reserve prefetch period on DMA transferring
Current FSI is supporting DMAEngine transfer,
but, it needs to use work queue.
Therefore, DMA transfer settings might be late if there is heavy task.
This patch reserves next period beforehand on DMA transfer function.
Android sound will be breaking up without this patch.

Tested-by: Tomohito Esaki <etom@igel.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-26 13:02:36 +01:00
Kuninori Morimoto c375b2d7ef ASoC: fsi: fixup sparse errors
This patch fixup below sparse errors

${LINUX}/sound/soc/sh/fsi.c:1459:9: \
	error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:1634:25: \
	error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:1639:17: \
	error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:2093:9: \
	error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:2105:9: \
	error: incompatible types in conditional expression (different base types)

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 15:35:46 +01:00
Mark Brown 48539f73cb Merge remote-tracking branch 'asoc/topic/fsi' into asoc-next 2013-04-12 13:57:05 +01:00
Kuninori Morimoto da4f2f9e6b ASoC: fsi: use snd_soc_register_component() instead of snd_soc_register_dais()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-15 01:24:57 +00:00
Kuninori Morimoto 9c33728983 ASoC: fsi: remove unused irq
FSI is using devm_request_irq() from
1ddd82868c
(ASoC: fsi: use devm_request_irq())

master->irq is no longer needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-13 10:40:05 +00:00
Thierry Reding e43fc6af25 ASoC: fsi: Remove __devinitconst
__devinitconst and friends have recently been removed and must not be
used anymore.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 20:28:59 +09:00
Kuninori Morimoto 9e7b6d60d8 ASoC: fsi: add device tree support
Support for loading the Renesas FSI driver via devicetree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 08:27:18 +09:00
Kuninori Morimoto fd974e52db ASoC: fsi: don't use platform info pointer on probe()
Current FSI driver is using platform info pointer,
but it is not good design for DT support.
This patch made it not to use platform info pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-03 12:49:54 +00:00
Kuninori Morimoto abca75814a ASoC: fsi: remove SH_FSI_xxx_INV flags
3449f5fab8
(ASoC: fsi: add SND_SOC_DAIFMT_INV_xxx support)
added clock inversion support via snd_soc_dai_set_fmt().
Thus, this patch removed SH_FSI_xxx_INV and fsi_get_info()
from fsi driver, and modified platform settings to use new style.
Then, it cleaned up meaningless settings from platform.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:57:09 +00:00
Kuninori Morimoto 6cbdbffba1 ASoC: fsi: remove platform depended .set_rate() callback support
ab6f6d8521
(ASoC: fsi: add master clock control functions)
added driver level clock control functions.
And now, platform depended .set_rate() is no longer needed.
This patch removed unnecessary .set_rate() platform callback support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:56:55 +00:00
Mark Brown 546694bc42 Merge remote-tracking branch 'asoc/topic/fsi' into asoc-next 2012-12-02 13:35:04 +09:00
Kuninori Morimoto 3449f5fab8 ASoC: fsi: add SND_SOC_DAIFMT_INV_xxx support
Current FSI driver is using platform information pointer,
but it is not good design for DT support.
This patch adds SND_SOC_DAIFMT_INV_xxx support,
and it is possible to independent from platform information pointer.

Old type SH_FSI_xxx_INV is still supported,
but it will be removed soon.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20 15:11:21 +09:00
Kuninori Morimoto 2522acd28a ASoC: fsi: stream mode become independent from platform flags
Current FSI driver is using platform information pointer,
but it is not good design for DT support.
This patch makes stream mode format
independent from platform information pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20 15:11:21 +09:00
Kuninori Morimoto ab6340c4ec ASoC: fsi: master clock selection become independent from platform flags
Current FSI driver is using platform information pointer,
but it is not good design for DT support.
This patch makes master clock selection
independent from platform information pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20 15:11:21 +09:00
Kuninori Morimoto c2052def9e ASoC: fsi: SPDIF format become independent from platform flags
Current FSI driver is using platform information pointer,
but it is not good design for DT support.
This patch makes spdif format
independent from platform information pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20 15:11:21 +09:00
Kuninori Morimoto 943fdadc17 ASoC: fsi: tidyup sh_fsi_platform_info pointer
Current FSI driver is requesting sh_fsi_platform_info pointer from platform,
and it didn't allowed NULL pointer.
This patch fixes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20 15:11:21 +09:00
Kuninori Morimoto 40f9118bd1 ASoC: fsi: tidyup FSIA/B settings
This patch tidyup to use fsi pointer for FSIA/B settings

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20 15:11:21 +09:00
Kuninori Morimoto ab6f6d8521 ASoC: fsi: add master clock control functions
Current FSI driver required set_rate() platform callback function
to set audio clock if it was master mode,
because it seemed that CPG/FSI-DIV clocks calculation depend on
platform/board/cpu.
But it was calculable regardless of platform.
This patch supports audio clock calculation method,
but the sampling rate under 32kHz is not supported at this point.
Old type set_rate() is still supported now,
but it will be deleted on next version

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-06 09:54:42 +01:00
Kuninori Morimoto 80b4addc9c ASoC: fsi: care fsi_hw_start/stop() return value
Current FSI driver didn't care fsi_hw_start/stop() return value,
and it causes WARNING() call if SNDRV_PCM_TRIGGER_START failed.
This patch solved this issue

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-01 14:47:51 +00:00
Kuninori Morimoto ddeb2d701b ASoC: fsi: fsi_set_master_clk() was called from fsi_hw_xxx() only
Current FSI driver is using fsi_set_master_clk() if it needs system clock.
But this function was called from
fsi_hw_shutdown()/fsi_dai_trigger()/fsi_resume() without a sense of unity.
Because of this, sound playback after suspend failed sometimes.
To keep consistency, fsi_master_clk() was called from
fsi_hw_start/stop() only now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-29 18:46:39 +00:00
Kuninori Morimoto 1ddd82868c ASoC: fsi: use devm_request_irq()
This patch uses devm_request_irq() instead of request_irq()
and removed free_irq() from driver

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-15 11:25:55 +09:00
Kuninori Morimoto 2a8c8a569f ASoC: fsi: fixup channels_min/max
FSI can support 1 - 8 channel input/output,
but current driver is supporting 2 channel format only.
This patch fixes channel mismatch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-15 11:25:54 +09:00
Guennadi Liakhovetski 57451e4377 ASoC: fsi: don't reschedule DMA from an atomic context
shdma doesn't support transfer re-scheduling or triggering from callbacks
or from atomic context. The fsi driver issues DMA transfers from a tasklet
context, which is a bug. To fix it convert tasklet to a work.

Reported-by: Do Q.Thang <dq-thang@jinso.co.jp>
Tested-by: Do Q.Thang <dq-thang@jinso.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-10-09 15:47:33 +09:00
Kuninori Morimoto 6ac4262f36 ASoC: fsi: convert to devm_xxx()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-10 17:27:05 +08:00
Kuninori Morimoto dbd4e51cd1 ASoC: fsi: tidyup: remove un-necessary operation from fsi_probe()
struct fsi_master *master became member of struct fsi_priv from
71f6e0645b
(ASoC: sh_fsi: avoid using global variable)

So, master = NULL is not necessary on fsi_probe() now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-10 17:27:05 +08:00
Kuninori Morimoto c35e005f31 ASoC: fsi: fixup pm_runtime_disable() timing on fsi_probe()
pm_runtime_disable() error handling timing on fsi_probe() was wrong.
This patch fixes it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-10 17:27:04 +08:00
Linus Torvalds c511dc1fb6 Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine update from Vinod Koul:
 "This time we have a new dmaengine driver from the tegra folks.  Also
  we have Guennadi's cleanup of sh drivers which incudes a library for
  sh drivers.  And the usual odd fixes in bunch of drivers and some nice
  cleanup of dw_dmac from Andy."

Fix up conflicts in drivers/mmc/host/sh_mmcif.c

* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (46 commits)
  dmaengine: Cleanup logging messages
  mmc: sh_mmcif: switch to the new DMA channel allocation and configuration
  dma: sh: provide a migration path for slave drivers to stop using .private
  dma: sh: use an integer slave ID to improve API compatibility
  dmaengine: shdma: prepare to stop using struct dma_chan::private
  sh: remove unused DMA device pointer from SIU platform data
  ASoC: siu: don't use DMA device for channel filtering
  dmaengine: shdma: (cosmetic) simplify a static function
  dmaengine: at_hdmac: add a few const qualifiers
  dw_dmac: use 'u32' for LLI structure members, not dma_addr_t
  dw_dmac: mark dwc_dump_lli inline
  dma: mxs-dma: Export missing symbols from mxs-dma.c
  dma: shdma: convert to the shdma base library
  ASoC: fsi: prepare for conversion to the shdma base library
  usb: renesas_usbhs: prepare for conversion to the shdma base library
  ASoC: siu: prepare for conversion to the shdma base library
  serial: sh-sci: prepare for conversion to the shdma base library
  mmc: sh_mobile_sdhi: prepare for conversion to the shdma base library
  mmc: sh_mmcif: remove unneeded struct sh_mmcif_dma, prepare to shdma conversion
  dma: shdma: prepare for conversion to the shdma base library
  ...
2012-07-24 17:12:54 -07:00
Guennadi Liakhovetski b8373147ed ASoC: fsi: prepare for conversion to the shdma base library
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-07-13 09:13:08 +05:30
Kuninori Morimoto b1226dc59d ASoC: fsi: use PIO handler if DMA handler was invalid
PIO handler is not good performance, but works on all platform.
So, switch to PIO handler if DMA handler was invalid case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03 13:06:39 +01:00
Kuninori Morimoto 5514efdfe0 ASoC: fsi: use dmaengine helper functions
This patch used dmaengine helper functions instead of using hand setting.
And reduced local variables

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03 13:06:39 +01:00
Kuninori Morimoto fbe42f66c6 ASoC: fsi: bugfix: ensure dma is terminated
FSI DMAEngine has to be stopped certainly at the start/stop time.
Without this patch, it will include noise on playback.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-30 11:04:12 +01:00
Kuninori Morimoto 4a1b09b79b ASoC: fsi: bugfix: correct dma area
FSI driver is using dma_sync_single_xxx(),
but the dma area was not correct.
This patch fix it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-30 11:04:12 +01:00
Kuninori Morimoto e42bb9bfbb ASoC: fsi: bugfix: enable master clock control on DMA stream
DMA stream handler didn't care about master clock.
This patch fixes it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-30 10:39:51 +01:00
Kuninori Morimoto 766812e6d5 ASoC: sh: fsi: enable chip specific data transfer mode
SupherH FSI2 can use special data transfer,
but it depends on CPU-FSI2 connection style.

We can use 16bit data stream mode if it was valid connection,
and it is required for 16bit data DMA transfer / SPDIF sound output.
We can use 24bit data transfer if it was invalid connection.

We can select connection type if CPU is SH7372,
and it is always valid connection if latest SuperH.

This patch adds new bus_option and fsi_bus_setup()
for supporting these feature.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-19 19:41:45 +01:00
Kuninori Morimoto f33238e96f ASoC: sh: fsi: call fsi_hw_startup/shutdown from fsi_dai_trigger()
fsi_hw_startup/shutdown() needs the setup of bus width,
but it is impossible to get parameter of snd_pcm_runtime at this timing.
So, these functions are changed so that be called from fsi_dai_trigger().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-19 19:41:09 +01:00
Kuninori Morimoto 9c59dd342e ASoC: sh: fsi: use same format for IN/OUT
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-19 19:41:08 +01:00
Kuninori Morimoto 284c6f6547 ASoC: sh: fsi: add fsi_version() and removed meaningless version check
This patch adds fsi_version() function for accessing version.

And there were some meaningless version check which never hit.
This patch removed it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-19 19:41:08 +01:00