summaryrefslogtreecommitdiffstats
path: root/sound/soc/rockchip
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/topic/rcar' and 'asoc/topic/rockchip' ↵Mark Brown2016-01-111-2/+7
|\ \ | | | | | | | | | into asoc-next
| | * ASoC: rockchip: i2s: Add SNDRV_PCM_FMTBIT_S32_LE supportMichael Trimarchi2016-01-101-2/+7
| | | | | | | | | | | | | | | Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
*---. \ \ Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/qcom', ↵Mark Brown2015-12-233-60/+82
|\ \ \ \ \ | | |_|/ / | |/| | / | | | |/ 'asoc/topic/rcar', 'asoc/topic/rk3036' and 'asoc/topic/rockchip' into asoc-next
| | | * ASoC: rockchip: i2s: remove unused variablesJohn Keeping2015-12-091-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous commit removed the only use of these variables. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * ASoC: rockchip: i2s: separate capture and playbackJohn Keeping2015-12-091-40/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we only clear the tx/rx state when both are disabled it is not possible to start/stop one multiple times while the other is running. Since the two are independently controlled, treat them as such and remove the false dependency between capture and playback. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * ASoC: rockchip: i2s: compatible with different chipsSugar Zhang2015-11-161-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there maybe more than one i2s module inside chip, and these i2s modules have different channels features. for example: there are 3 i2s in rk3066, one support 8 channels playback and 2 channels capture, but the others only support 2 channels playback and 2 channels capture. in order to compatible with these various chips, we add playback and capture property to specify these values. there are default channels configuration in driver: 8 channels playback and 2 channels capture. if not add property, we use the default values. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * ASoC: rockchip-rt5645: Allow more sample ratesCaesar Wang2015-11-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RT5645 audio codec support sample rates from 8 to 96 kHz as the dai claim. Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * ASoC: rockchip-max98090: Allow more sample ratesCaesar Wang2015-11-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MAX98090 audio codec support sample rates from 8 to 96 kHz as the dai claim. Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * ASoC: rockchip: i2s: change bclk and lrck according to sample ratesCaesar Wang2015-11-161-0/+23
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch sets the dividers autonomously. when i2s works on master mode, and sample rates changed. We need to change bclk and lrck at the same time for cpu internal side. As the input source clock to the module is MCLK_I2S, and by the divider of the module, the clock generator generates SCLK and LRCK to transmitter and receiver. Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/es8328', ↵Mark Brown2015-12-232-3/+5
|\ \ \ \ | | |/ / | |/| | | | | | 'asoc/fix/fsl-sai', 'asoc/fix/rockchip', 'asoc/fix/sgtl5000' and 'asoc/fix/wm8974' into asoc-linus
| | * | ASoC: rockchip: spdif: Set transmit data level to 16 samplesSjoerd Simons2015-12-122-3/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly set the transmit data level on the transceiver to 16 samples rather then the default 0. This matches both the level set in the vendor kernel and the (seemingly very similar) i2s engine. This fixes audio glitches when playing back at 192k rate. At the same time, fix a trivial typo in the TDL mask definition Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rockchip: Fix incorrect VDW value for 24 bitSjoerd Simons2015-11-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct valid data word register value for 24 bit data width. The bit value should be 10 (aka 0x2), not 0x10. This fixes playback of 24 bit audio. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: fix rockchip 64-bit build warningArnd Bergmann2015-11-161-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rk_spdif_probe uses the device match data as a token to identify a particular device, but accidentally casts a pointer to 'int', which is not portable, as gcc points out in this warning on arm64: rockchip_spdif.c: In function 'rk_spdif_probe': rockchip_spdif.c:283:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] This changes the logic to compare two pointer values instead, using the same cast that was used for initializing the value in the first place. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: i2s: share tx/rx lrck when symmetric_rates enabledSugar Zhang2015-10-232-0/+14
| | | | | | | | | | | | | | share lrck_tx to lrck_rx when symmetric_rates enabled. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: i2s: add 8 channels capture supportSugar Zhang2015-10-232-2/+48
| | | | | | | | | | | | | | | | | | support max 8 channels capture, please add property 'rockchip,capture-channels' in dts to enable this, if not, support 2 channels capture default. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: spdif: Convert to use devm_snd_dmaengine_pcm_registerAxel Lin2015-10-191-6/+2
| | | | | | | | | | | | | | | | Use resource managed API then we can remove snd_dmaengine_pcm_unregister() and snd_soc_unregister_component() calls in .probe error path and .remove. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: Add rockchip SPDIF transceiver driverSjoerd Simons2015-10-084-0/+482
| | | | | | | | | | | | | | | | Add a driver for the SPDIF transceiver available on RK3066, RK3188 and RK3288. Heavily based on the rockchip i2s driver. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: namespace rockchip i2s module nameSjoerd Simons2015-10-061-2/+2
| | | | | | | | | | | | | | | | Change the rockchip i2s object name (and thus module name) from the rather generic snd-soc-i2s to the more specific snd-soc-rockchip-i2s Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: Fix missing CLKDEV_LOOKUP dependencyAxel Lin2015-09-191-2/+2
|/ | | | | | | | | | | | Make SND_SOC_ROCKCHIP_MAX98090 and SND_SOC_ROCKCHIP_RT5645 depend on CLKDEV_LOOKUP to fix below build warning: warning: (SND_SOC_ROCKCHIP_MAX98090 && SND_SOC_ROCKCHIP_RT5645) selects SND_SOC_ROCKCHIP_I2S which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && CLKDEV_LOOKUP && SND_SOC_ROCKCHIP) Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', ↵Mark Brown2015-08-302-3/+1
|\ \ | | | | | | | | | 'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next
| | * ASoC: rockchip: fix platform_no_drv_owner.cocci warningskbuild test robot2015-08-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sound/soc/rockchip/rockchip_rt5645.c:214:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rockchip: fix platform_no_drv_owner.cocci warningskbuild test robot2015-08-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sound/soc/rockchip/rockchip_max98090.c:225:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rockchip: fix a misjudgement by returnXing Zheng2015-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Being careless, judge the return value of snd_soc_card_jack_new is opposite, so it should be fixed. Signed-off-by: Xing Zheng <zhengxing@rock-chips.com> Reviewed-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: Set missing card owner fieldAxel Lin2015-08-212-0/+2
| |/ |/| | | | | | | | | | | | | Set the card owner field to prevent the module from being removed from underneath its users. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: i2s: Adjust devm usageVaishali Thakkar2015-08-191-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove use of snd_soc_unregister_component in remove function as devm_snd_soc_register_component in probe function automatically handles it. Also, convert call of snd_dmaengine_pcm_register to managed resource function devm_snd_dmaengine_pcm_register and remove usage of snd_dmaengine_pcm_unregister in probe and remove functions. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: Add machine driver for rt5645/rt5650 codeczhengxing2015-07-203-0/+236
| | | | | | | | | | | | | | | | The driver is used for rockchip board using a rt5645/rt5650. Reviewed-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: zhengxing <zhengxing@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: Add machine driver for max98090 codeczhengxing2015-07-203-0/+250
|/ | | | | | | | The driver is used for rockchip board using a max98090. Reviewed-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: zhengxing <zhengxing@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'for-linus' into for-nextTakashi Iwai2015-01-261-0/+1
|\ | | | | | | | | Sync with the latest 3.19-rc state for applying other ALSA sequencer core fixes.
| *-. Merge remote-tracking branches 'asoc/fix/adi', 'asoc/fix/compress', ↵Mark Brown2015-01-261-0/+1
| |\ \ | | | | | | | | | | | | 'asoc/fix/fsl-ssi', 'asoc/fix/imx', 'asoc/fix/intel', 'asoc/fix/omap', 'asoc/fix/rockchip' and 'asoc/fix/rt286' into asoc-linus
| | | * ASoC: rockchip: i2s: applys rate symmetry for CPU DAIJianqun Xu2015-01-081-0/+1
| | |/ | | | | | | | | | | | | | | | | | | This patch applys rate symmetry for rockchip i2s DAI. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/rockchip', ↵Mark Brown2014-12-241-0/+4
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| 'asoc/topic/rt5670' and 'asoc/topic/rt5677' into asoc-next
| | * ASoC: rockchip: i2s: set TDL and RDL to 16 samplesJianqun Xu2014-12-241-0/+4
| |/ | | | | | | | | | | | | | | | | Set Transmit Data Level(TDL) and Receive Data Level(RDL) to 16 samples. Without this setting, the TDL is default to be 0x00 (means 0 sample), and the RDL is default to be 0x1f (means 32 samples). Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: i2s: fix maxburst of dma data to 4Jianqun Xu2014-12-241-2/+2
| | | | | | | | | | | | | | | | Since RK3288 DMAC's burst length only support max to 4, here set maxburst of playback and capture dma data to 4. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: i2s: fix error defination of transmit data levelJianqun Xu2014-12-241-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | According to description about "Transmit Data Level", This bit field controls the level at which a DMA request is made by the transmit logic. It is equal to the watermark level. That is, the dma_tx_req signal is generated when the number of valid data entries in the TXFIFO (TXFIFO0 if CSR=00 TXFIFO1 if CSR=01 TXFIFO2 if CSR=10 TXFIFO3 if CSR=11) is equal to or below this field value. Different to receive data level, transmit data level does not need to "-1". Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-141-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * ASoC: rockchip: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | | | | | | | | 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>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/rockchip', ↵Mark Brown2014-12-081-2/+7
|\ \ \ | | |/ | |/| | | | 'asoc/topic/rt286' and 'asoc/topic/rt5631' into asoc-next
| | * ASoC: rockchip: i2s: Fix Kconfig for I2S device driverAndreas Ruprecht2014-11-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, CONFIG_SND_SOC_ROCKCHIP_I2S could also be selected without having CONFIG_SND_SOC_ROCKCHIP enabled. As this makes no sense, a Kconfig dependency is added to CONFIG_SND_SOC_ROCKCHIP_I2S. This will make the item visible only if CONFIG_SND_SOC_ROCKCHIP is enabled. Additionally, as the code connected to CONFIG_SND_SOC_ROCKCHIP_I2S depends on CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM, the dependency is moved to reflect this more clearly. Signed-off-by: Andreas Ruprecht <rupran@einserver.de> Reported-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rockchip: i2s: add text after tristate for SND_SOC_ROCKCHIP_I2SJianqun2014-11-031-1/+6
| |/ | | | | | | | | | | | | | | For SND_SOC_ROCKCHIP_I2S, adding some text after the tristate to make this directly user selectable. Signed-off-by: Jianqun <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_rxctrlJianqun2014-10-291-1/+3
|/ | | | | | | | | We can get into an infinite loop if the I2S_CLR register fails to clear due to a missing break statement, so add that. Signed-off-by: Jianqun <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_txctrlSonny Rao2014-10-081-1/+3
| | | | | | | | We can get into an infinite loop if the I2S_CLR register fails to clear due to a missing break statement, so add that. Signed-off-by: Sonny Rao <sonnyrao@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/rockchip', ↵Mark Brown2014-10-063-13/+20
|\ \ | | | | | | | | | 'asoc/topic/rsnd' and 'asoc/topic/rt286' into asoc-next
| | * ASoC: rockchip-i2s: add dma data to snd_soc_daiJianqun2014-09-131-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | Add playback/capture dma data to snd_soc_dai. Test on RK3288 with max98090. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rockchip-i2s: fix rockchip i2s defination more reasonableJianqun2014-09-132-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix SND_ROCKCHIP_I2S to be more reasonable - SND_SOC_ROCKCHIP_I2S, SND_SOC_ROCKCHIP_I2S should select by audio driver, instead of SND_SOC_ROCKCHIP. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rockchip-i2s: enable "hclk" for rockchip I2S controllerJianqun2014-09-131-0/+5
| |/ | | | | | | | | | | | | | | | | | | As "hclk" is used for rockchip I2S controller, driver must to enable it in probe. Tested on RK3288 with max98090. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip-i2s: fix registers' property of rockchip i2s controllerJianqun2014-09-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Reference rockchip I2S controller TRM, modify some registers' property I2S_FIFOLR: read / write, but not volatile, not precious I2S_INTSR: read / write I2S_CLR: volatile, register value will be cleared by read Test on RK3288 with max98090. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip-i2s: fix master mode set bit errorJianqun2014-09-131-3/+4
|/ | | | | | | | Fix error format set to I2S master or slave mode. Test on RK3288 board with max98090. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: remove redundant dev_err call in rockchip_i2s_probe()Wei Yongjun2014-07-281-3/+1
| | | | | | | | | There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rockchip: fix duplicated argument to && or ||xujianqun2014-07-141-5/+5
| | | | | | | | | This resulted from an unfortunate copy/paste to similar DEFINE name. Detected automagically by kbuild. Signed-off-by: xujianqun <xjq@rock-chips.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rockchip: add missing module.h includexujianqun2014-07-111-0/+1
| | | | | | | | | | | Missing module.h in linux directory will cause compile error with randconfig, like as: sound/soc/rockchip/rockchip_i2s.c:526:20: error: expected declaration specifiers or ‘...’ before string constant MODULE_DESCRIPTION("ROCKCHIP IIS ASoC Interface"); Signed-off-by: xujianqun <xjq@rock-chips.com> Signed-off-by: Mark Brown <broonie@linaro.org>