summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_ssi.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: fsl_ssi: mark SACNT register volatileMaciej S. Szmigiero2020-05-101-1/+7
| | | | | | | | | | | | | | | | | commit 3f1c241f0f5f90046258e6b8d4aeb6463ffdc08e upstream. SACNT register should be marked volatile since its WR and RD bits are cleared by SSI after completing the relevant operation. This unbreaks AC'97 register access. Fixes: 05cf237972fe ("ASoC: fsl_ssi: Add driver suspend and resume to support MEGA Fast") Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt()Takashi Iwai2019-10-051-1/+4
| | | | | | | | | | | | | | | | | | commit 2757970f6d0d0a112247600b23d38c0c728ceeb3 upstream. The node obtained from of_find_node_by_path() has to be unreferenced after the use, but we forgot it for the root node. Fixes: f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support") Cc: Timur Tabi <timur@kernel.org> Cc: Nicolin Chen <nicoleotsuka@gmail.com> Cc: Xiubo Li <Xiubo.Lee@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ASoC: fsl_ssi: AC'97 ops need regmap, clock and cleaning up on failureMaciej S. Szmigiero2018-01-021-6/+12
| | | | | | | | | | | | | | | commit 695b78b548d8a26288f041e907ff17758df9e1d5 upstream. AC'97 ops (register read / write) need SSI regmap and clock, so they have to be set after them. We also need to set these ops back to NULL if we fail the probe. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
*-. Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es8328', ↵Mark Brown2015-10-261-0/+102
|\ \ | | | | | | | | | 'asoc/topic/fsl' and 'asoc/topic/fsl-card' into asoc-next
| | * ASoC: fsl_ssi: Add driver suspend and resume to support MEGA FastZidan Wang2015-10-051-0/+102
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, SSI needs to save all the values of registers before the system suspend and restore them after the system resume. The register SFCSR is volatile, but some bits in it need to be recovered after suspend/resume. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: fsl_ssi: Fix checking of dai format for AC97 modeAdam Thomson2015-09-191-2/+3
|/ | | | | | | | | | | | Current code incorrectly treats dai format for AC97 as bit mask whereas it's actually an integer value. This causes DAI formats other than AC97 (e.g. DSP_B) to trigger AC97 related code, which is incorrect and breaks functionality. This patch fixes the code to correctly compare values to determine AC97 or not. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/fsl-ssi', ↵Mark Brown2015-08-301-5/+57
|\ \ | | | | | | | | | 'asoc/topic/gtm601', 'asoc/topic/ics43432' and 'asoc/topic/ids' into asoc-next
| | * ASoC: fsl_ssi: adjust set DAI format in AC'97 modeMaciej S. Szmigiero2015-08-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Adjust set DAI format function in fsl_ssi driver so it doesn't fail and clears RXDIR in AC'97 mode. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_ssi: instantiate AC'97 CODECMaciej S. Szmigiero2015-08-141-0/+21
| | | | | | | | | | | | | | | | | | | | | Instantiate AC'97 CODEC in fsl_ssi driver AC'97 mode. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_ssi: add AC'97 ops setting check and cleanupMaciej S. Szmigiero2015-08-141-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Check whether setting AC'97 ops succeeded and clean them on removal so the fsl_ssi driver can be reloaded. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_ssi: enable AC'97 asymmetric ratesMaciej S. Szmigiero2015-08-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | AC'97 bus can support asymmetric playback/capture rates so enable them in this case in fsl_ssi driver. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_ssi: AC'97 DAI driver needs probe method tooMaciej S. Szmigiero2015-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | AC'97 DAI driver struct need the same probe method as I2S one to setup DMA params in fsl_ssi driver. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_ssi: enable IPG clock during AC'97 reg accessMaciej S. Szmigiero2015-08-141-0/+19
| |/ | | | | | | | | | | | | | | IPG clock have to be enabled during AC'97 CODEC register access in fsl_ssi driver. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/topic/fsi', 'asoc/topic/fsl', ↵Mark Brown2015-08-301-3/+3
|\ \ \ | | |/ | |/| | | | 'asoc/topic/fsl-asrc', 'asoc/topic/fsl-card' and 'asoc/topic/fsl-sai' into asoc-next
| | * ASoC: fsl: fix typos for sound/soc/fsl/*Xiubo Li2015-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | There are too much noise about the typos for fsl's drivers. So I fix all the typos here in this patch in almost every file I touched. Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl: Add dedicated DMA buffer size for each cpu daiShengjiu Wang2015-07-071-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | As the ssi is not the only cpu dai, there are esai, spdif, sai. and imx_pcm_dma can be used by all of them. Especially ESAI need a larger DMA buffer size. So Add dedicated DMA buffer for each cpu dai. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: fsl-ssi: Fix bitclock calculation for master modeJuergen Borleis2015-07-071-1/+1
|/ | | | | | | | | | | | | According to the datasheet 'pm', 'psr' and 'div2' should never be all 0. Since commit 541b03ad6cfe ("ASoC: fsl_ssi: Fix the incorrect limitation of the bit clock rate") this can happen, because for some bitclock rates 'pm' = 0 seems to be a valid choice but does not work due to hardware restrictions. This results into a bad hardware behaviour (slow audio for example). Feature tested on a i.MX25. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-sai', ↵Mark Brown2015-06-051-7/+0
|\ \ | | | | | | | | | 'asoc/topic/fsl-spdif', 'asoc/topic/fsl-ssi' and 'asoc/topic/gpio-jack' into asoc-next
| | * ASoC: fsl_ssi: No need call of_device_is_available()Fabio Estevam2015-05-081-7/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | The comment and the call to of_device_is_available() are not really needed. It is the expected behaviour to probe only the ssi nodes that are enabled in the device tree. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: fsl_ssi: Fix platform_get_irq() error handlingFabio Estevam2015-04-171-1/+1
|/ | | | | | | | We should check whether platform_get_irq() returns a negative number and propagate the error in this case. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/dmaengine', 'asoc/topic/fsi', ↵Mark Brown2015-04-121-22/+10
|\ \ | | | | | | | | | 'asoc/topic/fsl' and 'asoc/topic/fsl-ssi' into asoc-next
| | * ASoC: fsl_ssi: Use devm_ioremap_resource()Fabio Estevam2015-04-101-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | Using platform_get_resource() and devm_ioremap_resource() can make the code a bit simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_ssi: Use devm_snd_soc_register_component()Fabio Estevam2015-04-101-8/+4
| |/ | | | | | | | | | | | | | | | | Using devm_snd_soc_register_component() can make the code shorter and cleaner. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/fix/ak4671', 'asoc/fix/control', ↵Mark Brown2015-03-161-2/+2
|\ \ \ | | |/ | |/| | | | 'asoc/fix/da732x', 'asoc/fix/fsl-ssi', 'asoc/fix/lock' and 'asoc/fix/rt286' into asoc-linus
| | * ASoC: fsl_ssi: Don't try to round-up for PM divisor calculationNicolin Chen2015-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to i.MX6 Series Reference Manual, the formula to calculate the sys clock is sysclk rate = bclk rate * (div2 + 1) * (7 * psr + 1) * (pm + 1) * 2 Commit aafa85e71a75 ("ASoC: fsl_ssi: Add DAI master mode support for SSI on i.MX series") added the divisor calculation which relies on the clk_round_rate(). However, at that time, clk_round_rate() didn't provide closest clock rates for some cases because it might not use a correct rounding policy. So using the original formula (pm + 1) for PM divisor was not able to give us a desired clock rate. And then we used (pm + 2) to do the trick. However, the clk-divider driver has been refined a lot since commit b11d282dbea2 ("clk: divider: fix rate calculation for fractional rates") Now using (pm + 2) trick would result an incorrect clock rate. So this patch fixes the problem by removing the useless trick. Reported-by: Stephane Cerveau <scerveau@voxtok.com> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * fsl_ssi: fix of_property_read_u32_array return value checkMaciej S. Szmigiero2015-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | of_property_read_u32_array returns 0 on success, so the return value shouldn't be inverted twice, first on assignment then in condition expression. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge remote-tracking branch 'asoc/fix/fsl-ssi' into asoc-linusMark Brown2015-03-041-4/+7
|\ \ \ | |/ / |/| / | |/
| * ASoC: fsl_ssi: Fix the incorrect limitation of the bit clock rateNicolin Chen2015-02-111-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to i.MX Reference Manual, the bit-clock frequency generated by SSI must be never greater than 1/5 of the peripheral clock frequency. This peripheral clock, however, is not baudclk but the IPG clock (i.e. ssi_private->clk in the fsl_ssi driver). So this patch just simply fixes the incorrect limitation applied to the bit clock (baudclk) rate. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/topic/tdm-slot', 'asoc/topic/tegra', ↵Mark Brown2015-02-041-2/+2
|\ \ \ | | | | | | | | | | | | 'asoc/topic/tlv320aic3x', 'asoc/topic/ts3a227e' and 'asoc/topic/ts3a277e' into asoc-next
| * | | ASoC: fsl: Update set_tdm_slot() semanticsLars-Peter Clausen2015-01-141-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fsl-ssi and imx-ssi drivers use inverted semantics for the tx_mask and rx_mask parameter of the set_tdm_slot() callback compared to rest of ASoC. This patch updates the driver's semantics to be consistent with the rest of ASoC, i.e. a set bit means a active slot and a cleared bit means a inactive slot. This will allow us to use the set_tdm_slot() API in a more generic way. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/imx', ↵Mark Brown2015-02-041-1/+1
|\ \ \ \ | | |/ / | |/| | | | | | 'asoc/topic/intel', 'asoc/topic/mxs-saif' and 'asoc/topic/nuc900' into asoc-next
| | * | ASoC: fsl_ssi: Change irq type to 'int'Fabio Estevam2015-01-141-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Since commit 2ffa531078037a0 ("ASoC: fsl_ssi: Fix module unbound") the irq number is retrieved via platform_get_irq(), which may fail and return a negative number, so adapt its type to 'int'. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge remote-tracking branch 'asoc/fix/fsl-ssi' into asoc-fslMark Brown2015-01-081-1/+1
|\ \ \ | | |/ | |/| | | | | | | Conflicts: sound/soc/fsl/fsl_ssi.c
| * | ASoC: fsl_ssi: Fix irq error checkFabio Estevam2015-01-081-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | Commit 2ffa531078037a0 ("ASoC: fsl_ssi: Fix module unbound") changed the way to retrieve the irq number from irq_of_parse_and_map() to platform_get_irq(), but missed to updated the irq error check accordingly. We should test for negative irq number and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: fsl_ssi: Make error message conciseFabio Estevam2015-01-081-1/+1
|/ | | | | | | | | | | | | | | Currently the error message uses 'np->full_name' which leads to a very verbose log as: fsl-ssi-dai 202c000.ssi: no irq for node /soc/aips-bus@02000000/spba-bus@02000000/ssi@0202c000 We can have a concise log by using pdev->name instead: fsl-ssi-dai 202c000.ssi: no irq for node 202c000.ssi Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.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: fsl: 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/fsl', 'asoc/topic/fsl-card', ↵Mark Brown2014-12-081-12/+3
|\ \ \ | | |/ | |/| | | | 'asoc/topic/fsl-dt' and 'asoc/topic/fsl-ssi' into asoc-next
| | * ASoC: fsl_ssi: fix error path in probeJiada Wang2014-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSI component isn't unregistered if fsl_ssi_debugfs_create() fails in probe phase. To fix it, this commit replaces label error_asoc_register with error_irq. Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_ssi: Fix module unboundFabio Estevam2014-12-041-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to remove the snd-soc-fsl-ssi module leads to the following warning: [ 31.515336] ------------[ cut here ]------------ [ 31.520091] WARNING: CPU: 2 PID: 434 at fs/proc/generic.c:521 remove_proc_entry+0x14c/0x16c() [ 31.528708] remove_proc_entry: removing non-empty directory 'irq/79', leaking at least '202c000.ss' [ 31.537911] Modules linked in: snd_soc_wm8962 snd_soc_imx_wm8962 snd_soc_fsl_ssi(-) evbug [ 31.546249] CPU: 2 PID: 434 Comm: rmmod Not tainted 3.18.0-rc6-00028-g3314bf6-dirty #1 [ 31.554235] Backtrace: [ 31.556816] [<80011ea8>] (dump_backtrace) from [<80012044>] (show_stack+0x18/0x1c) [ 31.564416] r6:80142c88 r5:00000000 r4:00000000 r3:00000000 [ 31.570267] [<8001202c>] (show_stack) from [<806980ec>] (dump_stack+0x88/0xa4) [ 31.577588] [<80698064>] (dump_stack) from [<80029d78>] (warn_slowpath_common+0x70/0x94) [ 31.585711] r5:00000009 r4:bb61fd90 [ 31.589423] [<80029d08>] (warn_slowpath_common) from [<80029e40>] (warn_slowpath_fmt+0x38/0x40) [ 31.598187] r8:bb61fdfe r7:be05d76d r6:be05d9a8 r5:00000002 r4:be05d700 [ 31.605054] [<80029e0c>] (warn_slowpath_fmt) from [<80142c88>] (remove_proc_entry+0x14c/0x16c) [ 31.613709] r3:806a79c0 r2:808229a0 [ 31.617371] [<80142b3c>] (remove_proc_entry) from [<80070380>] (unregister_irq_proc+0x94/0xb8) [ 31.625989] r10:00000000 r8:8000ede4 r7:80955f2c r6:0000004f r5:8118e738 r4:be00af00 [ 31.633952] [<800702ec>] (unregister_irq_proc) from [<80069dac>] (free_desc+0x2c/0x64) [ 31.641898] r6:0000004f r5:80955f38 r4:be00af00 [ 31.646604] [<80069d80>] (free_desc) from [<80069e68>] (irq_free_descs+0x4c/0x8c) [ 31.654092] r7:00000081 r6:00000001 r5:0000004f r4:00000001 [ 31.659863] [<80069e1c>] (irq_free_descs) from [<8006fc3c>] (irq_dispose_mapping+0x40/0x5c) [ 31.668247] r6:be17b844 r5:be17b800 r4:0000004f r3:802c5ec0 [ 31.673998] [<8006fbfc>] (irq_dispose_mapping) from [<7f004ea4>] (fsl_ssi_remove+0x58/0x70 [snd_so) [ 31.683948] r4:bb5bba10 r3:00000001 [ 31.687618] [<7f004e4c>] (fsl_ssi_remove [snd_soc_fsl_ssi]) from [<803720a0>] (platform_drv_remove) [ 31.697564] r5:7f0064f8 r4:be17b810 [ 31.701195] [<80372080>] (platform_drv_remove) from [<80370494>] (__device_release_driver+0x78/0xc) [ 31.710361] r5:7f0064f8 r4:be17b810 [ 31.713987] [<8037041c>] (__device_release_driver) from [<80370d20>] (driver_detach+0xbc/0xc0) [ 31.722631] r5:7f0064f8 r4:be17b810 [ 31.726259] [<80370c64>] (driver_detach) from [<80370304>] (bus_remove_driver+0x54/0x98) [ 31.734382] r6:00000800 r5:00000000 r4:7f0064f8 r3:bb67f500 [ 31.740149] [<803702b0>] (bus_remove_driver) from [<80371398>] (driver_unregister+0x30/0x50) [ 31.748617] r4:7f0064f8 r3:bd9f7080 [ 31.752245] [<80371368>] (driver_unregister) from [<80371f3c>] (platform_driver_unregister+0x14/0x) [ 31.761498] r4:7f00655c r3:7f005a70 [ 31.765130] [<80371f28>] (platform_driver_unregister) from [<7f005a84>] (fsl_ssi_driver_exit+0x14/) [ 31.776147] [<7f005a70>] (fsl_ssi_driver_exit [snd_soc_fsl_ssi]) from [<8008ed80>] (SyS_delete_mod) [ 31.786553] [<8008ec64>] (SyS_delete_module) from [<8000ec20>] (ret_fast_syscall+0x0/0x48) [ 31.794824] r6:00c46d18 r5:00000800 r4:00c46d18 [ 31.799530] ---[ end trace 954e8a3a15379e52 ]--- The cause of problem and solution are well explained by Lars-Peter: "The driver creates the mapping by calling irq_of_parse_and_map(), so it also has to dispose the mapping. But the easy way out is to simply use platform_get_irq() instead of irq_of_parse_map(). In this case the mapping is not managed by the device but by the of core, so the device has not to dispose the mapping." Tested on a imx6q-sabresd board. Reported-by: Jiada Wang <jiada_wang@mentor.com> Suggested-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_ssi: Remove comment about SSI running only in slave modeFabio Estevam2014-11-171-2/+0
| |/ | | | | | | | | | | | | | | Current driver can also run in I2S master mode, so remove the old comment. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: Rename snd_soc_dai_driver struct ac97_control field to bus_controlLars-Peter Clausen2014-11-181-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
*-. Merge remote-tracking branches 'asoc/topic/fsl-easi', 'asoc/topic/fsl-sai', ↵Mark Brown2014-10-061-16/+73
|\ \ | | | | | | | | | 'asoc/topic/fsl-ssi' and 'asoc/topic/intel' into asoc-next
| | * ASoC: fsl_ssi: Remove unneeded 'i2s-slave' propertyFabio Estevam2014-09-301-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to use 'i2s-slave' property, since master/slave configuration are passed via machine layer. This change does not break existing users because they do check for slave mode inside sound/soc/fsl/mpc8610_hpcd.c/p1022_ds.c/p1022_rdk.c Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl_ssi: refine ipg clock usage in this moduleShengjiu Wang2014-09-171-8/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if ipg clock is in clock-names property, then we can move the ipg clock enable and disable operation to startup and shutdown, that is only enable ipg clock when ssi is working and keep clock is disabled when ssi is in idle. But when the checking is failed, remain the clock control as before. Tested-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: fsl-ssi: Support for SND_SOC_DAIFMT_CBM_CFSFabio Falzoi2014-08-071-5/+28
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Add SND_SOC_DAIFMT_CBM_CFS support for Freescale architecture. Successfully tested on i.MX 6Quad Wandboard and UDOO boards connected to the pcm1792a codec. In CBM_CFS mode, when using a sample size of 16 bits, we cannot use CCSR_SSI_SCR_I2S_MODE_MASTER since we get a frame sync every 16 bits. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com> Tested-by: Angelo Adamo <adamo.a60@gmail.com> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* / ASoC: fsl_ssi: fix kernel panic in probe functionMichael Trimarchi2014-09-221-5/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | code can raise a panic when the ssi_private->pdev is null [...] /* * If codec-handle property is missing from SSI node, we assume * that the machine driver uses new binding which does not require * SSI driver to trigger machine driver's probe. */ if (!of_get_property(np, "codec-handle", NULL)) goto done; [...] ssi_private->pdev = platform_device_register_data(&pdev->dev, name, 0, NULL, 0); [...] done: if (ssi_private->dai_fmt) _fsl_ssi_set_dai_fmt(ssi_private, ssi_private->dai_fmt); Proposal was to not use ssi_private->pdev->dev here but adding a new parameter of *dev pointer to this _set_dai_fmt() -- passing pdev->dev in probe() and cpu_dai->dev in fsl_ssi_set_dai_fmt(). Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reported-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-asrc', ↵Mark Brown2014-08-041-0/+2
|\ \ | | | | | | | | | 'asoc/topic/fsl-spdif' and 'asoc/topic/imx-audmux' into asoc-next
| * | ASoC: fsl_ssi: Add stream names for DPCM usageNicolin Chen2014-07-311-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | DPCM needs extra dapm routes in the machine driver to route audio between Front-End and Back-End. In order to differ the stream names in the route map from CODECs, we here add specific stream names to SSI driver so that we can implement ASRC via DPCM to it. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* / ASoC: fsl-ssi: fix do_div build warning in fsl_ssi_set_bclk()Timur Tabi2014-06-171-2/+2
|/ | | | | | | | | | | | | | | | do_div() requires that the first parameter is a 64-bit integer, which but clkrate was defined as an unsigned long. This caused the following warnings: CC sound/soc/fsl/fsl_ssi.o sound/soc/fsl/fsl_ssi.c: In function 'fsl_ssi_set_bclk': sound/soc/fsl/fsl_ssi.c:593:3: warning: comparison of distinct pointer types lacks a cast sound/soc/fsl/fsl_ssi.c:593:3: warning: right shift count >= width of type sound/soc/fsl/fsl_ssi.c:593:3: warning: passing argument 1 of '__div64_32' from incompatible pointer type include/asm-generic/div64.h:35:17: note: expected 'uint64_t *' but argument is of type 'long unsigned int *' Signed-off-by: Timur Tabi <timur@tabi.org> Signed-off-by: Mark Brown <broonie@linaro.org>