Commit Graph

243 Commits

Author SHA1 Message Date
Linus Torvalds
5d6a546886 CONFIG_PM_RUNTIME elimination for 3.19-rc1
This removes the last few uses of CONFIG_PM_RUNTIME introduced
 recently and makes that config option finally go away.
 
 CONFIG_PM will be available directly from the menu now and
 also it will be selected automatically if CONFIG_SUSPEND or
 CONFIG_HIBERNATION is set.
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJUlYaPAAoJEILEb/54YlRx/SoP/2wYioGzBhOCYfHw6fZF8zrP
 rotQ86sakhvSHre8K9QyFjvsA9wJ0CaTJF46YKZuHFhqU+IJZ7aXvNdEM1hK214J
 Mf3L2AcbcdnXioAN+HpeZhQklp2qHe84YkVXBqsFD6kb/qUNV2LSjy6nKEUdY3jW
 6KL2f3RgF/LDjTdedujJgcCYwMBwfX4B7U42BG4NQQ8z3wCV+imJgzNDrR5nNlqK
 xu8ab8hO1Gi3msOJxS0y4MN6VTUpYOvQKhSyM9ErcB2ibclAdmcivKuFAz6gy5U7
 PyDfYo/P3mXjMRBFb9fLqGtRcfstsnxPPSeKwp236tIQFX19Bj76UVUMJoUlXJP5
 /f55/P7mCascg74ZZC4GiD/BSCRdqwInCsFMzqAfSq2NciKzeS6W7Mhd9VTLKDpl
 5kqE39imUjZyps7/QqkfWskzB7Puhmqk3ZgTq2yAd4uQTpV7xlJYcnvr4oHCmAia
 SsLdYOqMQzWr3qyz2f5cOqPAvOo3/Xk/HHfTOCHW/4L+Ov+C921/f3d5GnxX9Ha+
 ucRaMp9j5FPYVwFaFkczAMNF2Eanq+Fupa3e6XUNNbYdchFqT9obnHZbVKyvswjR
 vdGAYAjP/cLzIH9ETDCCXCRvBRw5pzeelDgvDPjPdmPjndHXG8WViyTIEyLL4+1i
 BENtc/SUw3pZ7iNlGO78
 =QnSO
 -----END PGP SIGNATURE-----

Merge tag 'pm-config-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull CONFIG_PM_RUNTIME elimination from Rafael Wysocki:
 "This removes the last few uses of CONFIG_PM_RUNTIME introduced
  recently and makes that config option finally go away.

  CONFIG_PM will be available directly from the menu now and also it
  will be selected automatically if CONFIG_SUSPEND or CONFIG_HIBERNATION
  is set"

* tag 'pm-config-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM: Eliminate CONFIG_PM_RUNTIME
  tty: 8250_omap: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  sound: sst-haswell-pcm: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
2014-12-20 13:37:44 -08:00
Linus Torvalds
20e471fd34 sound fixes for 3.19-rc1
Here are a few fixes that have landed after the previous pull
 request.  All are driver specific fixes including:
 - error/int value fixes in OXFW,
 - Intel Skylake HD-audio HDMI codec support,
 - Additional HD-audio Realtek codecs and AD1986A codec fixes/quirks,
 - a few more DSD support and a quirk for Arcam rPAC in usb-audio,
 - a typo fix for Scarlett 6i6,
 - fixes for new ASIHPI firmware,
 - ASoC Exynos7 cleanups,
 - Intel ACPI support, and
 - a fix for PCM512 register cache sync.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUkwikAAoJEGwxgFQ9KSmkBq4QAJKgRY2eTJNhg9tZhI1ldxRi
 zSLtcMqDrFd/FjlutHxIlF8iXvm0dldfJP0rZwCQ/ULb6Fcy9tkXhhzfVsO4/507
 vYpPpaq7zGVLeOzT6zgguQUnEMzMc3VIIqiPG9YC73/NYx7cxgmG27oa/PJz+Brm
 /gVLlDzWn5rIagodSRMbUUf3YM5P9t2KZpRa8JAEUwWBy8PnzmMA9yx6cifbmnlV
 Gcd7j438O22cW6ubXFtKsezV2hrWYoBSKiH3kj2soEZafCpnoI+Y0rxDeW4vI1SB
 e/cI6C2ncxZodOD6fN1gJDgL5TLQetIAmN19ww9txb78UnP53b39J1fruJwGXdPV
 h+H4oftIkoDx2ACT02xcW5EFn309PJphZi/g8qOFSLRAXZBTb9yw1PfyCHxPynT5
 XbL7HTdgFU1S+eHjTFLjLGgsybJ7LaJCBwtQMeutXr1qjCAYTIKQeYxoi5ItSoM3
 NeNe68XVV5D4lq6udt42uVxjOdAggXQAnS5YDH8TDTWaERIMLmQGueZaDkZ7bGVO
 Wp3k4akURdF5mkVoQ5s3P4yYCOkf2zamZZsfSYIvT9MNZ9KWb+C/bslwsCzbmVLO
 sIMXQ1FYo9tbVIa9TTLBLfmYaIkPq/V2xERw5ugf5iLibO+o4K0fnoquctIeEXCI
 VQZ6BM6P7xB7iIyf7Of+
 =HRbM
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are a few fixes that have landed after the previous pull request.
  All are driver specific fixes including:

   - error/int value fixes in OXFW,
   - Intel Skylake HD-audio HDMI codec support,
   - Additional HD-audio Realtek codecs and AD1986A codec fixes/quirks,
   - a few more DSD support and a quirk for Arcam rPAC in usb-audio,
   - a typo fix for Scarlett 6i6,
   - fixes for new ASIHPI firmware,
   - ASoC Exynos7 cleanups,
   - Intel ACPI support, and
   - a fix for PCM512 register cache sync"

