Commit graph

1213 commits

Author SHA1 Message Date
Naveen Manohar
da3cbb40f3 ASoC: Intel: kbl: Add new FEs for Multi-Playback & Echo-Reference
Adding new frontends to support:
1. Parallel playback on 2 ports simultaneously
2. Echo reference capture capability

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:06:33 +01:00
Naveen Manohar
d70c4a0481 ASoC: Intel: Skylake: Use correct nuvoton codec ID
Correcting the nau88l25 codec ID to match secondary codec
and load the machine driver.

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 10:23:03 +01:00
Mark Brown
7e5fed09dd Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2017-08-01 15:17:04 +01:00
guneshwor.o.singh@intel.com
10a5439f0e ASoC: Intel: Skylake: Fix potential null pointer dereference
Check if the next sink is not null to avoid potential null pointer
dereference in skl_tplg_bind_sinks().

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-01 13:34:09 +01:00
guneshwor.o.singh@intel.com
693c0fb26a ASoC: Intel: Skylake: Remove return check for skl_codec_create()
Since skl_codec_create() always returns 0, make it return void and remove
return check.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-01 13:34:05 +01:00
Dronamraju Santosh P K
3fbbcf4dad ASoC: Intel: bxtn: Remove code loader reference in cleanup
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 <santosh.pavan.kumarx.dronamraju@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-01 13:34:01 +01:00
guneshwor.o.singh@intel.com
60767abcea ASoC: Intel: Skylake: Reset the controller in probe
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 <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-01 13:33:58 +01:00
Harsha Priya N
cc4db0e257 ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform
This patch enables 4 slot IV feedback for max98927 speaker amp codec.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 13:42:58 +01:00
Harsha Priya N
6512dd4dcf ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform
This patch fixes the pop noise in dmic recording using rt5514 on kabylake platform.
This patch enables the rt5514 to use MCLK instead of BLCK as the sysclock which fixes
the pop noise.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 13:42:28 +01:00
Harsha Priya N
349d63c33a ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform
This patch fixes the cracking noise in rt5663 headphones for kabylake platform
by calling rt5663_sel_asrc_clk_src() for RT5663_AD_STEREO_FILTER to set ASRC.

The ASRC function is for asynchronous MCLK and LRCK. For RT5663 ASRC should be
enabled to  support special i2s clock format like Intel's 100fs.
ASRC function will track i2s clock and generate a corresponding
system clock for codec. Calling this function helps select the clock source
for both RT5663_AD_STEREO_FILTER and RT5663_DA_STEREO_FILTER filters
which fixes the crackling sound.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 13:42:23 +01:00
Kevin Cheng
0dfa7a046a ASoC: Intel: Add Kabylake RT5663 machine driver entry
Adds Kabylake rt5663 machine driver entry into machine table

Signed-off-by: Kevin Cheng <kevin.cheng@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 13:35:46 +01:00
Kevin Cheng
c06425705a ASoC: Intel: Add Kabylake machine driver for RT5663
This patch adds Kabylake I2S machine driver which uses
RT5663 as headset on ssp1.

Signed-off-by: Kevin Cheng <kevin.cheng@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 13:35:42 +01:00
Pradeep Tewani
82444cdb46 ASoC: Intel: board: Fix missing sentinel for bxt_board_id
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>
2017-07-26 13:03:32 +01:00
Vinod Koul
b76e3f9333 ASoC: Intel: Skylake: Fix missing sentinels in sst_acpi_mach
Couple of instances of sst_acpi_mach were having missing sentinels
so add them up

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-26 13:03:18 +01:00
Pradeep Tewani
669eb871c4 ASoC: Intel: board: Add Geminilake platform support
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>
2017-07-20 12:20:39 +01:00
Pradeep Tewani
0e46ccd5bc ASoC: Intel: board: Remove .owner initialization in bxt_rt298 driver
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>
2017-07-20 12:20:26 +01:00
Gustavo A. R. Silva
c115a3178b ASoC: Intel: Atom: constify snd_soc_dai_ops structures
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 <garsilva@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 15:22:12 +01:00
Gustavo A. R. Silva
82e2b1e081 ASoC: Intel: Skylake: constify snd_soc_dai_ops structures
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 <garsilva@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 15:22:09 +01:00
Colin Ian King
d5c6d43b3d ASoC: Intel: Skylake: fix type in debug message
Trivial fix to typo in debug message, dst_instacne should be
dst_instance

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 15:22:06 +01:00
Subhransu S. Prusty
5b43af6d25 ASoC: Intel: Skylake: Fix default dma_buffer_size
If the dma_buffer_size is not defined in topology, fix it to 2ms default
value to make backward compatible.

Fixes: f6e6ab1d16 ("ASoC: Intel: Skylake: Fix dma buffer size calculation")
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-10 19:19:40 +01:00
Linus Torvalds
920f2ecdf6 sound updates for 4.13-rc1
This development cycle resulted in a fair amount of changes in both
 core and driver sides.  The most significant change in ALSA core is
 about PCM.  Also the support of of-graph card and the new DAPM widget
 for DSP are noteworthy changes in ASoC core.  And there're lots of
 small changes splat over the tree, as you can see in diffstat.
 
 Below are a few highlights:
 
 ALSA core:
 - Removal of set_fs() hackery from PCM core stuff, and the code
   reorganization / optimization thereafter
 - Improved support of PCM ack ops, and a new ABI for improved
   control/status mmap handling
 - Lots of constifications in various codes
 
 ASoC core:
 - The support of of-graph card, which may work as a better generic
   device for a replacement of simple-card
 - New widget types intended mainly for use with DSPs
 
 ASoC drivers:
 - New drivers for Allwinner V3s SoCs
 - Ensonic ES8316 codec support
 - More Intel SKL and KBL works
 - More device support for Intel SST Atom (mostly for cheap tablets and
   2-in-1 devices)
 - Support for Rockchip PDM controllers
 - Support for STM32 I2S and S/PDIF controllers
 - Support for ZTE AUD96P22 codecs
 
 HD-audio:
 - Support of new Realtek codecs (ALC215/ALC285/ALC289), more quirks
   for HP and Dell machines
 - A few more fixes for i915 component binding
 
 Note that of-graph change may bring the conflicts with a later pull
 request of devicetree, as currently found in linux-next.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEECxfAB4MH3rD5mfB6bDGAVD0pKaQFAllbtmMOHHRpd2FpQHN1
 c2UuZGUACgkQbDGAVD0pKaTMkhAAnqvRvh9nYBI1E2VGtJON/AFcsF4s6xdJd0ow
 Bn5Kq/07rGWxAi8Cy69LM930eQrZl+xR69I7LMkC54BxVNhvhXNef7E5GXPbRi+3
 l6dkBmkqvwmmHP5iiOxKtYSAnUfJitu1rmtAOVAjRh8rsWNeLuI8N8V/uilQBioi
 lRywdBjdylub00H1DL8cmZHbrBb4pYrL/LepTswZL3I/UZ225fMiIGFd8tXpQPwZ
 IKRZiuzrc3SykxSsL/aNeyxP+2qTYRtPfl/FGenKBBO2PJmGAb00yAdtQJRcD2eX
 Xf1alfvpNgpy/U6+C7dJgNWQvvr+lPCaFXuMukIDno/zg/xD1V1Ev/fnbVEINLve
 xMOnuJSGGaY6fu6eZ4Cck0VfZIj7UVA9x8zvBOKntIhq/VLfE7DDu3p9tiAZAVfH
 nMOLAhy+0kFyHSrv6zVWQj+cmjPwLvaW7fNWVljL5/MWuF5GJi05DUOfV/vk8BaO
 EnyVqe2ynzNLTsFpLHHy6XKgKtSTkPygxYSNuI7kSYAxD5qE6hXXKXTAqJ3LjDkO
 tGiFmxp/vHrlNvcyRjXc30th/9PPj/mRBcJ2KyjXPa63L5ZW86PiyIHKxJA4yogv
 y4z2ZlhIz90cZvpigFHtFqq1puVlDtKDbAaJ6AKrP8HEHUlMiPNApsSjWWBUcfzV
 DXzrlg0=
 =PUEh
 -----END PGP SIGNATURE-----

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

Pull sound updates from Takashi Iwai:
 "This development cycle resulted in a fair amount of changes in both
  core and driver sides. The most significant change in ALSA core is
  about PCM. Also the support of of-graph card and the new DAPM widget
  for DSP are noteworthy changes in ASoC core. And there're lots of
  small changes splat over the tree, as you can see in diffstat.

  Below are a few highlights:

  ALSA core:
   - Removal of set_fs() hackery from PCM core stuff, and the code
     reorganization / optimization thereafter
   - Improved support of PCM ack ops, and a new ABI for improved
     control/status mmap handling
   - Lots of constifications in various codes

  ASoC core:
   - The support of of-graph card, which may work as a better generic
     device for a replacement of simple-card
   - New widget types intended mainly for use with DSPs

  ASoC drivers:
   - New drivers for Allwinner V3s SoCs
   - Ensonic ES8316 codec support
   - More Intel SKL and KBL works
   - More device support for Intel SST Atom (mostly for cheap tablets
     and 2-in-1 devices)
   - Support for Rockchip PDM controllers
   - Support for STM32 I2S and S/PDIF controllers
   - Support for ZTE AUD96P22 codecs

  HD-audio:
   - Support of new Realtek codecs (ALC215/ALC285/ALC289), more quirks
     for HP and Dell machines
   - A few more fixes for i915 component binding"

* tag 'sound-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (418 commits)
  ALSA: hda - Fix unbalance of i915 module refcount
  ASoC: Intel: Skylake: Remove driver debugfs exit
  ASoC: Intel: Skylake: explicitly add the headers sst-dsp.h
  ALSA: hda/realtek - Remove GPIO_MASK
  ALSA: hda/realtek - Fix typo of pincfg for Dell quirk
  ALSA: pcm: add a documentation for tracepoints
  ALSA: atmel: ac97c: fix error return code in atmel_ac97c_probe()
  ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
  ASoC: Intel: Skylake: Add support to read firmware registers
  ASoC: Intel: Skylake: Add sram address to sst_addr structure
  ASoC: Intel: Skylake: Debugfs facility to dump module config
  ASoC: Intel: Skylake: Add debugfs support
  ASoC: fix semicolon.cocci warnings
  ASoC: rt5645: Add quirk override by module option
  ASoC: rsnd: make arrays path and cmd_case static const
  ASoC: audio-graph-card: add widgets and routing for external amplifier support
  ASoC: audio-graph-card: update bindings for amplifier support
  ASoC: rt5665: calibration should be done before jack detection
  ASoC: rsnd: constify dev_pm_ops structures.
  ASoC: nau8825: change crosstalk-bypass property to bool type
  ...
