aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-05-22ASoC: Intel: Initialize max mailbox size for baytrailSubhransu S. Prusty1-0/+2
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22ASoC: Intel: Allow to configure max size for mailbox dataSubhransu S. Prusty1-0/+2
Mailbox size can be different for different platforms. So allow the drivers to configure the size. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22ASoC: Intel: Remove the direct register reference from common ipcSubhransu S. Prusty1-3/+2
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22ASoC: Intel: Move the busy check to ops for HSWSubhransu S. Prusty1-0/+9
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22ASoC: Intel: Move the busy check to ops for BaytrailSubhransu S. Prusty1-0/+9
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22ASoC: Intel: Create an ops to check for DSP busySubhransu S. Prusty1-0/+1
Created an ops to check if DSP busy, to avoid using platform specific registers in common IPC. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-06ASoC: Intel: add support for configuring TDM slots for SSPVinod Koul3-0/+31
With this machines can now configure TDM settings for SSP port using set_tdm_slot API Signed-off-by: Praveen Diwakar <praveen.diwakar@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-06ASoC: intel: add support for specifying PCM formatVinod Koul3-0/+115
With this machines can configure the PCM format applied on SSP port using the set_fmt API Signed-off-by: Praveen Diwakar <praveen.diwakar@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-06ASoC: Intel: load hw_defaults in hw_params of ssp beVinod Koul2-3/+15
We have the SSP defaults now and we need to load then in hw_params callback of BE SSP DAI ops. Signed-off-by: Praveen Diwakar <praveen.diwakar@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-06ASoC: Intel: use local values for ssp configurationVinod Koul2-23/+32
So right now SSP configuration is statically coded in the driver. While we would like to keep this configuration intact for the users who are using these defaults, we need to provide a way for users to program it. So create a local value in driver structure which is populate with default value for now Signed-off-by: Praveen Diwakar <praveen.diwakar@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-06ASoC: Intel: add frame and data polarity to ssp configVinod Koul2-0/+4
The current ssp configuration was not configuring the frame sync polarity and data polarity. Some codecs do need these different so add them in ssp configuration now Signed-off-by: Praveen Diwakar <praveen.diwakar@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-06ASoC: Intel: Enabled button jack for BSW platform with rt5650 codecFang, Yang A1-13/+12
rt5650 codec supports 4 buttons detections so enabled it Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-06Merge branch 'topic/rt5645' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intelMark Brown1-1/+1
2015-05-05ASoC: Intel: Fixed kbuild warningsFang, Yang A1-3/+1
fix following sparse warnings: (new ones prefixed by >>) >> sound/soc/intel/boards/cht_bsw_max98090_ti.c:168:37: sparse: >> incorrect type in argument 2 (different base types) sound/soc/intel/boards/cht_bsw_max98090_ti.c:168:37: expected unsigned int [unsigned] val sound/soc/intel/boards/cht_bsw_max98090_ti.c:168:37: got restricted snd_pcm_format_t [usertype] <noident> Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-04ASoC: Intel: Support rt5650 codec for Cherrytrail & BraswellFang, Yang A2-13/+84
rt5650 and rt5645 are similar codec so reuse the cht_bsw_rt5645 driver Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-04ASoC: Intel: Add Cherrytrail & Braswell machine driver cht_bsw_max98090_tiFang, Yang A3-0/+334
Add machine driver for two Intel Cherryview-based platforms, Cherrytrail and Braswell. This machine driver will support max98090 codec as primary codec. it can also support TI jack detect chip as aux device if platform supports it. Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-04ASoC: Intel: Add support max98090 in sst driverFang, Yang A1-0/+2
Added entry in sst driver to support max98090 codec for intel Braswell platform. Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-29ASoC: rt5645: Adds push button support for rt5650Bard Liao1-1/+1
rt5650 support headset button detection. Currently, the button detection is only implemented for rt5650 codec. The button detection configuration register's default value is different from rt5645. And we didn't touch the register in the driver, so we will get the wrong value when we dump the registers. We will fix it in another patch. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-27ASoC: Intel: Add support rt5650 in sst driverFang, Yang A1-0/+2
Added entry in sst driver to support rt5650 codec for intel Braswell platform. Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-27ASoC: intel - use SNDRV_CTL_ELEM_ID_NAME_MAXLENVinod Koul1-1/+1
we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use this define instead of numeric value Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-27ASoC: Intel: Remove invalid kfree of devm allocated dataJin Yao1-1/+0
kbuild robot reports following warning: "sound/soc/intel/haswell/sst-haswell-ipc.c:2204:1-6: WARNING: invalid free of devm_ allocated data" As julia explains to me, the memory allocated with devm_kalloc is freed automatically on failure of a probe function. So this kfree should be removed otherwise the double free will be got in error handler path. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown45-695/+1350
2015-04-12Merge tag 'asoc-v4.1' into asoc-nextMark Brown13-69/+291
ASoC: Changes for v4.1 A selection of changes for v4.1 so far. The main things are: - Move of jack registration to the card where it belongs. - Support for DAPM routes specified by both the machine driver and DT. # gpg: Signature made Thu 05 Mar 2015 01:10:27 GMT using RSA key ID 5D5487D0 # gpg: WARNING: digest algorithm MD5 is deprecated # gpg: please see https://gnupg.org/faq/weak-digest-algos.html for more information # gpg: Oops: keyid_from_fingerprint: no pubkey # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
2015-04-12Merge remote-tracking branch 'asoc/fix/intel' into asoc-linusMark Brown4-1/+7
2015-04-12ASoC: Intel: fix array_size.cocci warningskbuild test robot1-1/+1
sound/soc/intel/haswell/sst-haswell-ipc.c:646:28-29: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Generated by: scripts/coccinelle/misc/array_size.cocci CC: Jie Yang <yang.jie@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ASoC: Intel: Use the generic IPC/mailbox APIs in BroadwellJin Yao1-295/+87
Use the generic IPC/mailbox APIs to replace the original processing code for Broadwell platform. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Acked-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ASoC: Intel: Use the generic IPC/mailbox APIs in BaytrailJin Yao1-283/+77
Use the generic IPC/mailbox APIs to replace the original processing code for Baytrail platform. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Acked-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ASoC: Intel: Refactor common IPC/mailbox code into generic APIsJin Yao3-1/+387
Currently in Intel SST driver, some similar IPC/mailbox processing code are used in different platforms (e.g. in baytrail/broadwell). This patch extracts the common code and creates new files (sst-ipc.c/sst-ipc.h) to contain the common code and provide the generic APIs for IPC/mailbox processing. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Acked-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09ASoC: Intel: do cast earlier in sst_cdev_tstamp()Dan Carpenter1-1/+1
My static checker complains about these because it looks like the multiply can overflow and then we cast to a larger data type. I don't think this is a problem, but it's also harmless to do the cast earlier so let's silence the static checker warning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08ASoC: Intel: remove unused functionsSudip Mukherjee1-24/+0
these functions were never called by anyone. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08ASoC: Intel: Fix a buffer overflow issueJie Yang1-1/+1
0day robot reported a buffer overflow issue: ... sound/soc/intel/haswell/sst-haswell-pcm.c:1107 hsw_pcm_probe() error: buffer\ overflow 'hsw_dais' 4 <= 4 sound/soc/intel/haswell/sst-haswell-pcm.c:1109 hsw_pcm_probe() error: buffer\ overflow 'hsw_dais' 4 <= 4 ... Fix it by initializing the index(i) to correct value. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06ASoC: Intel: read_shim_data() can be statickbuild test robot1-2/+2
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06ASoC: Intel: create atom folder and move atom platform files inJie Yang21-20/+18
Restructure the sound/soc/intel/ directory: create atom folder, and move sst atom platform files here. Signed-off-by: Jie Yang <yang.jie@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06ASoC: Intel: create baytrail folder and move baytrail platform files inJie Yang6-10/+11
Restructure the sound/soc/intel/ directory: create baytrail folder, and move sst baytrail platform files here. Signed-off-by: Jie Yang <yang.jie@intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06ASoC: Intel: create boards folder and move sst boards files inJie Yang10-30/+31
Restructure the sound/soc/intel/ directory: create boards folder, and move sst boards files here. Signed-off-by: Jie Yang <yang.jie@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06ASoC: Intel: create haswell folder and move haswell platform files inJie Yang6-11/+13
Restructure the sound/soc/intel/ directory: create haswell folder, and move haswell platform files here. Signed-off-by: Jie Yang <yang.jie@intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06ASoC: Intel: create common folder and move common files inJie Yang14-12/+14
Restructure the sound/soc/intel/ directory: create common folder, and move sst common files here. Signed-off-by: Jie Yang <yang.jie@intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27ASoC: Intel: fix warning reported by static check tool smatchLu, Han1-8/+5
The smatch tool report warning: ... CHECK sound/soc/intel/sst-haswell-pcm.c sound/soc/intel/sst-haswell-pcm.c:1110 hsw_pcm_probe() error: buffer overflow\ 'hsw_dais' 4 <= 4 sound/soc/intel/sst-haswell-pcm.c:1112 hsw_pcm_probe() error: buffer overflow\ 'hsw_dais' 4 <= 4 ... fix it by use its own struct member for post-process module, rather than sharing unused pcm member. Signed-off-by: Lu, Han <han.lu@intel.com> Acked-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-22ASoC: Intel: remove misleading DMA error messages on Baytrail platformsPierre-Louis Bossart3-0/+6
During probe, the Baytrail audio driver reports errors such as: [44.172040] baytrail-pcm-audio baytrail-pcm-audio: error: invalid DMA engine 0 [44.172137] baytrail-pcm-audio baytrail-pcm-audio: sst_dma_new failed Those error messages are misleading, there is no error since the DMA is explicitly not configured for Baytrail. Add a test to remove DMA error checks when DMA is not configured and return silently. Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-19ASoC: Intel: acpi_probe: fix error return pathVinod Koul1-1/+1
Fix the sst_acpi_probe memory allocation error path by setting right error code and initiating the cleanup insteadof just returning Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-19Intel: ASoC: Add condition check before set param to wavesLu, Han2-5/+6
Check waves state before set parameter through ipc to prevent unexpected operation. Also remove redundant check. Signed-off-by: Lu, Han <han.lu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-18ASoC: Intel: Remove vague commit about slave DMA config from firmware loaderJarkko Nikula1-2/+0
Intel MID DMA driver is going to be removed, commit should be a few lines down near to dmaengine_slave_config() call in order to not confuse and at quick look Synopsys DesignWare does seem to use some of the slave config structure fields (see drivers/dma/dw/core.c: dwc_config()). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-18ASoC: Intel: Remove support for Intel MID DMA from firmware loaderJarkko Nikula2-4/+0
Intel MID DMA driver is going to be removed by the coming commit 36111da7838e ("dmaengine: intel-mid-dma: remove the driver") in spi.git tree. Since there are no users for SST_DMA_TYPE_MID type the support for it can be removed from here in advance. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-17ASoC: Intel: move the jack creation to Braswell machine driverJin Yao1-0/+24
The jack creation code was in rt5670 codec driver before due to the jack resources (gpio/irq) were defined under the node of codec device in ACPI on Braswell. We used the snd_soc_jack_new() to create a jack instance. But now snd_soc_jack_new() is removed from upstream and we can't use snd_soc_card_jack_new() in codec driver, so we move the jack creation code to machine driver and pass the jack instance to codec driver for further processing. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-17ASoC: Intel: Add suspend_pre and resume_post for Braswell snd_soc_cardJin Yao1-0/+31
On Braswell, we need to add some machine specific setting before suspend and after resume. For example, disable/enable jack detection in codec so use snd_soc_card suspend_pre and resume_post ops for this purpose. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-17Merge branch 'topic/jack' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intelMark Brown4-37/+22
2015-03-16Merge remote-tracking branch 'asoc/fix/intel' into asoc-linusMark Brown2-11/+24
2015-03-12ASoC: Intel: add kcontrol to set parameter to sound effect module wavesLu, Han3-0/+120
Each kcontrol command includes a line of parameters up to 128 bytes. kcontrol command to set param: cset "name='Waves Set Param' <0x01,0xff,...>" or cset-bin-file "name='Waves Set Param' <path/to/binary/config/file>" The parameter lines are stored in a buffer array, so can be read back from buffer rather than from DSP, and be relaunched to DSP when resume from RTD3. The buffer size is 160 parameter lines. kcontrol command to reset the buffer: cset "name='Waves Set Param' 0xff" alsa-lib v1.0.29 or commit 6ea14c36 and f47480af are required to support the kcontrol commands. Signed-off-by: Lu, Han <han.lu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-12ASoC: Intel: add function to set parameter to sound effect module wavesLu, Han2-0/+85
Add function to set parameters to module waves. The parameters can be set only when module is enabled, and parameter size is limited to 500 Bytes. Signed-off-by: Lu, Han <han.lu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-12ASoC: Intel: add kcontrol to enable/disable sound effect module wavesLu, Han3-0/+90
Add kcontrol to enable/disable module waves. IPC is valid only when module is loaded. Also track module state over suspend so it's state can be restored on resume. Signed-off-by: Lu, Han <han.lu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>