aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-08-25ASoC: Intel: Skylake: Update module id in pin connectionsJeeja KP2-3/+39
Each module's id comes from the topology and gets updated in the driver. This patch updates the input and output pin connections of each module by matching the uuid for each module. Signed-off-by: Jeeja KP <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-25ASoC: Intel: Skylake: Parse and update module config structureRamesh Babu4-95/+334
A dsp path and the modules in the path can support various pcm configurations. The list of supported pcm configurations from topology manifest would be stored and later selected runtime based on the hw pcm params. For legacy, module data is filled in the 0th index of resource and interface table. To accommodate both models, change the relevant structures and populate them by parsing newly defined tokens. This change is backward compatible with the existing model where driver computes the resources required by each dsp module. Signed-off-by: Ramesh Babu <[email protected]> Signed-off-by: Shreyas NC <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-25ASoC: Intel: Skylake: Populate module data from topology manifestShreyas NC1-4/+316
All the module common data will now be populated in the topology manifest. This includes the resource and interface list supported by the module. With this, driver need not compute the resources required by each dsp module for a particular pcm parameter since it comes as a part of the topology manifest. So, add functions to parse the manifest tokens to populate the module config data structure. Signed-off-by: Shreyas NC <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-25ASoC: Intel: Skylake: Add driver structures to be filled from topology manifestShreyas NC2-0/+54
The topology manifest would include module common data including resource and interface table. The resource table consists of resources required by the dsp module such as buffer size, cycles per second, number of input/output pins. And, the interface table consists of pcm parameters per module which can be referenced later. So define the structures accordingly to represent topology manifest data in the driver. Signed-off-by: Shreyas NC <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-25ASoC: Intel: Skylake: Commonize parsing of format tokensShreyas NC1-21/+26
Format resource tokens can be a part of either the widget or manifest private data. In the current model, format resources come as a part of widget private data and they come as a part of topology manifest in the newly introduced model. So add a common function that can fill up either of the structures. Signed-off-by: Shreyas NC <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-25ASoC: Intel: uapi: Add new tokens for module common dataShreyas NC1-1/+91
The module private data can be modelled independent of its instances so that it can be reused by the module instances. So move module data to common manifest which can be referenced by the module instances. This requires new tokens to be defined to accommodate these changes. The new tokens will specify buffer sizes, DSP cycles and respective indexes corresponding to the pcm params in the topology manifest so that driver need not compute them. Signed-off-by: Shreyas NC <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-25ASoC: Intel: Skylake: Parse multiple manifest data blocksShreyas NC1-7/+5
Currently we can parse a single manifest data block. But manifest private data can have multiple data blocks. So, fix the parsing logic to parse multiple data blocks by returning offset of each parsed data block. Signed-off-by: Shreyas NC <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-23ASoC: Intel: Skylake: Fix uninitialized returnSubhransu S. Prusty1-1/+1
On failure to get dsp_ops, dsp_init returns error without assigning ret. ret is assigned in code path which will never be executed. Fix it. Fixes: f77d443c4c29 ("ASoC: Intel: Skylake: Fix to free resources for dsp_init failure" Reported-by: kbuild test robot <[email protected]> Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-23ASoC: Intel: Skylake: Fix DSP core ref count for init failureSubhransu S. Prusty1-2/+2
During dsp init failure, the ref count is not incremented and dsp is powered down. But as the skl driver calls put_core for the init failure it decrements the dsp core ref count and ref count becomes unbalanced. This results in dsp core powered up in further runtime suspend/resume cycles and never powered down. So increment the ref count before dsp core powerup and for any failure, decrement in put_core will be balanced. Signed-off-by: Subhransu S. Prusty <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-23ASoC: Intel: Skylake: Fix to free correct dev id in free_irqSubhransu S. Prusty1-1/+1
The dev_id passed by the driver in request_threaded_irq is an ebus pointer, whereas to free_irq it is hdac_bus. Fix by passing correct dev_id to free_irq. Signed-off-by: Subhransu S. Prusty <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-23ASoC: Intel: Skylake: Fix to free resources for dsp_init failureSubhransu S. Prusty1-7/+19
unmap mmio and free memory resources if dsp_init fails. Signed-off-by: Subhransu S. Prusty <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-23ASoC: Intel: Skylake: Fix to free dsp resource on ipc_init failureSubhransu S. Prusty3-3/+9
For some dsp init error path, irq and few more resources are not freed. This results in oops. So, fix it by freeing up the resources on ipc_init failure. Signed-off-by: Subhransu S. Prusty <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-22ASoC: Intel: Headset button support in kabylake machine driverHarsha Priya N1-0/+8
This patch adds headset button support for kabylake machine driver (kbl_rt5663_rt5514_max98927). Signed-off-by: Hsin-yu Chao <[email protected]> Signed-off-by: Harsha Priya <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-17ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platformHarsha Priya N1-3/+5
Patch fixes cracking noise in rt5663 headphones for kbl platform by calling rt5663_sel_asrc_clk_src() for RT5663_AD_STEREO_FILTER to set ASRC. The ASRC function is for asynchronous MCLK and LRCLK. For RT5663 ASRC should be enabled to support pcm format with 100fs. ASRC function will track i2s clock and generate corresponding system clock for codec. Calling this func helps select clock source for both RT5663_AD_STEREO_FILTER and RT5663_DA_STEREO_FILTER filters which fixes the crackling sound. Signed-off-by: Harsha Priya <[email protected]> Signed-off-by: Shruthi Sudhakar <[email protected]> Signed-off-by: Naveen M <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-17ASoC: Intel: Skylake: make snd_pcm_hardware constBhumika Goyal1-1/+1
Make this const as it is only passed as the 2nd argument to the function snd_soc_set_runtime_hwparams, which is const. Done using Coccinelle. Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-17ASoC: Intel: Atom: make snd_pcm_hardware constBhumika Goyal1-1/+1
Make this const as it is only used in a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-17ASoC: Intel: kbl_rt5663_rt5514_max98927: Add rt5514 spi dailinkHarsha Priya N2-1/+11
This patch adds a dai to rt5514-spi driver for wake on voice functionality. Signed-off-by: Hsin-yu Chao <[email protected]> Signed-off-by: Harsha Priya <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-16ASoC: Medfield: Delete an error message for a failed memory allocation in ↵Markus Elfring1-3/+1
snd_mfld_mc_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-16ASoC: Intel: constify snd_compr_codec_caps structuresJulia Lawall1-2/+2
These snd_compr_codec_caps structures are only copied into other structures, so they can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-16ASoC: Intel: Skylake: make skl_dsp_fw_ops constBhumika Goyal3-4/+4
Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-16ASoC: Intel: kbl: make snd_pcm_hw_constraint_list constBhumika Goyal1-3/+3
Make these const as they are only passed to the function snd_pcm_hw_constraint_list having the corresponding argument as const. Done using Coccinelle. Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-14ASoC: intel: constify snd_pcm_ops structuresArvind Yadav1-1/+1
snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/soc.h> work with const snd_pcm_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-14ASoC: Intel: make snd_soc_platform_driver constBhumika Goyal4-4/+4
Make these const as they are only passed as the 2nd argument to the function snd_soc_register_platform, which is of type const. Done using Coccinelle. Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-04ASoC: Intel: constify pci_device_id.Arvind Yadav1-1/+1
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by <linux/pci.h> work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: cnl: add pci id for cnlGuneshwor Singh1-0/+11
Enable cnl by adding its pci id in skl_ids[]. Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: cnl: add dsp ops for cannonlakeGuneshwor Singh1-0/+9
Add cannonlake dsp support by adding its dsp_ops. Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: cnl: Add sst library functions for cnl platformGuneshwor Singh3-2/+504
This adds the necessary DSP functions specific for the Cannonlake platform which includes firmware download using host DMA, DO/D3 handlers, irq_thread handlers and sst ops. Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: cnl: Unstatify common ipc functionsGuneshwor Singh2-3/+9
Common ipc functions can be reused for cnl, so make them non-static. Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: Skylake: Move platform specific init to platform dsp_init()Guneshwor Singh3-5/+9
Move ipc_init() from helper function to respective platform's dsp_init() as ipc_init() per platform can be different. Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: cnl: Add cnl dsp functions and registersGuneshwor Singh2-0/+380
This adds Cannonlake specific registers and support for CNL dsp related library functions for programming the registers to power up/down dsp cores, set/unset reset states for each core, enable/disable ipc interrupts and few wrappers to be called from elsewhere. Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: Skylake: Add dsp cores managementPardha Saradhi K1-4/+22
This patch adds support to manage additional cores on a demand basis. For instance, if module is set to run on certain core, the particular core is powered up in module init. The same is again powered down in module unload. Signed-off-by: Pardha Saradhi K <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: Skylake: Use num_core to allocate instead of macroGuneshwor Singh3-6/+20
For different platforms, number of dsp cores can vary. So instead of creating array of size SKL_DSP_CORES_MAX, use num_core in dsp_ops() of the respective platform to allocate core usage counts and states. Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: Skylake: Add num of cores in dsp opsDharageswari R4-3/+7
Number of dsp cores may differ for different platforms hence adding it in dsp ops. Signed-off-by: Dharageswari R <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: kbl: Add map for new DAIs for Multi-Playback & Echo RefNaveen Manohar2-6/+6
Modified DAPM Machine map for machine to suit the toplogy change required to enable features: Multi-Endpoint Playback Echo Reference Capture Signed-off-by: Naveen M <[email protected]> Signed-off-by: Sathya Prakash M R <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: kbl: Add DAI links for Multi-Playback & Echo-referenceNaveen Manohar2-0/+48
Add new FE DAI links to support: 1. Parallel playback on 2 ports simultaneously 2. Echo reference capture capability Signed-off-by: Naveen M <[email protected]> Signed-off-by: Sathya Prakash M R <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-03ASoC: Intel: kbl: Add new FEs for Multi-Playback & Echo-ReferenceNaveen Manohar1-0/+26
Adding new frontends to support: 1. Parallel playback on 2 ports simultaneously 2. Echo reference capture capability Signed-off-by: Naveen M <[email protected]> Signed-off-by: Sathya Prakash M R <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-01ASoC: Intel: Skylake: Fix potential null pointer dereference[email protected]1-1/+1
Check if the next sink is not null to avoid potential null pointer dereference in skl_tplg_bind_sinks(). Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-01ASoC: Intel: Skylake: Remove return check for skl_codec_create()[email protected]1-6/+2
Since skl_codec_create() always returns 0, make it return void and remove return check. Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-01ASoC: Intel: bxtn: Remove code loader reference in cleanupDronamraju Santosh P K1-5/+0
Since Broxton does not use code loader DMA, remove code loader cleanup in its dsp cleanup routine. Remove the iounmap too as it is done in skl_free_dsp(). Signed-off-by: Dronamraju Santosh P K <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-08-01ASoC: Intel: Skylake: Reset the controller in probe[email protected]1-0/+2
Controller can be in reset state by default. Capability structure traversal requires the controller to be out of reset else it results in broken capability parsing. Hence make sure that controller is out of reset before parsing capabilities by doing a full reset. Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-07-28ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platformHarsha Priya N1-4/+11
This patch enables 4 slot IV feedback for max98927 speaker amp codec. Signed-off-by: Harsha Priya <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-07-28ASoC: Intel: Add Kabylake RT5663 machine driver entryKevin Cheng1-0/+5
Adds Kabylake rt5663 machine driver entry into machine table Signed-off-by: Kevin Cheng <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-07-28ASoC: Intel: Add Kabylake machine driver for RT5663Kevin Cheng1-37/+209
This patch adds Kabylake I2S machine driver which uses RT5663 as headset on ssp1. Signed-off-by: Kevin Cheng <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-07-26ASoC: Intel: board: Fix missing sentinel for bxt_board_idPradeep Tewani1-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 <[email protected]> Signed-off-by: Pradeep Tewani <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-07-20ASoC: Intel: board: Add Geminilake platform supportPradeep Tewani1-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 <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-07-20ASoC: hdac_hdmi: Add the vendor nid for Geminilake HDMIPradeep Tewani1-5/+34
Geminilake HDMI codec has the different vendor nid. This patch adds the vendor nid as the part of driver data and uses it. Signed-off-by: Pradeep Tewani <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-07-20ASoC: Intel: board: Remove .owner initialization in bxt_rt298 driverPradeep Tewani1-1/+0
The .owner field is not required to be initialized in the driver. So, remove it. Signed-off-by: Pradeep Tewani <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-07-17ASoC: Intel: Atom: constify snd_soc_dai_ops structuresGustavo A. R. Silva1-3/+3
These structures are only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-07-17ASoC: Intel: Skylake: constify snd_soc_dai_ops structuresGustavo A. R. Silva1-4/+4
These structures are only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-07-17ASoC: Intel: Skylake: fix type in debug messageColin Ian King1-1/+1
Trivial fix to typo in debug message, dst_instacne should be dst_instance Signed-off-by: Colin Ian King <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>