2017-07-06 10:56:51 -07:00
Linus Torvalds
81e3e04489 UUID/GUID updates:
- introduce the new uuid_t/guid_t types that are going to replace
    the somewhat confusing uuid_be/uuid_le types and make the terminology
    fit the various specs, as well as the userspace libuuid library.
    (me, based on a previous version from Amir)
  - consolidated generic uuid/guid helper functions lifted from XFS
    and libnvdimm (Amir and me)
  - conversions to the new types and helpers (Amir, Andy and me)
 -----BEGIN PGP SIGNATURE-----
 
 iQI/BAABCAApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAllZfmILHGhjaEBsc3Qu
 ZGUACgkQD55TZVIEUYMvyg/9EvWHOOsSdeDykCK3KdH2uIqnxwpl+m7ljccaGJIc
 MmaH0KnsP9p/Cuw5hESh2tYlmCYN7pmYziNXpf/LRS65/HpEYbs4oMqo8UQsN0UM
 2IXHfXY0HnCoG5OixH8RNbFTkxuGphsTY8meaiDr6aAmqChDQI2yGgQLo3WM2/Qe
 R9N1KoBWH/bqY6dHv+urlFwtsREm2fBH+8ovVma3TO73uZCzJGLJBWy3anmZN+08
 uYfdbLSyRN0T8rqemVdzsZ2SrpHYkIsYGUZV43F581vp8e/3OKMoMxpWRRd9fEsa
 MXmoaHcLJoBsyVSFR9lcx3axKrhAgBPZljASbbA0h49JneWXrzghnKBQZG2SnEdA
 ktHQ2sE4Yb5TZSvvWEKMQa3kXhEfIbTwgvbHpcDr5BUZX8WvEw2Zq8e7+Mi4+KJw
 QkvFC1S96tRYO2bxdJX638uSesGUhSidb+hJ/edaOCB/GK+sLhUdDTJgwDpUGmyA
 xVXTF51ramRS2vhlbzN79x9g33igIoNnG4/PV0FPvpCTSqxkHmPc5mK6Vals1lqt
 cW6XfUjSQECq5nmTBtYDTbA/T+8HhBgSQnrrvmferjJzZUFGr/7MXl+Evz2x4CjX
 OBQoAMu241w6Vp3zoXqxzv+muZ/NLar52M/zbi9TUjE0GvvRNkHvgCC4NmpIlWYJ
 Sxg=
 =J/4P
 -----END PGP SIGNATURE-----

Merge tag 'uuid-for-4.13' of git://git.infradead.org/users/hch/uuid

Pull uuid subsystem from Christoph Hellwig:
 "This is the new uuid subsystem, in which Amir, Andy and I have started
  consolidating our uuid/guid helpers and improving the types used for
  them. Note that various other subsystems have pulled in this tree, so
  I'd like it to go in early.

  UUID/GUID summary:

   - introduce the new uuid_t/guid_t types that are going to replace the
     somewhat confusing uuid_be/uuid_le types and make the terminology
     fit the various specs, as well as the userspace libuuid library.
     (me, based on a previous version from Amir)

   - consolidated generic uuid/guid helper functions lifted from XFS and
     libnvdimm (Amir and me)

   - conversions to the new types and helpers (Amir, Andy and me)"

* tag 'uuid-for-4.13' of git://git.infradead.org/users/hch/uuid: (34 commits)
  ACPI: hns_dsaf_acpi_dsm_guid can be static
  mmc: sdhci-pci: make guid intel_dsm_guid static
  uuid: Take const on input of uuid_is_null() and guid_is_null()
  thermal: int340x_thermal: fix compile after the UUID API switch
  thermal: int340x_thermal: Switch to use new generic UUID API
  acpi: always include uuid.h
  ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  ACPI / extlog: Switch to use new generic UUID API
  ACPI / bus: Switch to use new generic UUID API
  ACPI / APEI: Switch to use new generic UUID API
  acpi, nfit: Switch to use new generic UUID API
  MAINTAINERS: add uuid entry
  tmpfs: generate random sb->s_uuid
  scsi_debug: switch to uuid_t
  nvme: switch to uuid_t
  sysctl: switch to use uuid_t
  partitions/ldm: switch to use uuid_t
  overlayfs: use uuid_t instead of uuid_be
  fs: switch ->s_uuid to uuid_t
  ima/policy: switch to use uuid_t
  ...
2017-07-03 09:55:26 -07:00
Mark Brown
2016d5ed40 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2017-07-03 16:51:30 +01:00
Mark Brown
9b0695f74c Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2017-07-03 16:51:22 +01:00
Vinod Koul
7d3d6e0645 ASoC: Intel: Skylake: Remove driver debugfs exit
For driver debugfs, debugfs_remove_recursive() is called which is not
needed as it is already done in ASoC core debugfs. And a device managed
memory need not be freed explicitly as device core frees it up. So
remove unnecessary skl_debugfs_exit().