* tag 'sound-fix-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits)
  ALSA: usb-audio: extend KEF X300A FU 10 tweak to Arcam rPAC
  ALSA: hda/realtek - New codec support for ALC298
  ALSA: asihpi: update to HPI version 4.14
  ALSA: asihpi: increase tuner pad cache size
  ALSA: asihpi: relax firmware version check
  ALSA: usb-audio: Fix Scarlett 6i6 initialization typo
  ALSA: hda - Add quirk for Packard Bell EasyNote MX65
  ALSA: usb-audio: add native DSD support for Matrix Audio DACs
  ALSA: hda/realtek - New codec support for ALC256
  ALSA: hda/realtek - Add new Dell desktop for ALC3234 headset mode
  ASoC: Intel: fix possible acpi enumeration panic
  ALSA: hda/hdmi - apply Haswell fix-ups to Skylake display codec
  ASoC: Intel: fix return value check in sst_acpi_probe()
  ALSA: hda - Make add_stereo_mix_input flag tristate
  ALSA: hda - Create capture source ctls when stereo mix input is added
  ALSA: hda - Fix typos in snd_hda_get_int_hint() kerneldoc comments
  ALSA: hda - add codec ID for Skylake display audio codec
  ALSA: oxfw: some signedness bugs
  ALSA: oxfw: fix detect_loud_models() return value
  ASoC: rt5677: add REGMAP_I2C and REGMAP_IRQ dependency
  ...
2014-12-19 18:07:17 -08:00
Rafael J. Wysocki
45544c884e sound: sst-haswell-pcm: Replace CONFIG_PM_RUNTIME with CONFIG_PM
The sst-haswell-pcm driver is a new user of CONFIG_PM_RUNTIME.

