summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/bxt_rt298.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: intel: bxt_rt298: Replace GFP_ATOMIC with GFP_KERNEL in ↵Jia-Ju Bai2018-04-161-1/+1
| | | | | | | | | | | | | | | | | | broxton_audio_probe broxton_audio_probe() is never called in atomic context. This function is only set as ".probe" in "struct platform_driver". Despite never getting called from atomic context, broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC, which waits busily for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, to avoid busy waiting and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: board: Add BE DAI link for WoV and update DAPM machine map.Pawse, GuruprasadX2018-03-011-0/+15
| | | | | | | | Create BE DAI link for WoV and accordingly update the DAPM machine map Signed-off-by: Pawse, GuruprasadX <guruprasadx.pawse@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: hdac_hdmi/nau8825/rt286/rt298/rt5663/da7219: replace codec to componentKuninori Morimoto2018-02-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we can replace Codec to Component. Let's do it. Because intal/rockchip boards are using multi-codecs in 1 driver, we need to update these all related drivers in same time. Otherwise compile error/warning happen Note: hdac_hdmi xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 nau8825 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt286 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt298 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt5663 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 da7219 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: board: Fix missing sentinel for bxt_board_idPradeep Tewani2017-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without a sentinel in the array of platform devices, we can get a panic so add a sentinel. Full stack dump below: [ 231.564705] BUG: KASAN: global-out-of-bounds in platform_match+0xb0/0x146 [ 231.565500] Read of size 1 at addr ffffffff8380a1a0 by task swapper/0/1 [ 231.566280] [ 231.566594] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-00289-g152771f #1 [ 231.567526] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 231.568730] Call Trace: [ 231.569128] dump_stack+0xf8/0x14a [ 231.569615] print_address_description+0x57/0x1e4 [ 231.570216] ? driver_probe_device+0x814/0x814 [ 231.570798] kasan_report+0x1cb/0x1eb [ 231.571302] ? platform_match+0xb0/0x146 [ 231.571833] __asan_load1+0x45/0x47 [ 231.572324] platform_match+0xb0/0x146 [ 231.572843] ? platform_uevent+0x73/0x73 [ 231.573370] __driver_attach+0x47/0x16a [ 231.573890] bus_for_each_dev+0x11a/0x15c [ 231.574422] ? bus_remove_file+0x57/0x57 [ 231.574951] ? do_raw_spin_unlock+0xc3/0xe0 [ 231.575501] driver_attach+0x2b/0x2e [ 231.576002] bus_add_driver+0x25e/0x3c5 [ 231.576520] ? set_debug_rodata+0x20/0x20 [ 231.584776] driver_register+0x13e/0x19d [ 231.585305] __platform_driver_register+0x6c/0x71 [ 231.585908] ? skl_driver_init+0x20/0x20 [ 231.586436] broxton_audio_init+0x17/0x19 [ 231.586976] do_one_initcall+0x11a/0x221 [ 231.587499] ? start_kernel+0x525/0x525 [ 231.588020] ? lock_downgrade+0x281/0x2ec [ 231.588557] ? trace_hardirqs_on_caller+0x223/0x267 [ 231.589169] ? _raw_spin_unlock_irqrestore+0x49/0x55 [ 231.589791] ? set_debug_rodata+0x20/0x20 [ 231.590324] kernel_init_freeable+0x1fd/0x2b0 [ 231.590891] ? rest_init+0x17c/0x17c [ 231.591384] kernel_init+0x11/0x157 [ 231.591876] ? rest_init+0x17c/0x17c [ 231.592371] ret_from_fork+0x2a/0x40 [ 231.592865] [ 231.593166] The buggy address belongs to the variable: [ 231.593806] bxt_board_ids+0x40/0x9e0 Fixes: 152771fbc3 ("ASoC: Intel: board: Add Geminilake platform support") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: board: Add Geminilake platform supportPradeep Tewani2017-07-201-3/+81
| | | | | | | | | Geminilake also features rt298 codec, so use the same machine driver as Broxton. Geminilake uses SSP2 instead of SSP5. Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: board: Remove .owner initialization in bxt_rt298 driverPradeep Tewani2017-07-201-1/+0
| | | | | | | | | The .owner field is not required to be initialized in the driver. So, remove it. Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: intel: bxt: Constify hw_constraintsTakashi Iwai2017-06-141-6/+6
| | | | | | | | | snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Boards: Add 4-channel DMIC fixup.Dharageswari R2017-06-061-5/+2
| | | | | | | | | | This patch adds a 4-channel dmic fixup so that DMIC copier will receive 4 channel data and further selection will be done by mic-select module. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Skylake: Add 16-bit constraint to FE bxt_rt298 machineG Kranthi2017-03-291-0/+3
| | | | | | | | | | Add constraint to FE to restrict sample format to 16-bit for bxt_rt298 machine Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: bxt: Add jack port initialize in bxt_rt298 machineJeeja KP2017-02-171-1/+6
| | | | | | | | | After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_rt298 machineJeeja KP2017-02-161-2/+17
| | | | | | | | | Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize jack in bxt_rt298.c machine Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: bxt: Add route change to rt298 machineJeeja KP2017-02-081-3/+3
| | | | | | | | To support MST moved pin to port, this changes the routes based on port. So change the route in bxt_rt298 machine. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: bxt: add channel map support in rt298 machineJeeja KP2017-02-041-2/+50
| | | | | | | | | | | | HDMI registers channel map controls per pcm. As PCMs are not registered during dai_link init callback, store the pcm ids and codec DAIs during this init callback. Register for late probe and call the jack_init API which registers channel map in the late probe callback handler. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: constify snd_soc_ops structuresJulia Lawall2016-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for snd_soc_ops structures that are only stored in the ops field of a snd_soc_dai_link structure. This field is declared const, so snd_soc_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_soc_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_dai_link e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i, e; position p; @@ struct snd_soc_dai_link e[] = { ..., { .ops = &i@p, }, ..., }; @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_soc_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_soc_ops i = { ... }; // </smpl> The effect on the layout of the .o files is shown by the following output of the size command, first before then after the transformation: text data bss dec hex filename 4500 696 0 5196 144c sound/soc/generic/simple-card.o 4564 632 0 5196 144c sound/soc/generic/simple-card.o text data bss dec hex filename 3018 608 0 3626 e2a sound/soc/generic/simple-scu-card.o 3074 544 0 3618 e22 sound/soc/generic/simple-scu-card.o text data bss dec hex filename 4148 2448 768 7364 1cc4 sound/soc/intel/boards/bdw-rt5677.o 4212 2384 768 7364 1cc4 sound/soc/intel/boards/bdw-rt5677.o text data bss dec hex filename 5403 4628 384 10415 28af sound/soc/intel/boards/bxt_da7219_max98357a.o 5531 4516 384 10431 28bf sound/soc/intel/boards/bxt_da7219_max98357a.o text data bss dec hex filename 5275 4496 384 10155 27ab sound/soc/intel/boards/bxt_rt298.o 5403 4368 384 10155 27ab sound/soc/intel/boards/bxt_rt298.o text data bss dec hex filename 10017 2344 48 12409 3079 sound/soc/intel/boards/bytcr_rt5640.o 10145 2232 48 12425 3089 sound/soc/intel/boards/bytcr_rt5640.o text data bss dec hex filename 3719 2356 0 6075 17bb sound/soc/intel/boards/bytcr_rt5651.o 3847 2244 0 6091 17cb sound/soc/intel/boards/bytcr_rt5651.o text data bss dec hex filename 3598 2392 0 5990 1766 sound/soc/intel/boards/cht_bsw_max98090_ti.o 3726 2280 0 6006 1776 sound/soc/intel/boards/cht_bsw_max98090_ti.o text data bss dec hex filename 5343 3624 16 8983 2317 sound/soc/intel/boards/cht_bsw_rt5645.o 5471 3496 16 8983 2317 sound/soc/intel/boards/cht_bsw_rt5645.o text data bss dec hex filename 4662 2592 384 7638 1dd6 sound/soc/intel/boards/cht_bsw_rt5672.o 4790 2464 384 7638 1dd6 sound/soc/intel/boards/cht_bsw_rt5672.o text data bss dec hex filename 1595 2528 0 4123 101b sound/soc/intel/boards/haswell.o 1659 2472 0 4131 1023 sound/soc/intel/boards/haswell.o text data bss dec hex filename 6272 4760 416 11448 2cb8 sound/soc/intel/boards/skl_nau88l25_max98357a.o 6464 4568 416 11448 2cb8 sound/soc/intel/boards/skl_nau88l25_max98357a.o text data bss dec hex filename 7075 4888 416 12379 305b sound/soc/intel/boards/skl_nau88l25_ssm4567.o 7267 4696 416 12379 305b sound/soc/intel/boards/skl_nau88l25_ssm4567.o text data bss dec hex filename 5659 4496 384 10539 292b sound/soc/intel/boards/skl_rt286.o 5787 4368 384 10539 292b sound/soc/intel/boards/skl_rt286.o text data bss dec hex filename 1721 2048 0 3769 eb9 sound/soc/kirkwood/armada-370-db.o 1769 1976 0 3745 ea1 sound/soc/kirkwood/armada-370-db.o text data bss dec hex filename 1363 1792 0 3155 c53 sound/soc/mxs/mxs-sgtl5000.o 1427 1728 0 3155 c53 sound/soc/mxs/mxs-sgtl5000.o Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sst-bxt-rt298: fix obsoleted initializers for arrayTakashi Sakamoto2016-09-271-7/+7
| | | | | | | | | | | | | | | | | | | Sparse reports below warnings. bxt_rt298.c:275:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:290:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:304:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:317:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:331:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:344:9: warning: obsolete array initializer, use C99 syntax bxt_rt298.c:357:9: warning: obsolete array initializer, use C99 syntax There's no need to use obsoleted way. This commit fixes it. Fixes: 76016322ec56 (ASoC: Intel: Add Broxton-P machine driver) Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Skylake: Add pm ops for broxton-rt298 machineVinod Koul2016-06-221-0/+1
| | | | | Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Revert "ASoC: Intel: Add support for PM ops in bxt-rt298"Vinod Koul2016-06-221-23/+0
| | | | | | | | | This reverts commit 3513798ca4bc ("ASoC: Intel: Add support for PM ops in bxt-rt298") as the right way to fix this is to disable async suspend Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Add support for PM ops in bxt-rt298Jeeja KP2016-06-141-0/+23
| | | | | | | | | | We need card to be early suspended and late resumed, so use prepare and complete for card suspend and resume. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Update ignore suspend for bxt-rt298Senthilnathan Veppur2016-06-141-0/+15
| | | | | | | | | Capture from DMIC requires that we ignore the suspend, so mark these as ignore_suspend in bxt-rt298 machine. Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Add FE rate & channel constraints for bxt-rt298Senthilnathan Veppur2016-06-141-0/+36
| | | | | | | | | We support stereo 48Khz audio, so add these as constraints for this card Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Add DMIC 4 channel support for bxt machineSenthilnathan Veppur2016-06-141-0/+66
| | | | | | | | | | | Like Skylake, we can support 4 channel for DMIC, so add hw_params and constraints in the bxt-rt298 machine While at it, also add codec1 pipe for speaker playback. Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: fix up for DAI link's be_id changeStephen Rothwell2016-05-111-5/+5
| | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Add Broxton-P machine driverRamesh Babu2016-05-101-0/+353
This patch adds the Broxton-P machine driver for Intel Broxton-P reference boards. This machine uses the RT298 codec Signed-off-by: Ramesh Babu <ramesh.babu@intel.com> Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>