summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl
AgeCommit message (Collapse)Author
2015-03-15Merge tag 'clk-fixes-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clock framework fixes from Michael Turquette: "The clk fixes for 4.0-rc4 comprise three themes. First are the usual driver fixes for new regressions since v3.19. Second are fixes to the common clock divider type caused by recent changes to how we round clock rates. This affects many clock drivers that use this common code. Finally there are fixes for drivers that improperly compared struct clk pointers (drivers must not deref these pointers). While some of these drivers have done this for a long time, this did not cause a problem until we started generating unique struct clk pointers for every consumer. A new function, clk_is_match was introduced to get these drivers working again and they are fixed up to no longer deref the pointers themselves" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: ASoC: kirkwood: fix struct clk pointer comparing ASoC: fsl_spdif: fix struct clk pointer comparing ARM: imx: fix struct clk pointer comparing clk: introduce clk_is_match clk: don't export static symbol clk: divider: fix calculation of initial best divider when rounding to closest clk: divider: fix selection of divider when rounding to closest clk: divider: fix calculation of maximal parent rate for a given divider clk: divider: return real rate instead of divider value clk: qcom: fix platform_no_drv_owner.cocci warnings clk: qcom: fix platform_no_drv_owner.cocci warnings clk: qcom: Add PLL4 vote clock clk: qcom: lcc-msm8960: Fix PLL rate detection clk: qcom: Fix slimbus n and m val offsets clk: ti: Fix FAPLL parent enable bit handling
2015-03-11ASoC: fsl_spdif: fix struct clk pointer comparingShawn Guo
Since commit 035a61c314eb ("clk: Make clk API return per-user struct clk instances"), clk API users can no longer check if two struct clk pointers are pointing to the same hardware clock, i.e. struct clk_hw, by simply comparing two pointers. That's because with the per-user clk change, a brand new struct clk is created whenever clients try to look up the clock by calling clk_get() or sister functions like clk_get_sys() and of_clk_get(). This changes the original behavior where the struct clk is only created for once when clock driver registers the clock to CCF in the first place. The net change here is before commit 035a61c314eb the struct clk pointer is unique for given hardware clock, while after the commit the pointers returned by clk lookup calls become different for the same hardware clock. That said, the struct clk pointer comparing in the code doesn't work any more. Call helper function clk_is_match() instead to fix the problem. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Michael Turquette <mturquette@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-03-04Merge remote-tracking branch 'asoc/fix/fsl-ssi' into asoc-linusMark Brown
2015-02-11ASoC: fsl_ssi: Fix the incorrect limitation of the bit clock rateNicolin Chen
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>
2015-02-04Merge remote-tracking branches 'asoc/topic/tdm-slot', 'asoc/topic/tegra', ↵Mark Brown
'asoc/topic/tlv320aic3x', 'asoc/topic/ts3a227e' and 'asoc/topic/ts3a277e' into asoc-next
2015-02-04Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/imx', ↵Mark Brown
'asoc/topic/intel', 'asoc/topic/mxs-saif' and 'asoc/topic/nuc900' 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-04Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/dai' and ↵Mark Brown
'asoc/topic/davinci' into asoc-next
2015-01-26Merge remote-tracking branches 'asoc/fix/adi', 'asoc/fix/compress', ↵Mark Brown
'asoc/fix/fsl-ssi', 'asoc/fix/imx', 'asoc/fix/intel', 'asoc/fix/omap', 'asoc/fix/rockchip' and 'asoc/fix/rt286' into asoc-linus
2015-01-14ASoC: fsl: Remove fsl_asoc_xlate_tdm_slot_mask()Lars-Peter Clausen
Now that the fsl DAI drivers uses the same semantics as the rest of a ASoC the custom fsl_asoc_xlate_tdm_slot_mask() callback can be removed as it is identical to the generic one. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14ASoC: fsl: Update set_tdm_slot() semanticsLars-Peter Clausen
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>
2015-01-14ASoC: mc13783: Update set_tdm_slot() semanticsLars-Peter Clausen
The mc13783 driver uses 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> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14ASoC: fsl: imx-spdif: Set the card owner fieldFabio Estevam
Set the card owner field to avoid getting a kernel crash when the imx-spdif is unloaded while the playback is active. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14ASoC: fsl_ssi: Change irq type to 'int'Fabio Estevam
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>
2015-01-14ASoC: fsl: imx-wm8962: Set the card owner fieldFabio Estevam
The following crash happens when trying to unload the snd_soc_imx_wm8962 module while playback is active: [ 208.666868] Unable to handle kernel paging request at virtc [ 208.674110] pgd = 80004000 [ 208.676867] [7f06541c] *pgd=4c334811, *pte=00000000, *ppte=00000000 [ 208.683211] Internal error: Oops: 80000007 [#1] SMP ARM [ 208.688445] Modules linked in: snd_soc_wm8962 snd_soc_fsl_ssi snd_soc_imx_audmux imx_pcm_fiq evbug] ... In order to avoid such problem, fill the card owner field as suggested by Lars-Peter Clausen: "But looking at the source it seems that this is a core feature of ALSA and at least for the card module itself it will do the ref-counting when a stream is started/stopped. And we even support setting the owner of a card in ASoC. It's just that pretty much no ASoC card driver bothers to set the owner field in the snd_soc_card struct. So this particular problem can be fixed by updating the imx-wm8962 driver to set the owner field." By doing as suggested, we no longer see the crash when attempting to unload the snd_soc_imx_wm8962 module while playback is active: $ modprobe -r snd_soc_imx_wm8962 modprobe: can't unload module snd_soc_imx_wm8962: Resource temporarily unavailable 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>
2015-01-08Merge remote-tracking branch 'asoc/fix/fsl-ssi' into asoc-fslMark Brown
Conflicts: sound/soc/fsl/fsl_ssi.c
2015-01-08ASoC: fsl_spdif: Make error message conciseFabio Estevam
Currently the error message uses 'np->full_name' which leads to a very verbose log that contains the full path of the node. We can have a concise log by using pdev->name instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-08ASoC: fsl_esai: Make error message conciseFabio Estevam
Currently the error message uses 'np->full_name' which leads to a very verbose log that contains the full path of the node. We can have a concise log by using pdev->name instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-08ASoC: fsl_sai: Make error message conciseFabio Estevam
Currently the error message uses 'np->full_name' which leads to a very verbose log that contains the full path of the node. We can have a concise log by using pdev->name instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-08ASoC: fsl_asrc: Make error message conciseFabio Estevam
Currently the error message uses 'np->full_name' which leads to a very verbose log that contains the full path of the node. We can have a concise log by using pdev->name instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-08ASoC: fsl_ssi: Make error message conciseFabio Estevam
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>
2015-01-08ASoC: fsl_ssi: Fix irq error checkFabio Estevam
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>
2015-01-06ASoC: wm1133-ev1: 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-06ASoC: mx27vis-aci32x4: 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-06ASoC: eureka-tlv320: 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>
2014-12-30ASoC: fsl_esai: Fix incorrect xDC field width of xCCR registersAurelien BOUIN
The xDC field should have 5 bit width according to Reference Manual. Thus this patch fixes it. Signed-off-by: Aurelien BOUIN <a_bouin@yahoo.fr> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2014-12-30ASoC: fsl_asrc: Use dev_name() for registering the irqFabio Estevam
The 'name' array is currently stored inside the fsl_asrc private structure only for registering the interrupt name. This can be simplified by registering it with dev_name() instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-30ASoC: fsl_spdif: Use dev_name() for registering the irqFabio Estevam
The 'name' array is currently stored inside the fsl_spdif_priv private structure only for registering the interrupt name. This can be simplified by registering it with dev_name() instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-18Merge tag 'pm+acpi-3.19-rc1-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI and power management updates from Rafael Wysocki: "These are regression fixes (leds-gpio, ACPI backlight driver, operating performance points library, ACPI device enumeration messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device PM), some cleanups in the operating performance points (OPP) framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of minor intel_pstate driver changes, a new MAINTAINERS entry for it and an ACPI fan driver change needed for better support of thermal management in user space. Specifics: - Fix a regression in leds-gpio introduced by a recent commit that inadvertently changed the name of one of the properties used by the driver (Fabio Estevam). - Fix a regression in the ACPI backlight driver introduced by a recent fix that missed one special case that had to be taken into account (Aaron Lu). - Drop the level of some new kernel messages from the ACPI core introduced by a recent commit to KERN_DEBUG which they should have used from the start and drop some other unuseful KERN_ERR messages printed by ACPI (Rafael J Wysocki). - Revert an incorrect commit modifying the cpupower tool (Prarit Bhargava). - Fix two regressions introduced by recent commits in the OPP library and clean up some existing minor issues in that code (Viresh Kumar). - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the tree (or drop it where that can be done) in order to make it possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf Hansson, Ludovic Desroches). There will be one more "CONFIG_PM_RUNTIME removal" batch after this one, because some new uses of it have been introduced during the current merge window, but that should be sufficient to finally get rid of it. - Make the ACPI EC driver more robust against race conditions related to GPE handler installation failures (Lv Zheng). - Prevent the ACPI device PM core code from attempting to disable GPEs that it has not enabled which confuses ACPICA and makes it report errors unnecessarily (Rafael J Wysocki). - Add a "force" command line switch to the intel_pstate driver to make it possible to override the blacklisting of some systems in that driver if needed (Ethan Zhao). - Improve intel_pstate code documentation and add a MAINTAINERS entry for it (Kristen Carlson Accardi). - Make the ACPI fan driver create cooling device interfaces witn names that reflect the IDs of the ACPI device objects they are associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B"). That's necessary for user space thermal management tools to be able to connect the fans with the parts of the system they are supposed to be cooling properly. From Srinivas Pandruvada" * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) MAINTAINERS: add entry for intel_pstate ACPI / video: update the skip case for acpi_video_device_in_dod() power / PM: Eliminate CONFIG_PM_RUNTIME NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM ACPI / EC: Fix unexpected ec_remove_handlers() invocations Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()" tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c PM: Remove the SET_PM_RUNTIME_PM_OPS() macro mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro PM / Kconfig: Replace PM_RUNTIME with PM in dependencies ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM ACPI / PM: Do not disable wakeup GPEs that have not been enabled ACPI / utils: Drop error messages from acpi_evaluate_reference() ...
2014-12-14Merge 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-13sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PMRafael J. Wysocki
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under sound/. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Mark Brown <broonie@kernel.org>
2014-12-08Merge tag 'asoc-v3.19' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v3.19 Lots and lots of changes this time around, the usual set of driver updates and a huge bulk of cleanups from Lars-Peter. Probably the most interesting thing for most users is the Intel driver updates which will (with some more machine integration work) enable support for newer x86 laptops. - Conversion of AC'97 drivers to use regmap, bringing us closer to the removal of the ASoC level I/O code. - Clean up a lot of old drivers that were open coding things that have subsequently been implemented in the core. - Some DAPM performance improvements. - Removal of the now seldom used CODEC mutex. - Lots of updates for the newer Intel SoC support, including support for the DSP and some Cherrytrail and Braswell machine drivers. - Support for Samsung boards using rt5631 as the CODEC. - Removal of the obsolete AFEB9260 machine driver. - Driver support for the TI TS3A227E headset driver used in some Chrombeooks.
2014-12-08Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-card', ↵Mark Brown
'asoc/topic/fsl-dt' and 'asoc/topic/fsl-ssi' 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-04ASoC: fsl_ssi: fix error path in probeJiada Wang
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>
2014-12-04ASoC: fsl_ssi: Fix module unboundFabio Estevam
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>
2014-11-25ASoC: fsl-asoc-card: Add slot_width setting for cpu-daiNicolin Chen
ESAI may need to use fixed slot width to comply with external CODEC. So this set_tdm_slot() call will allow the ESAI driver to override its default dynamic slot width policy. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-25ASoC: fsl_esai: Use dynamic slot width as defaultNicolin Chen
The driver previously used 32-bit fixed slot width as default. In result, ESAI might use 32-bit length to capture 16-bit width audio slot from CODEC side when ESAI is running as DAI slave. So this patch just removes the default slot_width so as to use dynamic slot width. If there comes a specific situation that needs a fixed width, the machine driver shall set slot_width via set_tdm_slot() so as to let the ESAI driver replace the dynamic width policy with the fixed value. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-20Merge branch 'for-linus' into test/usb-resumeTakashi Iwai
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>
2014-11-18ASoC: mpc5200_dma: Don't overwrite ac97 device private_dataLars-Peter Clausen
The mpc5200_dma overwrites the private_data field of the CODEC's AC'97 device with the DMA drivers private data, but never actually reads it again. Given that the private_data field is supposed to be owned by the AC'97 driver, overwriting it may cause undefined behavior. This patch removes the code that overwrites the field from the driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-18ASoC: mpc5200_psc_ac97: Remove unused on-stack snd_ac97 deviceLars-Peter Clausen
The mpc5200_psc_ac97 driver puts a snd_ac97 device on the stack in the driver probe function, initializes the private data member of the device and the never uses the device again. It should be safe to remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-17ASoC: fsl_ssi: Remove comment about SSI running only in slave modeFabio Estevam
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>
2014-11-17Merge remote-tracking branches 'asoc/fix/adsp', 'asoc/fix/cs41l51', ↵Mark Brown
'asoc/fix/dpcm', 'asoc/fix/es8328', 'asoc/fix/fsl-asrc', 'asoc/fix/max98090', 'asoc/fix/rcar', 'asoc/fix/rockchip' and 'asoc/fix/rt5645' into asoc-linus
2014-11-09ALSA: pcm: Add snd_pcm_stop_xrun() helperTakashi Iwai
Add a new helper function snd_pcm_stop_xrun() to the standard sequnce lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the existing open codes with this helper. The function checks the PCM running state to prevent setting the wrong state, too, for more safety. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-03Merge branch 'platform/remove_owner' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next Remove all .owner fields from platform drivers
2014-10-28ASoC: fsl-asoc-card: Don't bypass settings if cpu-dai is MasterNicolin Chen
When cpu-dai is the DAI Master (CBM_CFx), it may need some configurations, set_sysclk() call for eample, for cpu-dai side in the hw_params(), even if the set_bias_level() has already taken care of the codec-dai side. So this patch just simply adds an additional condition. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-28ASoC: fsl_asrc: Add reg_defaults for regmap to fix kernel dumpNicolin Chen
Kernel dump (WARN_ON) ocurred during system boot-up inside regmap_write(): ------------[ cut here ]------------ WARNING: CPU: 0 PID: 47 at kernel/locking/lockdep.c:2744 lockdep_trace_alloc+0xe8/0x108() DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) Modules linked in: CPU: 0 PID: 47 Comm: kworker/u2:2 Not tainted 3.18.0-rc1-10245-gb75d289-dirty #56 Workqueue: deferwq deferred_probe_work_func Backtrace: [<80012294>] (dump_backtrace) from [<80012578>] (show_stack+0x18/0x1c) r6:8097c73c r5:8097c73c r4:00000000 r3:be33ba80 [<80012560>] (show_stack) from [<806aac48>] (dump_stack+0x8c/0xa4) [<806aabbc>] (dump_stack) from [<8002a694>] (warn_slowpath_common+0x70/0x94) r6:80062838 r5:00000009 r4:bd827b30 r3:be33ba80 [<8002a624>] (warn_slowpath_common) from [<8002a6f0>] (warn_slowpath_fmt+0x38/0x40) r8:00000004 r7:00000001 r6:000080d0 r5:60000193 r4:bd826010 [<8002a6bc>] (warn_slowpath_fmt) from [<80062838>] (lockdep_trace_alloc+0xe8/0x108) r3:80831590 r2:8082e160 [<80062750>] (lockdep_trace_alloc) from [<800ea5dc>] (kmem_cache_alloc+0x28/0x134) r5:000080d0 r4:be001f00 [<800ea5b4>] (kmem_cache_alloc) from [<8038d72c>] (regcache_rbtree_write+0x15c/0x648) r10:00000000 r9:0000001c r8:00000004 r7:00000001 r6:00000000 r5:bd819a00 r4:00000000 r3:811aea88 [<8038d5d0>] (regcache_rbtree_write) from [<8038c4d8>] (regcache_write+0x5c/0x64) r10:be3f9f88 r9:00000000 r8:00000004 r7:00000001 r6:00000000 r5:00000001 r4:bd819a00 [<8038c47c>] (regcache_write) from [<8038b0dc>] (_regmap_raw_write+0x134/0x5f4) r6:be3f9f84 r5:00000001 r4:bd819a00 r3:00000001 [<8038afa8>] (_regmap_raw_write) from [<8038b610>] (_regmap_bus_raw_write+0x74/0x94) r10:00000000 r9:00000001 r8:be3fb080 r7:bd819a00 r6:00000001 r5:00000000 r4:bd819a00 [<8038b59c>] (_regmap_bus_raw_write) from [<8038a8b4>] (_regmap_write+0x60/0x9c) r6:00000001 r5:00000000 r4:bd819a00 r3:8038b59c [<8038a854>] (_regmap_write) from [<8038ba24>] (regmap_write+0x48/0x68) r7:bd81ad80 r6:00000001 r5:00000000 r4:bd819a00 [<8038b9dc>] (regmap_write) from [<80528f30>] (fsl_asrc_dai_probe+0x34/0x104) r6:bd888628 r5:be3fb080 r4:be3b4410 r3:be3b442c ------------[ dump end ]------------ ============================================================================= 2741 /* 2742 * Oi! Can't be having __GFP_FS allocations with IRQs disabled. 2743 */ 2744 if (DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))) 2745 return; ============================================================================= By looking at 2744 line, we can get that it's because regcache_rbtree_write() would call kmalloc() with GFP flag if it couldn't find an existing block to insert nodes while this kmalloc() call is inside a spin_lock_irq_save pair, i.e. IRQs disabled. Even though this may be a bug that should be fixed, I still try to send this patch as a quick fix (work around) since it does no harm to assign default values of every registers when using regcache. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22ASoC: fsl: use strncpy() to prevent copying of over-long namesDaniel Mack
Use strncpy() instead of strcpy(). That's not a security issue, as the source buffer is taken from DT nodes, but we should still enforce bound checks. Spotted by Coverity. Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20ASoC: fsl: drop owner assignment from platform_driversWolfram Sang
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>