summaryrefslogtreecommitdiff
path: root/sound/soc/sh
AgeCommit message (Collapse)Author
2015-02-04Merge remote-tracking branches 'asoc/topic/rx51', 'asoc/topic/samsung', ↵Mark Brown
'asoc/topic/sh', 'asoc/topic/simple' and 'asoc/topic/sta32x' into asoc-next
2015-02-04Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/pxa' and ↵Mark Brown
'asoc/topic/rcar' into asoc-next
2015-02-04Merge remote-tracking branches 'asoc/topic/doc', 'asoc/topic/dwc', ↵Mark Brown
'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/fsl-asrc' into asoc-next
2015-02-02ASoC: rsnd: call missing snd_soc_unregiter_component/platform()Kuninori Morimoto
Current Renesas R-Car sound driver doesn't call snd_soc_unregiter_component/platform() in .remove. This patch call these functions. Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp> Reported-by: Bui Duc Phuc <bd-phuc@jinso.co.jp> Reported-by: Cao Minh Hiep <cm-hiep@jinso.co.jp> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02ASoC: rsnd: call missing snd_ctl_remove()Kuninori Morimoto
Current Renesas R-Car sound driver is using snd_ctl_xxx() functions, but it didn't call snd_ctl free_one() / snd_ctl_remove(). This patch call these functions. Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp> Reported-by: Bui Duc Phuc <bd-phuc@jinso.co.jp> Reported-by: Cao Minh Hiep <cm-hiep@jinso.co.jp> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: tidyup DVC/SRC/SSI orderKuninori Morimoto
Current R-Car sound driver calls SRC -> SSI -> DVC functions, but, it should be DVC -> SRC -> SSI. Otherwise, SSI (= interface of codec) will have underrun error when playback. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: tidyup DMA start/stop timing on SSIKuninori Morimoto
Current DMA starts after SSI, and stops before SSI. but we need to reverse these order. Otherwise, under/over run error might happen. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: ignore DIRQ when DMA transferKuninori Morimoto
SSI interrupt handler of R-Car sound driver will be called when DIRQ (= Data read/write timing for PIO) or UIRQ / OIRQ (= under/over run error). DIRQ "interrupt" doesn't occur when DMA transfer, but then, DIRQ "status bit" might occur. we need to ignore this DIRQ operation when DMA. Otherwise, driver will push/pop as PIO. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: error meesage indicates its portKuninori Morimoto
Current SRC/SSI output its error, but it desn't indicate port number. it is un-understandable. Let's indicate port number for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: save priv in struct rsnd_daiKuninori Morimoto
Current rsnd driver has rsnd_mod_to_priv() macro, and struct rsnd_mod has struct rsnd_priv pointer. But, it is waste of memory from data structure point of view. Today we can link mod <-> io <-> rdai each other, so saving priv in rdai is very reasonable. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: replace rdai to priv in each functionKuninori Morimoto
Current rsnd driver's function requests rdai, but it is not used. Adding priv is more reasonable. Let's replace it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: remove unsed rdai parameter from each functionKuninori Morimoto
Current rsnd driver's many functions requests struct rsnd_dai (= rdai), but, 1) we can get rdai from rsnd_io_to_rsnd(), 2) almost all rdai is not used. Let's remove these rdai. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: replace rsnd_dai_is_play() to rsnd_io_is_play()Kuninori Morimoto
Current rsnd driver can use rsnd_io_to_rdai() we can get play/capture direction via io now. Let's replace rsnd_dai_is_play() to rsnd_io_is_play() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: add rsnd_io_to_rdai()Kuninori Morimoto
Current rsnd driver request rdai in everywhere, but each mod should reach to rdai by itself. this patch adds missing rsnd_io_to_rdai(). io = rsnd_mod_to_io(mod); rdai = rsnd_io_to_rdai(io); Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: remove rsnd_dai_get_platform_info() macroKuninori Morimoto
rsnd_dai_get_platform_info() is not used. Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: remove unused rsnd_dai_id()Kuninori Morimoto
rsnd_dai_id() was not used. Let's remove it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: rename rsnd_dai_is_clk_master() to rsnd_rdai_is_clk_master()Kuninori Morimoto
struct rsnd_dai is called as "rdai", and struct snd_soc_dai is called as "dai" on this driver. but macro/function have confusable naming. This patch rename rsnd_dai_is_clk_master() to rsnd_rdai_is_clk_master() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: rename rsnd_dai_get() to rsnd_rdai_get()Kuninori Morimoto
struct rsnd_dai is called as "rdai", and struct snd_soc_dai is called as "dai" on this driver. but macro/function have confusable naming. This patch rename rsnd_dai_get() to rsnd_rdai_get() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: rsnd_mod controls clockKuninori Morimoto
Current rsnd driver's mod (= ssi/src/dvc) have each own clk, but, these are needed to start/stop each mod. This patch adds struct clk in rsnd_mod, and start/stop these via rsnd_mod_hw_start/stop() macro Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: tidyup rsnd_io_to_xxx() macro declaration positionKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15ASoC: rsnd: remove unsed .rateKuninori Morimoto
rsnd_ssi::rate is not used. Let's remove it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-12ASoC: rsnd: add recovery support for under/over flow error on SRCKuninori Morimoto
L/R channel will be switched if under/over flow error happen on Renesas R-Car sound device by the HW bugs. Then, HW restart is required for salvage. This patch add salvage support for SRC. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-06ASoC: migor: Use static DAI format setupLars-Peter Clausen
Set the dai_fmt field in the dai_link struct instead of manually calling snd_soc_dai_fmt(). This makes the code cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-05ASoC: sh: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()Lars-Peter Clausen
The ALSA core takes care that all preallocated memory is freed when the PCM itself is freed. There is no need to do this manually in the driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-05ASoC: rcar: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()Lars-Peter Clausen
The ALSA core takes care that all preallocated memory is freed when the PCM itself is freed. There is no need to do this manually in the driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-05ASoC: fsi: Deletion of unnecessary checks before the function call "clk_enable"Markus Elfring
The clk_enable() 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-15Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-08Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/rockchip', ↵Mark Brown
'asoc/topic/rt286' and 'asoc/topic/rt5631' into asoc-next
2014-12-08Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/doc', ↵Mark Brown
'asoc/topic/dpcm', 'asoc/topic/dwc' and 'asoc/topic/fsi' into asoc-next
2014-12-08Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ad193x', ↵Mark Brown
'asoc/topic/adau1373' and 'asoc/topic/adau17x1' into asoc-next
2014-12-07ASoC: rsnd: rename SSI function name of PIOKuninori Morimoto
Current R-Car sound SSI PIO/DMA mode are using interrupt. it is no longer "xxx_pio_xxx", rename it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-07ASoC: rsnd: add salvage support for under/over flow error on SSIKuninori Morimoto
L/R channel will be switched if under/over flow error happen on Renesas R-Car sound device by the HW bugs. Then, HW restart is required for salvage. This patch add salvage support for SSI. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: remove un-necessary parameter from rsnd_src_start/stop()Kuninori Morimoto
rsnd_src_start/stop() requests struct rsnd_dai as parameter. but, it is not used, and become more complex in L/R error handling. Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: share SSI starting method between PIO/DMA modeKuninori Morimoto
Basically, SSI starting method is same between PIO/DMA mode. Let's share it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: set SRC_ROUTE_MODE0 on each rsnd_src_set_convert_rate()Kuninori Morimoto
Current src.c sets SRC_ROUTE_MODE0 on rsnd_src_start(), but, set it in rsnd_src_set_convert_rate() is natural. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: initialize SRC on rsnd_src_init()Kuninori Morimoto
Current src initialize SRC on rsnd_src_set_convert_rate() but, it should be done on rsnd_src_init(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: use rsnd_src_convert_rate() once on rsnd_src_set_convert_rate_gen2()Kuninori Morimoto
using many rsnd_src_convert_rate() is not readable. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: tidyup rsnd_io_to_runtime() macroKuninori Morimoto
Avoid NULL pointer access Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: move snd_kcontrol_new fucntions to core.cKuninori Morimoto
Current DVC is using snd_kcontrol_new functions, but, SRC will need same method. Move common functions to core.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: show master clock rate when ADG probeKuninori Morimoto
master clock rate is useful information for debug. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: synchronize SSI start/stop sequence between PIO/DMA modeKuninori Morimoto
Current SSI start/stop sequence is different between PIO/DMA mode, but, almost all are same. this patch synchronize it. It will be shared in the future. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: clear status register when HW startKuninori Morimoto
Let's clear SSI status when HW start Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: care SSIWSR register in rsnd_ssi_hw_start()Kuninori Morimoto
Current SSI is careing SSIWSR which controls WS continue mode when DMA mode, but, it should be cared when PIO mode too. This patch fixup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: tidyup SSI interrupt enable/disable methodKuninori Morimoto
Current SSI doesn't care interrupt "disable" method. And, it is used when PIO mode only at this point. SSI interrupt will be used for sound R/L issue workaround when DMA mode too. This patch tidyup SSI interrupt enable/disable method. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: tidyup PIO/DMA mode settings methodKuninori Morimoto
Current ssi.c has .cr_etc which is used for SSICR's etc settings. but, it is used as PIO/DMA switching purpose now. This patch tidyup this method. This is prepare for under/over run issue handling Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: rsnd_src_ssiu_stop() stops SSIU compulsorilyKuninori Morimoto
rsnd_src_ssiu_stop() is used to stop SSIU, but it shouldn't depend on whether it is using SSIU. This patch stops SSIU compulsorily. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: add callback status check methodKuninori Morimoto
R-Car sound can use SSI/SRC/DVC modules, and these are controlled as rsnd_mod in rsnd driver. These rsnd_mod has each own function as callback. Basically these callback function has pair like probe/remove, start/stop, etc. And, these functions are called by order to each stage like below. 1. src->probe 2. ssi->probe 3. dvc->probe 4. src->start 5. ssi->start 6. dvc->start 7. src->stop 8. ssi->stop 9. dvc->stop 10. src->remove 11. ssi->remove 12. dvc->remove But, current rsnd driver doesn't care about its status which indicates which function is called. For example, if 5) returns error, 6) is not called. In such case, 9) should not be called. This patch care about each modules status. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: rsnd: add .fallback callbackKuninori Morimoto
Current R-Car sound has PIO fallback support if it couldn't use DMA. This fallback is done in .remove callback, but, it should have .fallback callback. Otherwise, normal .remove callback will have strange behavior. This patch adds .fallback callback. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03ASoC: fsi: Deletion of unnecessary checks before the function call "clk_disable"Markus Elfring
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-11-18ASoC: Rename snd_soc_dai_driver struct ac97_control field to bus_controlLars-Peter Clausen
Setting the ac97_control field on a CPU DAI tells the ASoC core that this DAI in addition to audio data also transports control data to the CODEC. This causes the core to suspend the DAI after the CODEC and resume it before the CODEC so communication to the CODEC is still possible. This is not necessarily something that is specific to AC'97 and can be used by other buses with the same requirement. This patch renames the flag from ac97_control to bus_control to make this explicit. While we are at it also change the type from int to bool. The following semantich patch was used for automatic conversion of the drivers: // <smpl> @@ identifier drv; @@ struct snd_soc_dai_driver drv = { - .ac97_control + .bus_control = - 1 + true }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>