However, after commit b2b49ccbdd (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 in
sound/soc/intel/sst-haswell-pcm.c.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
2014-12-19 15:26:46 +01:00
Kevin Strasser
de5f644e3c ASoC: Intel: fix possible acpi enumeration panic
A crash can occur on some platforms where adsp is enumerated but codec is not
matched. Define codec_id as a pointer intead of an array so that it gets
initialized to NULL for the terminating element of sst_acpi_bytcr[] and
sst_acpi_chv[].

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-16 11:52:09 +00:00
Wei Yongjun
f5d40b400f ASoC: Intel: fix return value check in sst_acpi_probe()
In case of error, the function platform_device_register_data()
returns ERR_PTR() and never returns NULL. The NULL test in the
return value check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-15 18:21:40 +00:00
Linus Torvalds
e6b5be2be4 Driver core patches for 3.19-rc1
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.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlSOD20ACgkQMUfUDdst+ylLPACg2QrW1oHhdTMT9WI8jihlHVRM
 53kAoLeteByQ3iVwWurwwseRPiWa8+MI
 =OVRS
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.19-rc1' of 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-14 16:10:09 -08:00
Mark Brown
addaeea9ee Merge remote-tracking branches 'asoc/topic/hdmi', 'asoc/topic/intel', 'asoc/topic/jack', 'asoc/topic/jz4740' and 'asoc/topic/lm49453' into asoc-next 2014-12-08 13:12:00 +00:00
Jie Yang
7bb73cbd07 ASoC: Intel: Move capture PCM pin to PCM0 for Broadwell/Haswell
Move capture PCM pin from PCM4 to PCM0 for Broadwell/Haswell.
This will allow us to integrate with pulseaudio better for
usually default device is set to 0.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-28 15:35:04 +00:00
Jie Yang
c5f0406bdc ASoC: Intel: Correct the xmax volume
The xmax volume should be corrected to ARRAY_SIZE(volume_map)-1, otherwise,
the xmax value will be mapped to 0 wrongly.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-28 11:40:30 +00:00
Jie Yang
525b8634d8 ASoC: Intel: Remove useless loopback volume control for Broadwell
On Broadwell, the ADSP FW don't support loopback record volume tuning,
so here remove this control.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-27 11:00:50 +00:00
Jie Yang
f1e5982546 ASoC: Intel: Fix stream volume set no effect issue on Broadwell
The volume setting control for capture stream doesn't take effect on intel
Broadwell platform. Root cause it at 2 points:
1. set stream volume with channel=2 is wrongly bapassed;
2. the saved stream volume should be restored after stream is commit.

Here correct these 2 items to fix the stream volume set issue.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-25 13:08:04 +00:00
kbuild test robot
14cd792312 ASoC: Intel: chv_platform_data can be static
sound/soc/intel/sst/sst_acpi.c:135:26: sparse: symbol 'chv_platform_data' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 23:17:58 +00:00
Mengdong Lin
bd01fdc3aa ASoC: Intel: add support for Cherrytrail and Braswell in SST driver
This patch add ACPI device ID and platform data for two Cherryview-based
platforms, Cherrytrail and Braswell. Also reuse mfld driver ops in sst driver.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 19:23:01 +00:00
Mengdong Lin
026da220c5 ASoC: Intel: Add Cherrytrail & Braswell machine driver cht_bsw_rt5672
Add machine driver for two Intel Cherryview-based platforms, Cherrytrail and
Braswell, with RT5672 codec.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 19:23:01 +00:00
kbuild test robot
1a28fc190c ASoC: Intel: byt_rvp_platform_data can be static
sound/soc/intel/sst/sst_acpi.c:124:26: sparse: symbol 'byt_rvp_platform_data' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 15:59:57 +00:00
Subhransu S. Prusty
996cc8494d ASoC: Intel: add BYTCR machine driver with RT5640
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>
2014-11-19 17:49:44 +00:00
Vinod Koul
92a6e2a227 ASoC: Intel: cleanup runtime_pm initialization
For ACPI we missed to pm_runtime_enable() call which is required to tell PM
core that runtime on this device is enabled now. Since this is common to
both PCI and APCI move it out. Also for ACPI we do not require
pm_runtime_allow() call, so remove that

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-19 10:56:46 +00:00
Mengdong Lin
eb826a35d2 ASoC: Intel: add missing ACPI device table
The ACPI device table will generate the driver module alias for
Intel audio devices enumerated from ACPI.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-17 10:57:12 +00:00
Vinod Koul
336cfbb05e ASoC: Intel: mrfld- add ACPI module
Add the last ACPI module support which also uses core module like the PCI
part

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>
2014-11-14 11:07:43 +00:00
Vinod Koul
9b105fe447 ASoC: Intel: mrfld - remove non static definition
sst_save_shim64() is defined as static in code but header is non static.
Since this is not used other than file where defined remove non static
definition

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 16:08:13 +00:00
Vinod Koul
b0d94acd63 ASoC: Intel: mrfld - add shim save restore
In ACPI platform we need to save few registers of Shim on suspend and
restore them on resume, so add handlers to do this

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>
2014-11-06 12:36:18 +00:00
Vinod Koul
f533a035e4 ASoC: Intel: mrfld - create separate module for pci part
Now the SST_IPC will support both ACPI and PCI, separate into core module
and PCI module. This also move probe function into PCI module and exports
the required symbols from core module

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>
2014-11-06 12:36:17 +00:00
Vinod Koul
29e1812d76 ASoC: Intel: mrfld - remove unnecessary check for pointer
the 'platform' pointer in sst_map_modules_to_pipe() is deref in caller
function so we need to check for it in this function

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>
2014-11-06 12:36:17 +00:00
Liam Girdwood
7b8ef67a0b ASoC: Intel: Fix build with CONFIG_SLEEP enabled.
Fix the following build error when CONFIG_SLEEP is enabled and CONFIG_RUNTIME
is disabled. The BDW ADSP sleep PM functionality depends on the runtime pm
calls for context save/restore.

All error/warnings:

>> ERROR: "snd_soc_suspend" undefined!
>> ERROR: "snd_soc_resume" undefined!

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-04 15:13:36 +00:00
Jie Yang
e648f6add2 ASoC: Intel: Fix the driver data not set issue
The priv_data is allocated again here wrongly, and it
is not set to the driver data after assignment. This
make the pdata->dev is NULL and oops occurs on the first
call to hsw_volume_put.

The resource has been allocated in driver probe callback
hsw_pcm_dev_probe, so here just remove this sencond
allocation is OK.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-04 11:44:08 +00:00
Greg Kroah-Hartman
a8a93c6f99 Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next
Remove all .owner fields from platform drivers
2014-11-03 19:53:56 -08:00
Jie Yang
f74e2c9cb0 ASoC: Intel: Correct a macro for FW message
For the broadwell official released FW(Since 8.4.1.43), the macro
SST_HSW_NO_CHANNELS is changed and fixed to 4, so here change it
to 4.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-03 16:11:35 +00:00
Sudip Mukherjee
22a236b4d0 ASoC: Intel: fix missing mutex
on error in block prepare, we were returning the error code while still
holding the mutex. We are releasing the mutex in this patch before
return.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-02 11:07:28 +00:00
Jie Yang
c1e99c913b ASoC: Intel: Add jack detection for Broadwell
Add jack dectection and event reporting for Broadwell. It use combo
jack on BDW platform, which including Mic Jack pin and Headphone
jack pin.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 16:59:41 +00:00
Subhransu S. Prusty
7fb73c74ff ASoC: Intel: more probe modularization for sst
Move the PCI BAR and resource initialization to a separate routine

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>
2014-10-31 16:57:33 +00:00
Subhransu S. Prusty
250454d8fe ASoC: Intel: modularize driver probe and remove
The driver probe which initializes driver and remove which cleans up can be
shared with APCI as well, so move them to common init_context and
cleanup_context routines which can be used by ACPI as well

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>
2014-10-31 16:57:32 +00:00
Subhransu S. Prusty
2559d9928f ASoC: Intel: move the driver context allocation to routine
This will be used by ACPI code as well, so moving to common routine helps

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>
2014-10-31 16:57:32 +00:00
Subhransu S. Prusty
54adc0ad64 ASoC: Intel: move the lock and wq initialization to routine
This will be used by ACPI code as well, so moving to common routine helps

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>
2014-10-31 16:57:27 +00:00
Subhransu S. Prusty
7e73e4d805 ASoC: Intel: move the driver wq init to a routine
This will be used by ACPI code as well, so moving to common routine helps

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>
2014-10-31 16:57:25 +00:00
Subhransu S. Prusty
3172fcddce ASoC: Intel: mfld-pcm: Fix to Store device context in sst_data
Some debug prints use dev context in sst_data. Store the device context for
the same.

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>
2014-10-31 16:56:48 +00:00
Vinod Koul
7adab122a5 ASoC: Intel: sst - add compressed ops handling
This patch add low level IPC handling for compressed stream operations

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>
2014-10-31 12:52:43 +00:00
Subhransu S. Prusty
fdcc4a039f ASoC: mfld-compress: implement .power callback
.power callback is required to invoked for compressed audio as well to turn
on/off sst, so invoke them

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>
2014-10-31 12:51:59 +00:00
Fang, Yang A
5794b7ec62 ASoC: Intel: use correct firmware name
The firmware name was used worngly, so fix it up

Signed-off-by: Fang, Yang A <yang.a.fang@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>
2014-10-31 12:51:14 +00:00
Vinod Koul
6e9b05607f ASoC: Intel: sst: load firmware using async callback
We would like the DSP firmware to be available in driver as soon as possible. So
use the async callback in driver to probe to load the firmware as soon as
usermode is up

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>
2014-10-31 12:50:38 +00:00
Mythri P K
45f31bfcda ASoC: Intel: use lock when changing SST state.
SST state change should be done under sst_lock

Signed-off-by: Mythri P K <mythri.p.k@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>
2014-10-31 12:47:44 +00:00
Vinod Koul
d62f2a08b9 ASoC: Intel: sst: add runtime power management handling
This patch adds the runtime pm handlers, the driver already has code for
get/put for runtime pm and only these handlers being missing.

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>
2014-10-31 12:46:45 +00:00
Subhransu S. Prusty
1a6db0bd26 ASoC: Intel: mrfld: Fix runtime pm calls in sst_open_pcm_stream
It's already done in open/close.

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>
2014-10-31 12:29:50 +00:00
Jie Yang
0d2135ecad ASoC: Intel: Work around to fix HW D3 potential crash issue
When using clock gatings to save power, there are some known issues:
1. core clock gating (DCLCGE) must be disabled during D0 and D3 entry
and updating SRAM banks (VDRTCTL0).
2. DSP trunk clock gating (DTCGE) can cause FW crashes, disable it in D0.

To align with the new W/A flow from FW team, we must set VDRTCTL0.D3PGD
to 1 (D3 power gating disabled) at first startup and keep it all the time.
ADSP will be in D0 on first boot by BIOS part of WA. Required delays must
be preserved (waiting for HW to stabilize, after enabling CCG, changing
SRAM PG, D3PG).

D3->D0:
1. Disable core clock gating (VDRTCTL2.DCLCGE = 0)
2. Enable other CG apart from DTCG and DCLCG (VDRTCTL2. DCLCGE and DTCGE = 0)
3. Disable D3PG (VDRTCTL0.D3PGD = 1)
4. Power up necessary SRAM and wait at least for 18 clock cycles for every
bank you have powered up
5. Set D0 state(PMCS.PS = 0), wait for HW
6. Restore MCLK (clkctl.smos, disabled in D3 entry point 4)
7. Stall and reset core, set CSR
8. Enable core clock gating (VDRTCTL2.DCLCGE = 1), delay 50 us
9. Unreset core
10.Load FW, configure PLL and other necessary things
11.Unstall core

Changing SRAM PG during D0:
1. Disable core clock gating (VDRTCTL2.DCLCGE = 0)
2. Set PG mask
3. Wait at least for 18 clock cycles for every bank you have powered up
4. Enable core clock gating, delay 50 us

D0->D3:
1. Disable core clock gating (DCLCGE = 0)
2. Stall and reset core
3. Power down entire SRAM and wait at least for 18 clock cycles for every bank
(Enable SRAM PG (ISRAMPGE = 0x3FF, DSRAMPGE = 0xFFFFF, D3SRAMPGD = 0), remember
about preserving VDRTCTL0.D3PGD = 1)
4. Shutdown PLL, disable MCLK(clkctl.smos = 0), Enable DTCG to save power
5. Set D3 state(PMCS.PS = 3), delay 50 us
6. Enable core clock gating, delay 50 us

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-30 17:06:21 +00:00
Liam Girdwood
35e03a884c ASoC: Intel: fix build with runtime PM disabled.
Fix the following errors:

All error/warnings:

>> sound/soc/intel/sst-haswell-pcm.c:1168:13: error: 'hsw_pcm_prepare' undeclared here (not in a function)
     .prepare = hsw_pcm_prepare,
                ^
>> sound/soc/intel/sst-haswell-pcm.c:1169:14: error: 'hsw_pcm_complete' undeclared here (not in a function)
     .complete = hsw_pcm_complete,
                 ^
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-30 15:56:01 +00:00
Liam Girdwood
b891f62fcd ASoC: Intel: Add debug output when boot fails.
Add the debug output from IPCD and IPCX when booting fails.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-30 15:46:05 +00:00
Jie Yang
35c0a8c017 ASoC: Intel: Fix block is enabled multiple times issue
During FW parsing and loading, block_list_prepare() may
be called for each raw data block copying and this may
made the hsw_block_enable() called mutiple times, which
increase block->users many times. The result of this is
hsw_block_disable() can't power gated the related block
when trying to free the blocks during suspend, and the
power gating status also confused.

Here check the block user status, only calling enable()
for those blocks who has no user yet. Remember that
this works correctlly on current case, where there are
enough SRAM memory so different module won't share a
memory block. For further usage, we may need restructure
the struct sst_mem_block to save the module list who is
using it.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-30 13:41:22 +00:00
Liam Girdwood
2e4f75919e ASoC: Intel: Add PM support to HSW/BDW PCM driver
Add PM and RTD3 support to the HSW/BDW PCM driver. The PCM driver will
now save DSP context and then power off the DSP when it's not in use.
DSP power and context is then restored when it's next used.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29 20:50:42 +00:00
Liam Girdwood
aed3c7b77c ASoC: Intel: Add PM support to HSW/BDW IPC driver
Add PM and RTD3 support to the HSW/BDW IPC driver. This patch
saves and restores the DSP context, loads and unloads FW and drops
any pending IPC messages after suspend.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29 20:50:42 +00:00
Liam Girdwood
6b7b4b8941 ASoC: Intel: Add PM support to the HSW/BDW DSP core.
Add support for PM wake, sleep and stall calls to the core HSW/BDW driver.
This includes reworking the reset and boot code and adding new calls
for setting D3/D0 state.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29 20:50:42 +00:00
Liam Girdwood
d96c53a193 ASoC: Intel: Add generic support for DSP wake, sleep and stall
Add generic functions to support DSP sleep, wake and stall.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29 16:56:55 +00:00