Fixes: 5cdf6c09ca ASoC: ("Intel: Skylake: Add debugfs support")
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-03 16:50:49 +01:00
Vinod Koul
58be77537a ASoC: Intel: Skylake: explicitly add the headers sst-dsp.h
Commit bdd0384a5a ("ASoC: Intel: Skylake: Add support to read firmware
registers") introduced firmware register read so added sst-dsp-priv.h but
missed adding sst-dsp.h as that leads to below compiler warning:

   In file included from sound/soc/intel/skylake/skl-debug.c:23:0:
>> sound/soc/intel/skylake/../common/sst-dsp-priv.h:63:42: warning:
'struct sst_pdata' declared inside parameter list [enabled by default]
     int (*init)(struct sst_dsp *sst, struct sst_pdata *pdata);
                                             ^
>> sound/soc/intel/skylake/../common/sst-dsp-priv.h:63:42: warning:
its scope is only this definition or declaration, which is probably
not what you want [enabled by default]

So add the missing header.

Fixes: bdd0384a5a ("ASoC: Intel: Skylake: Add support to read firmware registers")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-03 16:50:49 +01:00
Vunny Sodhi
bdd0384a5a ASoC: Intel: Skylake: Add support to read firmware registers
This patch adds debugfs support to read fw registers, mailbox
offsets and sram address.

Signed-off-by: Mousumi Jana <mousumix.jana@intel.com>
Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>
Signed-off-by: Vunny Sodhi <vunnyx.sodhi@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-30 13:28:06 +01:00
Guneshwor Singh
09e914d6b6 ASoC: Intel: Skylake: Add sram address to sst_addr structure
SRAM address and memory window size differ for different platforms.
So add members to sst_addr structure and initialize them in the
respective dsp_init().

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-30 13:28:03 +01:00
Vinod Koul
d14700a01f ASoC: Intel: Skylake: Debugfs facility to dump module config
Driver modules have lot of information represented in struct
skl_module_cfg. Knowing this is useful for debug, so enable
debugfs for this structure.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Vunny Sodhi <vunnyx.sodhi@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-30 13:27:55 +01:00
Vinod Koul
5cdf6c09ca ASoC: Intel: Skylake: Add debugfs support
For debug, the kernel debugfs mechanism is available. We can add various
debug options for driver like module configuration read, firmware register
read etc.

This patch adds debugfs as a child to asoc plaform component and caller is
added for skylake driver to do init and cleanup of debugfs.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Vunny Sodhi <vunnyx.sodhi@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-30 13:27:55 +01:00
Pierre-Louis Bossart
c25695ae88 ASoC: Intel: cht_bsw_rt5672: 19.2MHz clock for Baytrail platforms
Lenovo platforms use RT5670 with Baytrail, add the required
MCLK control and configuration to 19.2MHz

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-28 18:47:05 +01:00
Adam Thomson
fd0f237572 ASoC: Intel: bxt: Move codec sysclk config to codec_init function
The MCLK for DA7219 does not change in this platform, but is
currently being configured everytime as part of the platform_clock
event handler for DAPM. The upshot of this is that we have
unnecessary calls to this function, and it also means that if
a stream hasn't yet been started, DA7219 driver does not have the
correct MCLK rates programmed and so the HP detection feature does
not operate as expected.

This patch rectifies this issue by moving the sysclk call to
codec_init function so it's only called once at initialisation.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Acked-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-19 16:39:31 +01:00
Subhransu S. Prusty
1f0f8bde45 ASoC: skl_rt286: Add deepbuffer dai link
This patch adds the deepbuffer device which can be opened with a bigger
buffer size. The application can disable interrupts and sleep for longer
duration.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-19 16:33:17 +01:00
Ramesh Babu
f6e6ab1d16 ASoC: Intel: Skylake: Fix dma buffer size calculation
DMA buffer size for gateway copier will be calculated based on:

For host DMA copier:
Input buffer size (ibs) for output direction (playback)
Output buffer size (obs) for input direction (capture)

For link DMA copier:
IBS for input direction (capture)
OBS for output direction (playback)

Update the driver to use the above.

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-19 16:33:13 +01:00
Ramesh Babu
939df3ada7 ASoC: Intel: Skylake: Add deep buffer support
With this patch, the dma buffer size is fetched from topology binary. This
buffer size is applicable for gateway copier modules.

Now that we can configure DSP dma buffer size, the device can support deep
buffer playback. DSP fetches large buffer and can result fewer wakes,
which helps in power reduction.

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-19 16:33:00 +01:00
Andy Shevchenko
0931352dcb ASoC: Intel: bdw-rt5677: Switch to devm_acpi_dev_add_driver_gpios()
Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify
error path and fix potentially wrong assignment if ->probe() fails.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-16 17:53:25 +01:00
Mark Brown
1a019f3a88 Merge branch 'topic/rt5677' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel 2017-06-16 17:53:20 +01:00
Andy Shevchenko
55e59aa052 ASoC: rt5677: Move platform code to board file
GPIO ACPI mapping table is defined on platform basis. Codec driver
shouldn't have known what platform is using it.

Make codec driver more generic by moving platform code to where it
belongs.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-16 17:38:40 +01:00
Takashi Iwai
75bd90860a ASoC: intel: Use kvzalloc() for suspend buffers
Intel SST driver allocates lots of pages at suspend for saving the
firmware states, and this may occasionally lead to the allocation
error due to the high order, ending up with the suspend failure.

Use kvzalloc() so that it can fall back to vmalloc() gracefully.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-16 11:26:36 +01:00
Harsha Priya N
ad7fb5a3b8 ASoC: Intel: Add Kabylake RT5663+RT5514+MAX98927 machine driver entry
This patch adds Kabylake I2S machine driver which uses codecs
MAX98927 as speakers and RT5514 as dmic on ssp0 and
RT5663 as headset on ssp1.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Naveen M <naveen.m@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
2017-06-14 19:10:38 +01:00
Harsha Priya N
9a90c972b6 ASoC: Intel: Convert all sst_codecs data definition to c99 style
C99 style struct initialization helps in readability as well as
initialization of variables not specified as NULL. This patch
changes the struct data definitions in skl.c that were not in c99 style.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Naveen M <naveen.m@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
2017-06-14 19:10:38 +01:00
Harsha Priya N
2a18483a7f ASoC: Intel: Add Kabylake machine driver for RT5514, RT5663 and MAX98927
This patch adds Kabylake I2S machine driver which uses codecs
MAX98927 as speakers and RT5514 as dmic on ssp0 and
RT5663 as headset on ssp1.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Hsin-yu Chao <hychao@google.com>
Signed-off-by: Naveen M <naveen.m@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
2017-06-14 19:10:37 +01:00
Takashi Iwai
21031d531e ASoC: intel: bxt: Constify hw_constraints
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>
2017-06-14 10:38:12 +01:00
Andy Shevchenko
7c197881e1 ASoC: Intel: byt-max98090: Add GPIO ACPI mapping table
In order to make GPIO ACPI library stricter prepare users of
gpiod_get_index() to correctly behave when there no mapping is
provided by firmware.

Here we add explicit mapping between _CRS GpioIo() resources and
their names used in the driver.

Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Nicolas Porcel <nicolasporcel06@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13 21:39:47 +01:00
Takashi Iwai
617647ae28 ASoC: intel: skl: Constify hw_constraints
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>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13 21:29:38 +01:00
Takashi Iwai
1ebb4d9dbf ASoC: intel: byt: Constify hw_constraints
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>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13 21:29:37 +01:00
Daniel Drake
a03bdaa565 ASoC: Intel: add machine driver for BYT/CHT + ES8316
Add new machine driver, tested with Weibu F3C MiniPC.

Based heavily on code provided by David Yang @ Everest, and other
machine drivers in the same directory.

Signed-off-by: David Yang <yangxiaohua@everest-semi.com>
[drake@endlessm.com: cleanups and modernization]
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13 19:31:19 +01:00
Andy Shevchenko
94116f8126 ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
bytes. Instead we convert them to use guid_t type. At the same time we
convert current users.

acpi_str_to_uuid() becomes useless after the conversion and it's safe to
get rid of it.

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Cc: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2017-06-07 12:20:49 +02:00
Dharageswari R
e8883cb61a ASoC: Intel: Boards: Add 4-channel DMIC fixup.
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>
2017-06-06 20:00:43 +01:00
Dharageswari R
7a1b749b34 ASoC: Intel: Skylake: Add enum control for mic selection
User may prefer to select data from particular mics. A mic-select module
in DSP allows this selection.

Create possible enum controls to allow user to select a combination of
mics to capture data from. Based on the user selection, parameters are
generated and passed to mic-select module during init.

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>
2017-06-06 20:00:43 +01:00
Dharageswari R
db6879efb9 ASoC: Intel: Skylake: Add mic-select module type
mic-select module is a DSP module, which is used to select one or more
input channels.

This patch adds mic-select module type.

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>
2017-06-06 20:00:43 +01:00
Douglas Anderson
98cf2c03b4 ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used
In commit 9a075265c6 ("ASoC: Intel: sst: Remove unused function
sst_restore_shim64()"), we deleted the sst_restore_shim64() since it
was never used.  ...but a quick look at the code shows that we should
also be able to remove the sst_save_shim64() function and the
structure members we were storing data in.

Once we delete sst_save_shim64() there are no longer any users of the
'sst_shim_regs64' structure.  That means we can delete it completely
and also avoid allocating memory for it.  This saves a whopping 136
bytes of devm allocated memory.  We also get the nice benefit of
avoiding an error path in the init code.

Note that the saving code that we're removing (and the comments
talking about how important it is to do the save) has been around
since commit 336cfbb05e ("ASoC: Intel: mrfld- add ACPI module").

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-06 19:58:49 +01:00
Naveen M
0809d9871d ASoC: Intel: Add Kabylake RT5663+MAX98927 machine driver entry
Adds kbl_rt5663_max98927_i2s machine driver entry into machine table

Signed-off-by: Naveen M <naveen.m@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:27:54 +01:00
Naveen M
ec040dd5ef ASoC: Intel: Add Kabylake Realtek Maxim machine driver
This patch adds Kabylake I2S machine driver which uses codecs
MAX98927 as speakers and RT5663 as headset, configured to ssp0
& ssp1 respectively.

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:27:50 +01:00
Naveen M
54746dabf7 ASoC: Improve machine driver selection based on quirk data
Use quirk function to select the correct machine driver
by checking all codecs instead of only one based on quirk data.

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:27:47 +01:00
Naveen M
7827d66946 ASoC: Move quirk to identify correct machine driver
sst_acpi_mach has a quirk field to handle board specific quirks.
Patch moves quirk call to sst_acpi_find_machine() instead of calling
it in respective driver

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:27:43 +01:00
Naveen M
915ae2b9f0 ASoC: Intel: Create a helper to search for matching machine
Create a helper function to search for a matching machine
based on HID. No functional change

Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:27:39 +01:00
Naveen M
9bf70cd4cd ASoC: Intel: Convert skl machine data to C99 style
C99 style struct initialization helps in readability as well as
initialization of variables not specified as NULL.
Patch modifies all skl machine data.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:27:33 +01:00
Naveen M
edc692e505 ASoC: Intel: Convert atom machine data to C99 style
C99 style struct initialization helps in readability as well as
initialization of variables not specified as NULL.
Patch modifies all atom machine data.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Naveen M <naveen.m@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:27:28 +01:00
Shreyas NC
133e6e5c27 ASoC: Intel: Skylake: Support for multiple data blocks
Module init params are additional data block in the module private data.
Skylake driver doesn't yet have support to parse multiple data blocks if
it appears in private data. Add support for parsing of multiple data
blocks and module init params.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:25:49 +01:00
Shreyas NC
0a71677691 ASoC: Intel: Skylake: Fix to parse consecutive string tkns in manifest
Element size in the manifest should be updated for each token, so that the
loop can parse all the string elements in the manifest. This was not
happening when more than two string elements appear consecutively, as it is
not updated with correct string element size. Fixed with this patch.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:25:25 +01:00
Pardha Saradhi K
5cd1f5c321 ASoC: Intel: Skylake: Fix IPC rx_list corruption
In SKL+ platforms, all IPC commands are serialised, i.e. the driver sends
a new IPC to DSP, only after receiving a reply from the firmware for the
current IPC.

Hence it seems apparent that there is only a single modifier of the IPC RX
List. However, during an IPC timeout case in a multithreaded environment,
there is a possibility of the list element being deleted two times if not
properly protected.

So, use spin lock save/restore to prevent rx_list corruption.

Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:25:12 +01:00
Matthias Kaehlcke
9a075265c6 ASoC: Intel: sst: Remove unused function sst_restore_shim64()
Looks like the function has never been used since it was added by commit
b0d94acd63 ("ASoC: Intel: mrfld - add shim save restore"). Removing it
fixes the following warning when building with clang:

sound/soc/intel/atom/sst/sst.c:360:20: error: unused function
    'sst_restore_shim64' [-Werror,-Wunused-function]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:21:55 +01:00
Matthias Kaehlcke
140385d87a ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai()
Looks like the function has never been used since it was added by commit
17119a4657 ("ASoC: Intel: Add Cherrytrail & Braswell machine driver
cht_bsw_max98090_ti"). Removing it fixes the following warning when
building with clang:

sound/soc/intel/boards/cht_bsw_max98090_ti.c:42:35: error: unused
    function 'cht_get_codec_dai' [-Werror,-Wunused-function]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24 18:12:04 +01:00
Colin Ian King
3c0a98c595 ASoC: Intel: sst: fix spelling mistake: "allocationf" -> "allocation"
Trivial fix to spelling mistake in dev_err message. Also replace "fail"
with "failure".

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-14 19:09:13 +09:00
Takashi Sakamoto
65db85fba1 ASoC: intel: atom: localize variable without external linkage
A driver for Intel SST driver for old atom platform includes a variable
which has no external linkage. These functions should have static
qualifier.

This commit adds the qualifier to localize the variable. This issue is
detected by sparse:

sst.c:261:1: warning: symbol 'dev_attr_firmware_version' was not declared. Should it be static?

Cc: Sebastien Guiriec <sebastien.guiriec@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-14 19:00:44 +09:00
Subhransu S. Prusty
c0116be3d1 ASoC: Intel: Skylake: Fix typo for token d0i3 caps
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-14 18:49:17 +09:00
Vinod Koul
ab1b732d53 ASoC: Intel: Skylake: Move i915 registration to worker thread
The i915 component framework expects the caller to be invoking
snd_hdac_i915_init() from a thread context. Otherwise it results in
lockups on drm side.

So move the registering of component interface and probing of codecs on
this bus to a worker thread.

init_failed in skl structure is not used currently, so renamed to
init_done and used to track the initialization done in worker thread.

Reported-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sodhi, VunnyX <vunnyx.sodhi@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-14 18:48:57 +09:00
Takashi Iwai
a5c3b32a11 ASoC: Updates for v4.12
A quiet release for the core, but lots of new drivers this time around:
 
  - A new, generalized, API for hooking up jacks which makes it easier to
    write generic machine drivers for simple cases.
  - Continuing fixes for issues with the x86 CPU drivers.
  - New drivers for Cirrus CS35L35, DIO DIO2125, Everest ES7132,
    HiSilicon hi6210, Maxim MAX98927, MT2701 systems with WM8960, Nuvoton
    NAU8824, Odroid systems, ST STM32 SAI controllers and x86 systems with
    DA7213
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlkH9Q4THGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0D24B/4oQ67H01Tcq0ghrIsr/UNQnPi+ywx2
 e5nkWNvWTM7gSUDOFjmD3ZM07Gf66IIyiFFSt6w93/lDQaOcGgsmBo9tnujR7ytQ
 XXUiE1bvx7liZ09/2Rq7DyDXTpYcFAbxLdWt8uGs72misj0XrVToVFJhl5YcMRBE
 qnbV1woxQwIvJ5m+GmbW2NZ8bRCnnsMQbBWCIWOtvSPhtZQlQ+m7waYTVn3/ieGR
 cWIHwY4lSZycqaYDWZ+RPFipcAwzKTNt0MiXoCI02EX95275AbIHdWAgrVta04Al
 muWP1XTkufO73NFqfvEF+Rrpi69pRCNhAS7TJY++d1moKCYgSpG8bAvD
 =W3eF
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v4.12

A quiet release for the core, but lots of new drivers this time around:

 - A new, generalized, API for hooking up jacks which makes it easier to
   write generic machine drivers for simple cases.
 - Continuing fixes for issues with the x86 CPU drivers.
 - New drivers for Cirrus CS35L35, DIO DIO2125, Everest ES7132,
   HiSilicon hi6210, Maxim MAX98927, MT2701 systems with WM8960, Nuvoton
   NAU8824, Odroid systems, ST STM32 SAI controllers and x86 systems with
   DA7213
2017-05-02 08:25:25 +02:00
Takashi Iwai
d7dc450d5a Merge branch 'for-next' into for-linus
For 4.12 merge.
2017-05-02 08:24:42 +02:00
Mark Brown
0c2964cb38 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2017-04-30 22:15:41 +09:00
Mark Brown
ec7f9844ef ASoC: Fixes for v4.11
A few last minute fixes for v4.11, the STI fix is relatively large but
 driver specific and has been cooking in -next for a little while now:
 
  - A fix from Takashi for some suspend/resume related crashes in the
    Intel drivers.
  - A fix from Mousumi Jana for issues with incorrectly created
    enumeration controls generated from topology files which could cause
    problems for userspace.
  - Fixes from Arnaud Pouliquen for some crashes due to races with the
    interrupt handler in the STI driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlj/auUTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0JEJB/9fZoEPm2Flfp9d4tXDmNihyv/STARr
 UbIIBxJUsDG2U6nMxv1kTKRk/9puuzDfNjt4giiLyMNDMbh4G5QRbgMF53ryeTuM
 8Nqq6PEvhZ4/YftOnh4uD4PmsVKTV8OauQDzZquLPB9/lRF6wLvSskSfZXTsYbv9
 Oem4Sop1XzXt68cUIcMHQlwXrhxIaQUHiOS8QfhQXNw1y5xgGB5Rj0ak5fWdn+KY
 6j10ldQgrwYSCx4zbqLsS6Fjlo2zdUj/Rn7fQrarzsjQtrZq+k6iYvAWAblkMhWi
 7hL/RK4U0konSeo12ftIESDpZFjW2Yi9Q74+4i6soEYbOVTzMam+XMo+
 =qmpO
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.11-rc7' into asoc-linus

ASoC: Fixes for v4.11

A few last minute fixes for v4.11, the STI fix is relatively large but
driver specific and has been cooking in -next for a little while now:

 - A fix from Takashi for some suspend/resume related crashes in the
   Intel drivers.
 - A fix from Mousumi Jana for issues with incorrectly created
   enumeration controls generated from topology files which could cause
   problems for userspace.
 - Fixes from Arnaud Pouliquen for some crashes due to races with the
   interrupt handler in the STI driver.

# gpg: Signature made Wed 26 Apr 2017 00:27:33 KST
# gpg:                using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0
# gpg:                issuer "broonie@kernel.org"
# gpg: key 0D9EACE2CD7BEEBC: no public key for trusted key - skipped
# gpg: key 0D9EACE2CD7BEEBC marked as ultimately trusted
# gpg: key CCB0A420AF88CD16: no public key for trusted key - skipped
# gpg: key CCB0A420AF88CD16 marked as ultimately trusted
# gpg: key 162614E316005C11: no public key for trusted key - skipped
# gpg: key 162614E316005C11 marked as ultimately trusted
# gpg: key A730C53A5621E907: no public key for trusted key - skipped
# gpg: key A730C53A5621E907 marked as ultimately trusted
# gpg: key 276568D75C6153AD: no public key for trusted key - skipped
# gpg: key 276568D75C6153AD marked as ultimately trusted
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" [ultimate]
# gpg:                 aka "Mark Brown <broonie@debian.org>" [ultimate]
# gpg:                 aka "Mark Brown <broonie@kernel.org>" [ultimate]
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>" [ultimate]
# gpg:                 aka "Mark Brown <broonie@linaro.org>" [ultimate]
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>" [ultimate]
2017-04-30 22:15:35 +09:00
Guneshwor Singh
081dc8ab46 ASoC: Intel: Skylake: Return negative error code
skl_tplg_add_pipe() returned EEXIST instead of negative EEXIST, so fix that
and handle the return value as well.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-30 21:50:28 +09:00
Vinod Koul
9ed4aefe6f ASoC: Intel: Skylake: Fix unused variable warning
With compiler option W=1, we have one more warning in the driver for
'set but unused variable', so remove the unused variable to fix it.

sound/soc/intel/skylake/skl-pcm.c: In function ‘skl_platform_open’:
sound/soc/intel/skylake/skl-pcm.c:954:26: warning: variable ‘runtime’ set but not used [-Wunused-but-set-variable]
  struct snd_pcm_runtime *runtime;

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-30 21:50:14 +09:00
Arnd Bergmann
351d74e4d7 ASoC: Intel: Skylake: fix uninitialized pointer use
The error handling in bxt_sst_dsp_init() got changed in a way that
it now derefences an uninitialized pointer when printing a warning
about the device not being found:

sound/soc/intel/skylake/bxt-sst.c: In function 'bxt_sst_dsp_init':
sound/soc/intel/skylake/bxt-sst.c:567:14: error: 'skl' may be used uninitialized in this function [-Werror=maybe-uninitialized]

As we do have a valid device pointer available at the call site,
let's use that instead.

Fixes: 9fe9c71192 ("ASoC: Intel: Skylake: Move sst common initialization to a helper function")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-30 21:46:49 +09:00
Sodhi, VunnyX
b6726009af ASoC: Intel: Skylake: Add loadable module support on KBL platform
Kabylake platform expects modules in a library manifest. After loading
base firmware library manifest is loaded using load library IPC. This is
followed by module load using load multiple modules IPC.

Signed-off-by: Sodhi, VunnyX <vunnyx.sodhi@intel.com>
Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-26 15:47:53 +01:00
Subhransu S. Prusty
100e7f396d ASoC: Intel: Skylake: Modify load_lib_ipc arguments for a nowait version
Kabylake uses code loader dma and wait on notification instead of ipc
reply for load library ipc status. So modify the argument of
skl_sst_ipc_load_library to check on flag to wait for ipc reply.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-26 15:47:49 +01:00
Subhransu S. Prusty
89b0d8a5ba ASoC: Intel: Skylake: Register dsp_fw_ops for kabylake
For audio kabylake is same as skylake except the module load approach.
This patch registers different dsp_fw_ops for kabylake and next patch
adds the module load support for kabylake.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-26 15:47:45 +01:00
G Kranthi
4e0277d226 ASoC: Intel: Skylake: Modify arguments to reuse module transfer function
Kabylake also uses code loader dma for module load and library load.
skl_transfer_module can be reused. Modify the arguments to include
library index to be passed to lib load ipc and module/lib check to use
correct ipc for lib/module load.

Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-26 15:47:41 +01:00
Subhransu S. Prusty
ebe8907687 ASoC: Intel: Skylake: Commonize library load
request firmware, strip extended manifest and release library changes
are common to kabylake and APL.

So move these common code to utils to be reused in later patches for
kabylake library load.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-26 15:47:37 +01:00
G Kranthi
9fe9c71192 ASoC: Intel: Skylake: Move sst common initialization to a helper function
Some skl sst context are not dependent of platform and initializing them
independently for each platform can lead to errors. So optimize by
moving them to a helper function and platform specific init code can
call this.

Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-26 15:47:28 +01:00
Takashi Iwai
d4a2fbcee0 ASoC: Fixes for v4.11
A few last minute fixes for v4.11, the STI fix is relatively large but
 driver specific and has been cooking in -next for a little while now:
 
  - A fix from Takashi for some suspend/resume related crashes in the
    Intel drivers.
  - A fix from Mousumi Jana for issues with incorrectly created
    enumeration controls generated from topology files which could cause
    problems for userspace.
  - Fixes from Arnaud Pouliquen for some crashes due to races with the
    interrupt handler in the STI driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlj/auUTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0JEJB/9fZoEPm2Flfp9d4tXDmNihyv/STARr
 UbIIBxJUsDG2U6nMxv1kTKRk/9puuzDfNjt4giiLyMNDMbh4G5QRbgMF53ryeTuM
 8Nqq6PEvhZ4/YftOnh4uD4PmsVKTV8OauQDzZquLPB9/lRF6wLvSskSfZXTsYbv9
 Oem4Sop1XzXt68cUIcMHQlwXrhxIaQUHiOS8QfhQXNw1y5xgGB5Rj0ak5fWdn+KY
 6j10ldQgrwYSCx4zbqLsS6Fjlo2zdUj/Rn7fQrarzsjQtrZq+k6iYvAWAblkMhWi
 7hL/RK4U0konSeo12ftIESDpZFjW2Yi9Q74+4i6soEYbOVTzMam+XMo+
 =qmpO
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.11

A few last minute fixes for v4.11, the STI fix is relatively large but
driver specific and has been cooking in -next for a little while now:

 - A fix from Takashi for some suspend/resume related crashes in the
   Intel drivers.
 - A fix from Mousumi Jana for issues with incorrectly created
   enumeration controls generated from topology files which could cause
   problems for userspace.
 - Fixes from Arnaud Pouliquen for some crashes due to races with the
   interrupt handler in the STI driver.
2017-04-25 17:43:56 +02:00
Pierre-Louis Bossart
cb67d76516 ASoC: bytcr_rt5640: log quirk configuration errors
Now that quirks can be overridden with a module parameter,
log errors so that non-sensical quirks introduced by mistake
are identified.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-25 16:39:42 +01:00
Takashi Iwai
0b2c9f88b9 ASoC: bytcr_rt5640: Fix a typo and quirk parameter type
The previous patch for adding the quirk module option had a typo in
its info print, which results in a weird output.  Also, the parameter
type should be rather unsigned int instead of signed int.

Fixes: 9f2cf73ed6 ("ASoC: bytcr_rt5640: Allow quirk set via module option")
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-25 16:39:42 +01:00
Takashi Iwai
6e4cac23c5 ASoC: intel: Fix PM and non-atomic crash in bytcr drivers
The FE setups of Intel SST bytcr_rt5640 and bytcr_rt5651 drivers carry
the ignore_suspend flag, and this prevents the suspend/resume working
properly while the stream is running, since SST core code has the
check of the running streams and returns -EBUSY.  Drop these
superfluous flags for fixing the behavior.

Also, the bytcr_rt5640 driver lacks of nonatomic flag in some FE
definitions, which leads to the kernel Oops at suspend/resume like:

  BUG: scheduling while atomic: systemd-sleep/3144/0x00000003
  Call Trace:
   dump_stack+0x5c/0x7a
   __schedule_bug+0x55/0x70
   __schedule+0x63c/0x8c0
   schedule+0x3d/0x90
   schedule_timeout+0x16b/0x320
   ? del_timer_sync+0x50/0x50
   ? sst_wait_timeout+0xa9/0x170 [snd_intel_sst_core]
   ? sst_wait_timeout+0xa9/0x170 [snd_intel_sst_core]
   ? remove_wait_queue+0x60/0x60
   ? sst_prepare_and_post_msg+0x275/0x960 [snd_intel_sst_core]
   ? sst_pause_stream+0x9b/0x110 [snd_intel_sst_core]
   ....

This patch addresses these appropriately, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org> # v4.1+
2017-04-25 15:54:30 +01:00
Takashi Iwai
9f2cf73ed6 ASoC: bytcr_rt5640: Allow quirk set via module option
The bytcr-rt5640 driver has a few quirk setups depending on the board,
where the quirk value is set by DMI matching.  When you have a new
device to add the support, you often experience to try the different
quirk by trial-and-error.  Or, you may have a development model that
still has no proper DMI string.  In either case, you'd need to compile
the driver at each time.

This patch introduces a module option to override the quirk value on
the fly.  User can boot like snd-soc-sst-bytcr-rt5640.quirk=0x4004 to
override the default value without recompilation.  It's a raw value,
so user needs to check the source code for the meaning of each bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-24 18:48:07 +01:00
Takashi Iwai
861886d338 ASoC: Call snd_soc_set_dmi_name() unconditionally
Since recently UCM can pick up a configuration specific to the board
via card longname field, and we introduced a helper function
snd_soc_set_dmi_name() for that.  So far, it was used only in one
place (sound/soc/intel/boards/broadwell.c), but it should be more
widely applied.

This patch puts a big hammer for that: it lets snd_soc_register_card()
calling snd_soc_set_dmi_name() unconditionally, so that all x86
devices get the better longname string.  This would have no impact for
other systems without DMI support, as snd_soc_set_dmi_name() is no-op
on them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-24 18:47:17 +01:00
Dan Carpenter
550b349af0 ASoC: Intel: Skylake: Fix a couple user after free bugs
We need to use the _safe() version of list_for_each_entry() here because
of the kfree(modules).

Fixes: b8c722ddd5 ("ASoC: Intel: Skylake: Add support for deferred DSP module bind")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-21 18:00:33 +01:00
Dan Carpenter
e6a33532af ASoC: Intel: Skylake: Uninitialized variable in probe_codec()
My static checker complains that if snd_hdac_bus_get_response() returns
-EIO then "res" is uninitialized.  Fix this by initializing it to -1 so
that the error is handled correctly.

Fixes: d8c2dab838 ("ASoC: Intel: Add Skylake HDA audio driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-21 17:57:38 +01:00
Pierre-Louis Bossart
beb5989a8c ASoC: Intel: Atom: update Thinkpad 10 quirk
There are multiple skews of the same Lenovo audio hardware
based on the Realtek RT5670 codec.

Manufacturer: LENOVO
        Product Name: 20C1CTO1WW
        Version: ThinkPad 10

Manufacturer: LENOVO
	Product Name: 20C3001VHH
	Version: ThinkPad 10

Manufacturer: LENOVO
	Product Name: 20C10024GE
	Version: ThinkPad Tablet B

Manufacturer: LENOVO
	Product Name: 20359
	Version: Lenovo Miix 2 10

For all these devices, the same quirk is used to force
the machine driver to be based on RT5670 instead of RT5640
as indicated by the BIOS.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691
Tested-by: Nicole Faerber <nicole.faerber@dpin.de>
Tested-by: Viacheslav Ostroukh <v.dev@ostroukh.me>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-18 18:19:04 +01:00
Jeeja KP
b8c722ddd5 ASoC: Intel: Skylake: Add support for deferred DSP module bind
Module at the end of DSP pipeline that needs to be connected to a module
in another pipeline are represented as a PGA(leaf node) and in PGA event
handler these modules are bound/unbounded. Modules other than PGA leaf
can be connected directly or via switch to a module in another pipeline.
Example: reference path.

To support the deferred DSP module bind, following changes are done:
o When the path is enabled, the destination module that needs to be
bound may not be initialized. If the module is not initialized, add
these modules in a deferred bind list.
o When the destination module is initialized, check for these modules
in deferred bind list. If found, bind them.
o When the destination module is deleted, Unbind the modules.
o When the source module is deleted, remove the entry from the deferred
bind list.

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>
2017-04-12 16:57:52 +01:00
Takashi Iwai
b7c5ac88e8 Merge branch 'for-linus' into for-next 2017-04-12 07:16:07 +02:00
Takashi Iwai
70eafad849 ALSA: hda - Move SKL+ vendor specific register definitions to hda_register.h
They may be used by both legacy and ASoC drivers.

Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-03 08:43:07 +02:00
Colin Ian King
5f75b19ef9 ASoC: Intel: bxtn: fix spelling mistake: "Timout" -> "Timeout"
trivial fix to spelling mistake in dev_err error message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-30 11:15:30 +01:00
Jeeja KP
473a4d516c ASoC: Intel: Skylake: Fix module state after unbind and delete
When DSP module is unbound, the module state needs to be in INIT_DONE
state instead of UNINT. Also the state needs to be set to UNINIT after
module is deleted from DSP pipeline.

So, set the module state to INIT_DONE after unbind and then UNINIT after
module is deleted.

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>
2017-03-29 12:53:43 +01:00
Hardik T Shah
fdd85a054b ASoC: Intel: Skylake: Fix DMA position reporting for capture stream
As per hardware recommendation, for every capture stream completion
following operations need to be done in order to reflect the actual
data that is received in position buffer.

1. Wait for 20us before reading the DMA position in buffer once the
interrupt is generated for stream completion.
2. Read any of the register to flush the DMA position value. This is
dummy read operation.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Hardik T Shah <hardik.t.shah@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>
2017-03-29 12:53:39 +01:00
Jeeja KP
b26199eae8 ASoC: Intel: Skylake: Rearrangement of code to cleanup SKL SST library
Skylake driver topology header/driver structure is referenced and used
in SST library which creates circular dependency. Hence the
rearrangement.

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>
2017-03-29 12:53:34 +01:00
Vinod Koul
6ad0005f17 ASoC: Intel: Skylake: remove hard coded ACPI path
We should not hard code the ACPI path to get acpi_handle. Instead use
ACPI_HANDLE macro to do the job.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-29 12:53:32 +01:00
Vinod Koul
9a1e350709 ASoC: Intel: Skylake: Remove redundant vmixer handler
Initially vmixer and mixer widget handlers were bit different, but over
time they became same so remove the duplicate code.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-29 12:53:30 +01:00
Vinod Koul
f7ea77772d ASoC: Intel: Skylake: Don't unload module when in use
A module may have multiple instances in DSP, so unload only when usage
count is zero.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-29 12:53:27 +01:00
G Kranthi
e59ed0875b ASoC: Intel: Skylake: Add 16-bit constraint to FE bxt_rt298 machine
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>
2017-03-29 12:53:24 +01:00
Jeeja KP
7f975a385b ASoC: Intel: Skylake: Use the sig_bits to define dai bps capability
For calculating the HDA DMA format, use the max_bps supported by the
DAI caps instead of fixing it to 32/24. For host DMA the Max bps support
is 32, but in case of link DMA, this depends on the codec capability.
So use the sig_bits to define the bps supported by dai.

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>
2017-03-29 12:53:06 +01:00
Colin Ian King
74a4ce4c8e ASoC: intel: remove unused variable data and associated code
The variable 'data' is assigned null and never re-assigned. There
is also a redundant check for data being non-null which is always
false, so remove this and the variable data and dma_addr as they
are not used once the dead code has been removed.

Detected with CoverityScan, CID#1324015 ("'Constant' variable gaurds
dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-27 12:31:43 +01:00
Takashi Iwai
36d96039e7 ASoC: intel: Don't print FW version repeatedly
Intel SST driver spews an info message "FW Versoin xxxx" at each time
the device gets initialized.  Since it's triggered at each PM (or even
runtime PM), it appears so ofetn, and rather becomes annoying than
useful.

This patch suppresses the superfluous messages by checking the
currently loaded FW version with the previously loaded one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-27 12:30:55 +01:00
Harsha Priya
d7fba9dcf6 ASoC: Intel: Update bxt_da7219_max98357a to add a new
This patch adds a platform clock widget to turn off the clock only when
both headset capture and headset playback are not in use. This removes
turning off the clock in hw_free so that the clock is on when
either capture or playback of headset is in progress.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-21 18:43:32 +00:00
Dharageswari R
bf3e5ef5d5 ASoC: Intel: Skylake: Fix parameter overwrite for KPB Module
KPB module default parameter were overwritten by the dynamic instance
id once use case is executed. This will cause module crash from
subsequent execution of use case as the updated parameters are used.

So instead of over writing the default parameter, make a copy and
update the module parameter and use this in IPC message.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Kranthikumar, GudishaX <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>
2017-03-15 17:28:22 +00:00
Jeeja KP
b7d0254c51 ASoC: Intel: Skylake: Fix module load when module size > DMA buffer size
When module size > DMA buffer size, driver copies first chunk and waits
for the BDL complete interrupt. BDL complete interrupt never occurs and
wait time expires as module load IPC is not send to start the DMA from
DSP.

To fix the above issue need to follow the below steps:
1. After copying the first chunk, send the module load IPC to start the
DMA.
2. Wait for the BDL interrupt. Once interrupt is received, copy the
next chunk.
3. Continue step 2 till all bytes are copied.
4. When all the bytes are copied (bytes_left = 0), wait for module load
IPC response
5. Handled module load IPC response messages, check the load module IPC
response and wake up the thread to complete module load.

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>
2017-03-15 17:28:18 +00:00
G Kranthi
7bd86a3059 ASoC: Intel: Skylake: Remove get dsp_ops in cleanup routine
dsp ops is already set in init, so use this in cleanup routine
instead of again retrieving it. Also constify struct skl_dsp_ops.

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>
2017-03-15 17:28:15 +00:00
G Kranthi
cb729d80b5 ASoC: Intel: Skylake: Disable notifications at boot after DSP FW init
DSP firmware sends notification every 1ms, which is disabled in runtime
suspend. But if a system has no runtime pm, we keep getting
notification, so disable after FW init as well.

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>
2017-03-15 17:28:11 +00:00
Jeeja KP
3643ff10d4 ASoC: Intel: Skylake: Remove BE prepare ops
Remove BE prepare ops which enables MCLK by default. If MCLK is required
to be enabled for any specific platform, it needs to be enabled in the
corresponding machine driver.

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>
2017-03-15 17:28:08 +00:00
Jeeja KP
03de8c2ef8 ASoC: Intel: bxtn: Reload the firmware in case of D3 failure
If D3 IPC fails or times out, firmware needs to be reloaded as driver
continues the reset.
So set the fw_load flag to false to reload the firmware in D0.

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>
2017-03-15 17:28:04 +00:00
Jeeja KP
1fb344a33a ASoC: Intel: bxtn: Update DSP core state in D0
In system suspend, firmware needs to be re-downloaded as IMR is cleared.
When firmware is downloaded in D0, core state is not set to running
state causing instability with subsequent D0-D3 cycles.

So set the core state correctly during D0 and check the DSP core state
if not in reset to set the DSP to D3.

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>
2017-03-15 17:28:01 +00:00
Jeeja KP
5518af9f97 ASoC: Intel: bxtn: Disable interrupt when DSP is in D3
When DSP is in D3, no interrupts are expected, so disable
interrupt while entering D3.

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>
2017-03-15 17:27:58 +00:00
Guneshwor Singh
3b563e0a84 ASoC: Intel: Skylake: Fix not to stop src pipe in pre pmd event handler
If the widget is a mixin module, just unbind between source and sink
and don't stop the source pipe as there can be multiple sinks
connected.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@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>
2017-03-15 17:27:54 +00:00
Jeeja KP
6914968b82 ASoC: Intel: Skylake: Fix to delete DSP pipe after stopping pipe
DSP pipe needs to stopped before deleting the pipe. Currently check is
for pipe state > STARTED, which is incorrect. So changed to include
pipe state STARTED to stop the pipe if it started.

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>
2017-03-15 17:27:44 +00:00
Pierre-Louis Bossart
a9b6567d03 ASoC: Intel: Enable bytcht_nocodec machine driver
Make sure this machine driver is only used if enabled explicitly
and if there is no information found in the SSDT.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:41:18 +00:00
Pierre-Louis Bossart
759db1c466 ASoC: Intel: boards: add card for MinnowBoardMax/Up I2S access
Add card with dummy codec and DAI to make I2S signals observable.
Uses Mic and Speaker pins/widgets to control DAPM

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:41:15 +00:00
Pierre-Louis Bossart
a63b8a117d ASoC: Intel: Atom: enable BYT/CHT+DA7213 machine driver
Add entries in HID table and reference to bytcht_da7213 driver

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:41:11 +00:00
Pierre-Louis Bossart
82cf89de2c ASoC: Intel: add machine driver for BYT/CHT + DA7213
Add new machine driver, tested with Ard-Audio-DA7212 [1]
connected to MinnowBoardMAX Turbot.

The MCLK is managed by the codec driver using the "mclk" handle
to reuse existing code, but it could just as well be handled
by this machine driver.

[1] http://www.dialog-semiconductor.com/content/ard-audio-da7212

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:41:06 +00:00
Takashi Sakamoto
998d6fb512 ASoC: Intel: Skylake: code cleanup for pin fixup limitation
As a commit 4cd9899f0d ("ASoC: Intel: Skylake: Add multiple pin
formats") describes, 'fixups is applied to pin 0 only'. On the other
hand, the commit left some codes as what they were. This might
confuses readers.

This commit fixes the issue. This doesn't change driver behaviour at all.

Fixes: 4cd9899f0d ("ASoC: Intel: Skylake: Add multiple pin formats")
Signed-off-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:07:41 +00:00
Takashi Sakamoto
8e15e762cd ASoC: Intel: Skylake: use a helper macro to rounding-up calculation
In 'include/linux/kernel.h', there's a helper macro to round numerical
value. Let's use it.

Signed-off-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 11:02:42 +01:00
Takashi Sakamoto
d1a6fe41d3 ASoC: Intel: Skylake: fix invalid memory access due to wrong reference of pointer
In 'skl_tplg_set_module_init_data()', a pointer to 'params' member of
'struct skl_algo_data' is calculated, then casted to (u32 *) and assigned
to a member of configuration data. The configuration data is passed to the
other functions and used to process intel IPC. In this processing, the
value of member is used to get message data, however this can bring invalid
memory access in 'skl_set_module_params()' as a result of calculation of
a pointer for actual message data.

(sound/soc/intel/skylake/skl-topology.c)
skl_tplg_init_pipe_modules()
->skl_tplg_set_module_init_data() (has this bug)
->skl_tplg_set_module_params()
  (sound/soc/intel/skylake/skl-messages.c)
  ->skl_set_module_params()
    ((char *)param) + data_offset

This commit fixes the bug.

Fixes: abb740033b ("ASoC: Intel: Skylake: Add support to configure module params")
Signed-off-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org> # v4.5+
2017-03-07 15:19:39 +01:00
Jeeja KP
7d3f91dc1e ASoC: Intel: bxtn: optimize ROM init retries
During S3->S0 transition, sometime ROM init fails because of
authentication engine loads later than the OS. In this case driver
waits for a longer period and then retries the FW download causing
huge delay in resume time of audio device.

To avoid this, ROM INIT wait time is set to a optimal value and
increased the retries for firmware download.

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>
2017-03-07 13:48:01 +01:00
Jeeja KP
31d648f051 ASoC: Intel: bxtn: Store the FW/Library context at boot
Store the DSP firmware/library at boot, so that for S3 to S0 transition
use the stored ctx for downloading the firmware to DSP memory.

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>
2017-03-07 13:47:34 +01:00
Andy Shevchenko
b3ec72ace9 ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()
Since index is always 0 replace devm_gpiod_get_index() by devm_gpiod_get()
and apply proper flags.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:46:38 +01:00
Colin Ian King
08458871b6 ASoC: Intel: Skylake: fix spelling mistake: "allocationf" -> "allocation"
Trivial fix to spelling mistake in dev_err message.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:46:02 +01:00
Mark Brown
16b5711485 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2017-02-19 16:35:45 +00:00
Mark Brown
5bf3db18db Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2017-02-19 16:35:34 +00:00
Jeeja KP
7ba8ba3f4f ASoC: Intel: bxt: Add jack port initialize in bxt_rt298 machine
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>
2017-02-17 11:24:13 +00:00
Vinod Koul
2550486343 ASoC: Intel: Skylake: Add Geminlake IDs
Geminilake is next gen SoC, so add the IDs for Geminilake.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:58:09 +00:00
Senthilnathan Veppur
db2f586b80 ASoC: Intel: Skylake: Check device type to get endpoint configuration
Geminilake has two different devices connected to the same SSP, so use
device_type check to get correct device configuration.

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:58:09 +00:00
Jeeja KP
c5cf9f37a0 ASoC: Intel: bxt: Add jack port initialize in da7219_max98357a machine
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>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:57:15 +00:00
Jeeja KP
86b5703158 ASoC: Intel: Skylake: Add jack port initialize in nau88l25_ssm4567 machine
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>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:56:19 +00:00
Jeeja KP
565f13a95e ASoC: Intel: Skylake: Add jack port initialize in nau88l25_max98357a machine
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>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:56:15 +00:00
Jeeja KP
64f8620d48 ASoC: Intel: Skylake: Add jack port initialize in rt286 machine
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>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:56:12 +00:00
Jeeja KP
625de2bf2e ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_da7219_max98357 machine
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in bxt_da7219_max98357 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>
2017-02-16 18:56:03 +00:00
Jeeja KP
7932b8ace3 ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_rt298 machine
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>
2017-02-16 18:55:59 +00:00
Jeeja KP
9e4278cd9b ASoC: Intel: Skylake: Create ASoC jack for hdmi in nau88l25_ssm4567 machine
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in skl_nau88l25_ssm4567 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>
2017-02-16 18:55:55 +00:00
Jeeja KP
c541b2dd45 ASoC: Intel: Skylake: Create ASoC jack for hdmi in skl_nau88l25_max98357a machine
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in skl_nau88l25_max98357a 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>
2017-02-16 18:55:51 +00:00
Jeeja KP
f3af359242 ASoC: Intel: Skylake: Create ASoC jack for hdmi in rt286 machine
Creates ASoC jack for HDMI pcm and calls hdmi codec API to initialize
jack in skl_rt268 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>
2017-02-16 18:55:47 +00:00
Jeeja KP
8d13640f6b ASoC: Intel: Skylake: Add route change to nau88l25_ssm4567 machine
To support MST moved pin to port, this changes the routes based on
port. So change the route in nau88l25_ssm4567 machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08 18:23:57 +00:00
Jeeja KP
b0aad231bd ASoC: Intel: Skylake: Add route change to nau88l25_max98357a machine
To support MST moved pin to port, this changes the routes based on
port. So change the route in nau88l25_max98357a machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08 18:23:35 +00:00
Jeeja KP
eaba31035a ASoC: Intel: bxt: Add route change to rt298 machine
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>
2017-02-08 18:23:35 +00:00
Subhransu S. Prusty
0cf5a17159 ASoC: Intel: Skylake: Report Platform ID info from NHLT
This patch create entry in sysfs file system to report the
platform_id = "pci-id-oem_id-oem_table_id-oem_revision"
for board identification.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Sodhi, VunnyX <vunnyx.sodhi@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 17:14:45 +01:00
Jeeja KP
ba21034677 ASoC: Intel: bxt: add channel map support in bxt_da7219_max98357a machine
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 also
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>
2017-02-04 13:10:23 +01:00
Jeeja KP
6d707a74a7 ASoC: Intel: bxt: Add route change to da7219_max98357a machine
To support MST moved pin to port, this changes the routes based on
port. So change the route in bxt_da7219_max98357a machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 13:08:06 +01:00
Jeeja KP
111c2ae1fb ASoC: Intel: Skylake: Add route change to rt286 machine
To support MST moved pin to port, this changes the routes based on
port. So change the route in skl_rt286 machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 13:08:02 +01:00
Jeeja KP
51e0f3c825 ASoC: Intel: bxt: add channel map support in rt298 machine
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>
2017-02-04 13:08:01 +01:00
Pierre-Louis Bossart
77e546b7ba ASoC: cht-bsw-rt5645: fix unused variable compiler warning
Missed unused variable in previous changes, oops.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-01 18:35:50 +00:00
Pierre-Louis Bossart
7bde09dfcf ASoC: Intel: cht-bsw-rt5645: fix DAI formats
Remove default and set I2S mode correctly both on codec and
cpu sides

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:14:30 +00:00
Pierre-Louis Bossart
bf92c6efc6 ASoC: Intel: add support for ALC3270 codec
Use ACPI ID 10EC3270 to load machine driver for cht-bsw-rt5645
and add reference to 3270 to use the rt5645 mode

Tested on Asus T100HA

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:14:23 +00:00
Pierre-Louis Bossart
d74390b5fe ASoC: Intel: cht-bsw-rt5645: select ASRC source based on routing quirk
Some platforms use AIF2, use routing information to set ASRC as needed

Suggested-by: Bard Liao <bardliao@realtek.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95681
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:14:07 +00:00
Pierre-Louis Bossart
22af29114e ASoC: Intel: cht-bsw-rt5645: add quirks for SSP0/AIF1/AIF2 routing
This driver may be used on Baytrail CR platforms where SSP2 is
not available.

Add quirks and routing detection based on work done for RT5640.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:14:07 +00:00
Pierre-Louis Bossart
fd0138dc5d ASoC: Intel: Baytrail: add quirk for Lenovo Thinkpad 10
the BIOS reports this codec as RT5640 but it's a rt5670. Use the
quirk mechanism to use the cht_bsw_rt5672 machine driver

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:12:31 +00:00
Pierre-Louis Bossart
42648c2270 ASoC: Intel: cht_bsw_rt5645: harden ACPI device detection
Fix classic issue of having multiple codecs listed in DSDT
but a single one actually enabled. The previous code did
not handle such errors and could also lead to uninitalized
configurations

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:12:31 +00:00
Pierre-Louis Bossart
e1d0691454 ASoC: Intel: Atom: add machine driver for baytrail-rt5645 hardware
Use machine driver initially defined for CherryTrail

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:12:31 +00:00
Pierre-Louis Bossart
11ad808986 ASoC: rt5645: add support for RT5648
add ACPI ID 10EC5648 found e.g on Asus X205TA and use
rt5645 driver

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:12:30 +00:00
Pierre-Louis Bossart
a1a91752cb ASoC: Intel: add support for Realtek 5651 on Cherrytrail
RT5651 is used on some Cherrytrail platforms, add the ACPI
ID in machine table.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156191
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:05:33 +00:00
Alexandrov Stansilav
e7974816a8 ASoC: Intel: Atom: Add HP Pavilion x2 10-p000 machine entry
Add machine entry for HP X2 Pavilion 10-p100.
This notebook contains rt5640 codec, but with ACPI ID "10EC3276".

Signed-off-by: Alexandrov Stansilav <neko@nya.ai>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:05:33 +00:00
Pierre-Louis Bossart
a50477e55f ASoC: Intel: cht_bsw_rt5645: add Baytrail MCLK support
The existing code assumes a 19.2 MHz MCLK as the default
hardware configuration. This is valid for CherryTrail but
not for Baytrail.

Add explicit MCLK configuration to set the 19.2 clock on/off
depending on DAPM events.

This is a prerequisite step to enable devices with Baytrail
and RT5645 such as Asus X205TA

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:03:56 +00:00
Mark Brown
39d7548568 Merge branch 'fix/intel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel 2017-01-31 20:03:10 +00:00
Pierre-Louis Bossart
f12f5c84e3 ASoC: Intel: atom: fix frame polarity
The current frame sync polarity definitions are inconsistent in the
Atom/DPCM driver, fix to align with regular ASoC definitions and
update code in platform and machine drivers for RT5640 and RT5651.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 19:56:20 +00:00
Pierre-Louis Bossart
3639ac1cd5 ASoC: Intel: boards: remove .pm_ops in all Atom/DPCM machine drivers
This patch corrects an omission in bytcr_rt5640 and bytcr_rt5651.
All existing machine drivers shall not use .pm_ops to avoid a double
suspend, as initially implemented by 3f2dcbeaeb
("ASoC: Intel: Remove soc pm handling to allow platform driver handle it").

Reported-by: Shrirang Bagul <shrirang.bagul@canonical.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 19:56:15 +00:00
Sebastien Guiriec
5b101ab465 ASoC: Intel: Atom: Configure media_loop1 and sprot_loop in stereo
Most of the devices are using stereo speakers so media_loop1 and
sprot_loop default mode should be stereo.

As per default all the routing UCM configuration doesn't enable Post
processing loops it is not impacting curent configurations.

Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 19:45:36 +00:00
Jeeja KP
1011509dfd ASoC: Intel: Skylake: Use set_tdm_slot to set the dma channel
DMA channel(stream tag) used by the HDA link need to programmed in
codec so that codec receives packet from the link associated with the
same channel.

DMA channel is allocated in link BE dai hw_params, the same needs to be
set for the BE codec dai. Instead of using get/set dma_data(), use
dai_ops snd_soc_dai_set_tdm_slot() to set the stream tag.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-24 17:55:16 +00:00
Yong Zhi
079a248b0e ASoC: Intel: boards: Remove ignore_suspend for WoV streams
When Ref capture is used during S0IX, only the DSP pipelines
are needed, thus remove the ignore_suspend for WoV streams so
that DMA can be suspended, but keep them for WoV endpoints.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-19 17:53:04 +00:00
Jeeja KP
a700a1e65a ASoC: Intel: Skylake: set the resume point to LPIB
In system suspend, the firmware pipelines will be deleted and there
is no need to save the pipeline context. Driver will save the DPIB and
LPIB pointers in suspend.

In system resume, the firmware pipelines will be created again and the
RD/RW pointers in the Firmware buffer points to the base address. So
need to fetch the non-played data again to firmware buffer. LPIB
indicates the HW rendered position.

Instead of setting DPIB as resume point, set it to LPIB to restore from
the HW render position so that DMA would fetch the non-played data one
more time.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-19 15:43:04 +00:00
Jeeja KP
7cbfdf87f4 ASoC: Intel: Skylake: Don't reset pass-through pipe in BE prepare
When pipe is pass-through, BE and FE modules are defined inside
a pipe, reset of pipe will be done in FE DAI prepare. So don't
reset in the BE prepare.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-19 15:43:03 +00:00
Mengdong Lin
3122c66fd2 ASoC: Intel: Use DMI name for sound card long name in Broadwell machine driver
Intel Broadwell machine driver will call API snd_soc_set_dmi_name() to
use DMI info to make the sound card long name.

For example, here are the changed long name for two Broadwell-based
machines:
Dell XPS-13(2015): DellInc.-XPS139343-01-0310JH
Intel WilsonBeach: Intel Corp.-BroadwellClientplatform-0.1-WilsonBeachSDS

They still share the same card name "broadwell-rt286".

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-17 17:57:14 +00:00
Andy Shevchenko
2914266975 ASoC: Intel: remove ignored dependencies
For selected only options the explicit dependencies do not make much sense
becase Kbuild ignores them anyway. Remove them explicitly.

Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-17 17:46:58 +00:00
Andy Shevchenko
ebf79091bf ASoC: Intel: select DW_DMAC_CORE since it's mandatory
Select DW_DMAC_CORE like the rest of glue drivers do, e.g.
drivers/dma/dw/Kconfig.

While here group selectors under SND_SOC_INTEL_HASWELL and
SND_SOC_INTEL_BAYTRAIL.

Make platforms, which are using a common SST firmware driver, to be
dependent on DMADEVICES.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-17 17:46:47 +00:00
Andy Shevchenko
231a091ef8 ASoC: Intel: rename SND_SST_MFLD_PLATFORM to SND_SST_ATOM_HIFI2_PLATFORM
Rename SND_SST_MFLD_PLATFORM to SND_SST_ATOM_HIFI2_PLATFORM to make it clear
that is not only about Medfield platform.

The new name is derived from Intel Atom and HiFi2. HiFi2 is the DSP version,
it's public information for Intel *Field/*Trail parts, see
https://www.alsa-project.org/main/index.php/Firmware. By combining HiFi2 with
Atom we get a unique non-ambiguous description of the core+DSP hardware for
Intel Medfield through Intel Cherrytrail.

Suggested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-17 17:46:40 +00:00
Andy Shevchenko
dd8275771f ASoC: Intel: remove redundant select SND_SOC_INTEL_SST
SND_SOC_INTEL_SKYLAKE selects SND_SOC_INTEL_SST already. Thus no need to
duplicate. Remove duplications.

Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-17 17:46:37 +00:00
Jeeja KP
bc65a326c5 ASoC: Intel: Skylake: Release FW ctx in cleanup
Saved firmware ctx was not never released, so release Firmware
ctx in cleanup routine.

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>
2017-01-06 18:14:58 +00:00
Jeeja KP
1448099dd3 ASoC: Intel: bxtn: Use DSP poll API to poll FW status
Use the optimized dsp_register_poll API to poll the DSP firmware
status register rather than open coding it.

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>
2017-01-06 18:14:48 +00:00
Jeeja KP
9cc8f9fe0f ASoC: Intel: Common: Update dsp register poll implementation
Poll implementation is not quite accurate, especially for smaller
values of timeout or timeout values close to the actual timeout needed

Use jiffies to set the timeout value and time_before() to get the
accurate time. So update the dsp register poll implementation to
provide accurate timeout using jiffies.

Signed-off-by: Jayachandran B <jayachandran.b@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>
2017-01-06 18:14:45 +00:00
Jeeja KP
eee0e16f8c ASoC: Intel: Skylake: Clean up manifest info
Instead of passing the topology manifest info directly to IPC library,
define the manifest info in topology and use this in IPC Library.
This will remove the dependency on topology interface definition with
IPC library.

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>
2017-01-06 18:14:31 +00:00
youling257
5718004878 ASoC: Intel: bytcr_rt5640: quirks for Insyde devices
There are literally dozens of Insyde devices with a different
name but with the same audio routing. Use a generic quirk to
match on vendor name only to avoid recurring edits of the
same thing.

Signed-off-by: youling257 <youling257@gmail.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-05 12:39:12 +00:00
Pierre-Louis Bossart
60448b077e ASoC: Intel: bytcr-rt5640: fix settings in internal clock mode
Frequency value of zero did not make sense, use same 24.576MHz
setting and only change the clock source in idle mode

Suggested-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-05 12:39:04 +00:00
G Kranthi
91ce54978c ASoC: Intel: Skylake: Fix to fail safely if module not available in path
If a module is not available in a pipeline, fail safely rather than
causing oops.

Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-31 18:55:00 +00:00
Pierre-Louis Bossart
4a8b3a682b ASoC: Intel: bytcr_rt5640: fallback mechanism if MCLK is not enabled
Commit df1a2776a7 ("ASoC: Intel: bytcr_rt5640: add MCLK support")
was merged but the corresponding clock framework patches have not,
after being bumped from audio to clock to x86 domains. The missing
clock-related patches result in a regression starting with 4.9 with
the audio card not being created.

Rather than reverting this commit and all following updates already
queued up for 4.10, handle run-time dependency on MCLK and fall back
to the previous bit-clock mode. This provides the same functionality
as in 4.8 for Baytrail devices. On Baytrail-CR most devices remain
silent with this fallback but additional patches are needed anyway.
As suggested by Mark Brown, the fallback is only allowed with -ENOENT,
all other run-time errors, including -EPROBE_DEFER, will stop the probe
with no sound card registered.

This patch should be applied to -stable as well as ASoC 4.10 fixes

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-19 13:30:16 +00:00
Jeeja KP
f4e4e98939 ASoC: Intel: Skylake: Removed unused skl_get_format()
Removed the unused function skl_get_format as the format is calculated
directly using the HDA core API.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15 12:15:59 +00:00
Jeeja KP
ad036bdee5 ASoC: Intel: Skylake: Add helper function to setup host/link dma
This patch adds helper function to configure the host/link DMA when
the DMA is in decoupled mode.
Next patch adds the usage of this helper routines for configuring
DMA in Mixer event handler.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15 12:15:59 +00:00
Jeeja KP
bb704a737c ASoC: Intel: Skylake: Configure DMA in PRE_PMD handler of Mixer
If system is suspended when PCM was paused/stopped, restart doesn't
configure DMA as it is we are in Pause state and results in IO error
eventually.

Configure host/link DMA before initializing DSP Gateway copier module
instead of DAI prepare(). So moved DMA configuration to mixer PRE_PMD
widget handler instead of DAI prepare.

This uses previously added new API to do the configuration and removes
old DAI prepare code.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15 12:15:59 +00:00
Jeeja KP
12c3be0e72 ASoC: Intel: Skylake: Update link_index and format in pipe params
To configure Host/Link DMA, additionally link index and format
are required based on the hw params. So added these parameters in
the pipe params and in hw_params the pipe params are updated.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15 12:15:59 +00:00
Vinod Koul
7d7c80f3f3 ASoC: Intel: sst: remove unused ‘ret_val’
In sst_media_close(), 'ret_val' is initialized and assigned as return value
of stream ops close but never used. So remove it.

ound/soc/intel/atom/sst-mfld-platform-pcm.c: In function ‘sst_media_close’:
sound/soc/intel/atom/sst-mfld-platform-pcm.c:360:6: warning: variable ‘ret_val’ set but not used [-Wunused-but-set-variable]
  int ret_val = 0, str_id;

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15 11:34:34 +00:00
Vinod Koul
ee9292e859 ASoC: Intel: sst: remove unused 'msg_high'
In process_fw_async_msg(), a variable 'msg_high' is initialized but
not used. So remove it.

sound/soc/intel/atom/sst/sst_ipc.c: In function ‘process_fw_async_msg’:
sound/soc/intel/atom/sst/sst_ipc.c:263:24: warning: variable ‘msg_high’ set but not used [-Wunused-but-set-variable]
  union ipc_header_high msg_high;

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15 11:20:04 +00:00
Vinod Koul
cf90c8245b ASoC: Intel: sst: remove unused 'ops'
In sst_free_stream(), a variable 'ops' is initialized but
not used. So remove it.

sound/soc/intel/atom/sst/sst_stream.c: In function ‘sst_free_stream’:
sound/soc/intel/atom/sst/sst_stream.c:397:24: warning: variable ‘ops’ set but not used [-Wunused-but-set-variable]
  struct intel_sst_ops *ops;

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15 11:20:04 +00:00
Vinod Koul
547cafa3ef ASoC: Intel: Skylake: remove unused 'ret'
In skl_tplg_mixer_dapm_post_pmd_event(), a variable 'ret' is initialized but
not used.

We don't check return of skl_delete_pipe, so remove the assignment as
well, so remove this variable.

sound/soc/intel/skylake/skl-topology.c: In function ‘skl_tplg_mixer_dapm_post_pmd_event’:
sound/soc/intel/skylake/skl-topology.c:976:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
  int ret = 0;
      ^
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15 11:20:04 +00:00
Mark Brown
cc9624790d Merge remote-tracking branches 'asoc/topic/compress', 'asoc/topic/const' and 'asoc/topic/cs35l34' into asoc-next 2016-12-12 15:52:51 +00:00
Mark Brown
52708d05ba Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2016-12-12 15:52:46 +00:00
Mark Brown
66f89906f0 Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2016-12-12 15:52:43 +00:00
Mark Brown
2e8239e792 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2016-12-12 15:52:34 +00:00
Sathyanarayana Nujella
c1aee1d828 ASoC: Intel: update bxt_da7219_max98357a to support quad ch dmic capture
This patch updates FE channel constraints & BE fixup to support
quad channel DMIC capture.
DMIC pin's BE fixup is configured based on channel input, i.e.
either stereo or quad.

Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-06 15:13:11 +00:00
Sebastien Guiriec
c7da1e9d26 ASoC: Intel: atom: save FW version
After the boot of the SST FW the firmware version is send back
to the driver. This patch is saving the FW version inside the
driver.

Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-05 17:22:25 +00:00
Sebastien Guiriec
fade74dfab ASoC: Intel: atom: Add sysfs entry in order to store FW version
This patch is adding a sysfs entry in order to be able to get
access to SST FW version.

Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-05 17:22:24 +00:00
Mark Brown
5203a3ca09 Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel 2016-12-01 21:47:57 +00:00
Kuninori Morimoto
d9fc40639d ASoC: core: replace codec_dev_list to component_dev_list on Card
Current Card has Codec list (= codec_dev_list), but Codec will be
removed in the future. Because of this reason, this patch adds
new Component list in Card, and replace Codec list.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-01 20:09:34 +00:00
Takashi Iwai
fee3244cd1 ASoC: cht_bsw_rt5672: Use HID translation unit
Instead of hard-coded "i2c-10EC5670:00", use the translation helper to
avoid the mismatch between i2c-codec and ACPI strings just like what
we've done for bytcr_rt5640.  This gives more robust binding on funky
devices like Dell Wyse 3040.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 18:00:59 +00:00
Takashi Iwai
2fc995a87f ASoC: intel: Fix crash at suspend/resume without card registration
When ASoC Intel SST Medfield driver is probed but without codec / card
assigned, it causes an Oops and freezes the kernel at suspend/resume,

 PM: Suspending system (freeze)
 Suspending console(s) (use no_console_suspend to debug)
 BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
 IP: [<ffffffffc09d9409>] sst_soc_prepare+0x19/0xa0 [snd_soc_sst_mfld_platform]
 Oops: 0000 [#1] PREEMPT SMP
 CPU: 0 PID: 1552 Comm: systemd-sleep Tainted: G W 4.9.0-rc6-1.g5f5c2ad-default #1
 Call Trace:
  [<ffffffffb45318f9>] dpm_prepare+0x209/0x460
  [<ffffffffb4531b61>] dpm_suspend_start+0x11/0x60
  [<ffffffffb40d3cc2>] suspend_devices_and_enter+0xb2/0x710
  [<ffffffffb40d462e>] pm_suspend+0x30e/0x390
  [<ffffffffb40d2eba>] state_store+0x8a/0x90
  [<ffffffffb43c670f>] kobj_attr_store+0xf/0x20
  [<ffffffffb42b0d97>] sysfs_kf_write+0x37/0x40
  [<ffffffffb42b02bc>] kernfs_fop_write+0x11c/0x1b0
  [<ffffffffb422be68>] __vfs_write+0x28/0x140
  [<ffffffffb43728a8>] ? apparmor_file_permission+0x18/0x20
  [<ffffffffb433b2ab>] ? security_file_permission+0x3b/0xc0
  [<ffffffffb422d095>] vfs_write+0xb5/0x1a0
  [<ffffffffb422e3d6>] SyS_write+0x46/0xa0
  [<ffffffffb4719fbb>] entry_SYSCALL_64_fastpath+0x1e/0xad

Add proper NULL checks in the PM code of mdfld driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org>
2016-11-30 17:58:53 +00:00