Commit Graph

46 Commits

Author SHA1 Message Date
Wenkai Du 95e9ee92e2 ASoC: Intel: Fix audio crash due to negative address offset
There were occasional ADSP crash during reboot testing:

[   11.883364] BUG: unable to handle kernel paging request at ffffc90121700000
[   11.883380] IP: [<ffffffffc024d8bc>] sst_module_insert_fixed_block+0x24f/0x26d [snd_soc_sst_dsp]
[   11.883397] PGD 7800b067 PUD 0
[   11.883405] Oops: 0002 [#1] SMP
[   11.886418] gsmi: Log Shutdown Reason 0x03

The virtual address, ffffc90121700000, was out of range. The virtual
address is calculated by adding LPE base address with an offset:

sst_memcpy32(dsp->addr.lpe + data->offset, data->data, data->size);

The offset is calculated in sst_byt_parse_module, by subtraction of
two virtual addresses dsp->addr.fw_ext and dsp->addr.lpe:

block_data.offset = block->ram_offset + (dsp->addr.fw_ext - dsp->addr.lpe);

These virtual addresses are assigned by kernel from ioremap:

sst->addr.lpe = ioremap(pdata->lpe_base, pdata->lpe_size);
sst->addr.fw_ext = ioremap(pdata->fw_base, pdata->fw_size);

In current driver code, offset is defined as unsigned int32:

struct sst_module_data {
...
	u32 offset;		/* offset in FW file */
};

Most of the time kernel assigned virtual addresses with addr.fw_ext
greater than addr.lpe. But sometimes it was the other way round.

Fix the problem by declaring offset as signed int32_t.

Signed-off-by: Wenkai Du <wenkai.du@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22 19:22:53 +01:00
Christian Engelmayer bf657d2479 ASoC: Intel: Fix incorrect sizeof() in sst_hsw_stream_get_volume()
Fix an incorrect sizeof() usage in sst_hsw_stream_get_volume(). sst_dsp_read()
is called to read into a variable of type u32, but is passed sizeof(u32 *) for
argument 'size_t bytes'. Detected by Coverity: CID 1195260.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18 17:11:16 +01:00
Dan Carpenter 7897ab78f6 ASoC: Intel: some incorrect sizeof() usages
The intent was to say "sizeof(*pos)" and not "sizeof(pos)".

The sizeof(*pos) is 8 bytes so the bug won't show up on 64 bit systems.
The sizeof(*dx) is 172 bytes so that will be a bugfix.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18 17:11:03 +01:00
Lars-Peter Clausen 546d4dd3bb ASoC: mfld_machine: Fix compile error
Fixes: 115f3f8 ("ASoC: mfld_machine: Convert to table based DAPM and control setup")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-21 19:33:36 +00:00
Lars-Peter Clausen 43b956349d ASoC: mfld_machine: Convert to table based DAPM and control setup
Use table based setup to register the controls and DAPM widgets and routes.
This on one hand makes the code a bit cleaner and on the other hand
the board level DAPM elements get registered in the card's DAPM context rather
than in the CODEC's DAPM context.

The mfld_machine driver is a bit special in that it directly writes to one of
the CODEC registers from one of the control handlers. Previous to this patch it
was able to get a pointer to the CODEC from the control, since the control was
registered with the CODEC. This won't be possible anymore once the control is
registered with the card. Since there are already global variables in the driver
accessed in the same function the patch adds a global variable that holds a
pointer to the CODEC and uses that.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-21 18:04:20 +00:00
Mark Brown 234bf1f0f0 ASoC: Updates for v3.15
Quite a busy release for ASoC this time, more on janitorial work than
 exciting new features but welcome nontheless:
 
  - Lots of cleanups from Takashi for enumerations; the original API for
    these was error prone so he's refactored lots of code to use more
    modern APIs which avoid issues.
  - Elimination of the ASoC level wrappers for I2C and SPI moving us
    closer to converting to regmap completely and avoiding some
    randconfig hassle.
  - Provide both manually and transparently locked DAPM APIs rather than
    a mix of the two fixing some concurrency issues.
  - Start converting CODEC drivers to use separate bus interface drivers
    rather than having them all in one file helping avoid dependency
    issues.
  - DPCM support for Intel Haswell and Bay Trail platforms.
  - Lots of work on improvements for simple-card, DaVinci and the Renesas
    rcar drivers.
  - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the
    CSR SiRF SoC.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTIOhJAAoJELSic+t+oim90CoP/3CVTm9cWv1qhPSU6jjn6RJG
 /djmhntJfHd/GXo+0TiiwNK9WmZjFrJUr+5ofkDTCqSzFz1Suc90B6oHxY4dFbgF
 IyIpTexGwTLv3H6yDjadYAfmGDSsE9sM2dkID9oXy6aEzjNby/a1VEiBnRgx16X1
 YGvMVK8AGFn/AyC/zOV6EcKJxUjdDogqZ5wkR2XHzwDoYjl9ufxK9BnSIygYABOW
 ABAjyrZf3xx97AH82BB6iqcZMh5GxGNTvI3hQd/vjx0r7RFUDNLqmF2cPZAMTRW/
 bXWxVmtNHie1+lCldyMFm8pV/Pv09zuqDAQKbPY2TeHj2zF8CM548NlkFHqwHlp0
 S9K5E1N+/2wcXMjQa1wBELohUdl6dVh1OFOAz7M8o0TJdSOZyR6PJ9r0NprP8NgS
 67FBU+ZqnWIK159m9rKkFfPhnaDuDzk+rpwyK0fQxQgpdGGjLyv7OK3GhS30oTnA
 Z2GjEyUySM1BcEEWAtfUD5fHbjN28e1Icn53q5q4JK4gvx4DXBy08uY/vumvjXjO
 8oum3q3RjRvqIhzMrJoVgs+c8RHwS/bZQhlu9Q3qNTsDNDyMnaZWHFAnP8RDqHjv
 ojZiMJkJdpqceZ3z1k5ZG8GWJ2JaZBikSbeNk2Ltg17/0nackq2r8ekrIoEUPVk2
 ph4DJNC2s1qCFtx7tzQj
 =C5oo
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.15' into asoc-intel

ASoC: Updates for v3.15

Quite a busy release for ASoC this time, more on janitorial work than
exciting new features but welcome nontheless:

 - Lots of cleanups from Takashi for enumerations; the original API for
   these was error prone so he's refactored lots of code to use more
   modern APIs which avoid issues.
 - Elimination of the ASoC level wrappers for I2C and SPI moving us
   closer to converting to regmap completely and avoiding some
   randconfig hassle.
 - Provide both manually and transparently locked DAPM APIs rather than
   a mix of the two fixing some concurrency issues.
 - Start converting CODEC drivers to use separate bus interface drivers
   rather than having them all in one file helping avoid dependency
   issues.
 - DPCM support for Intel Haswell and Bay Trail platforms.
 - Lots of work on improvements for simple-card, DaVinci and the Renesas
   rcar drivers.
 - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the
   CSR SiRF SoC.

Conflicts:
	sound/soc/intel/Kconfig
2014-03-13 14:16:35 +00:00
Stephen Warren f410d5c953 ASoC: Intel: don't select RT5640 if !I2C
The rt5640 driver won't compile without I2C enabled. Hence, the Intel
Haswell and Baytrail+RT5640 ASoC drivers must also depend on I2C, since
these select RT5640.

This solves:
sound/soc/codecs/rt5640.c:2220:1: warning: data definition has no type or storage class [enabled by default]
sound/soc/codecs/rt5640.c:2220:1: error: type defaults to ‘int’ in declaration of ‘module_i2c_driver’ [-Werror=implicit-int]
sound/soc/codecs/rt5640.c:2220:1: warning: parameter names (without types) in function declaration [enabled by default]
sound/soc/codecs/rt5640.c:2210:26: warning: ‘rt5640_i2c_driver’ defined but not used [-Wunused-variable]

Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-13 09:45:09 +00:00
Mark Brown a4b12990b6 Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00
Liam Girdwood a8282136a1 ASoC: Intel: Clean up indentation for Haswell machine driver/Kconfig
Clean up some indentation.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-07 10:51:05 +08:00
Liam Girdwood dd6646bcfa ASoC: Intel: Use .dai_fmt for setting Haswell BE format.
Update the Haswell driver to use .dai_fmt in DAI link to set the
format.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-07 10:51:05 +08:00
Liam Girdwood f69f41e1a2 ASoC: Intel: Check Haswell IPC process_reply/notification return value.
Check the return value for error when processing replies and notifications.

The patch 22981243589c: "ASoC: Intel: Add Haswell/Broadwell IPC" from
> Feb 20, 2014, leads to the following imaginary static checker warning:
>
> 	sound/soc/intel/sst-haswell-ipc.c:898 hsw_irq_thread()
> 	warn: this is always true.
>
> sound/soc/intel/sst-haswell-ipc.c
>    895                  /* Handle Immediate reply from DSP Core */
>    896                  handled = hsw_process_reply(hsw, ipcx);
>                                   ^^^^^^^^^^^^^^^^^
> Returns 1 on success/error and -EIO on error.
>
>    897
>    898                  if (handled) {
>    899                          /* clear DONE bit - tell DSP we have completed */
>    900                          sst_dsp_shim_update_bits_unlocked(sst, SST_IPCX,
>    901                                  SST_IPCX_DONE, 0);
>    902
>    903                          /* unmask Done interrupt */
>    904                          sst_dsp_shim_update_bits_unlocked(sst, SST_IMRX,
>    905                                  SST_IMRX_DONE, 0);
>    906                  }
>

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-07 10:51:05 +08:00
Dan Carpenter 9202c37739 ASoC: Baytrail: fix error handling in sst_byt_dsp_init()
Calling "kfree(byt)" is a double free because that was allocated with
devm_kzalloc().  There were a couple places which leak "byt->msg".  That
memory is allocated in msg_empty_list_init().

Fixes: f7d01fd675 ('ASoC: Intel: Add Intel Baytrail SST DSP IPC support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06 12:22:21 +08:00
Jarkko Nikula a6cf8f7b53 ASoC: Intel: Baytrail: Fix implicit declaration of function 'memcpy_fromio'
Some kernel configurations can cause following build error:

sound/soc/intel/sst-baytrail-ipc.c: In function ‘sst_byt_get_dsp_position’:
sound/soc/intel/sst-baytrail-ipc.c:744:2: error: implicit declaration of function ‘memcpy_fromio’ [-Werror=implicit-function-declaration]
  memcpy_fromio(&fw_tstamp,
  ^
cc1: some warnings being treated as errors

Fix this by including <linux/io.h> explicitly.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-26 23:47:13 +09:00
Jarkko Nikula 95c40d4b0e ASoC: Intel: byt-rt5640: Use init time DAI format
Setting static DAI format has been supported in the soc-core quite some time
now so there is no need to set it runtime in machine driver.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwoood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-26 08:49:08 +09:00
Jarkko Nikula 52be4776ca ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names
Use more sensible kcontrol names than "Int Mic" and "Ext Spk". Speakers
especially are usually integrated devices in sales models.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwoood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-26 08:49:04 +09:00
Dan Carpenter 31d632f955 ASoC: intel: incorrect sizeof()
This should be sizeof(pos) instead of sizeof(&pos).  Most likely they
are both 8 bytes though so it doesn't often make a difference in real
life.

Fixes: 2298124358 ('ASoC: Intel: Add Haswell/Broadwell IPC')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-26 08:45:57 +09:00
Dan Carpenter f9da9e434d ASoC: intel: restore IRQs on error
This should be spin_unlock_irqrestore() instead of spin_unlock()

Fixes: 2298124358 ('ASoC: Intel: Add Haswell/Broadwell IPC')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-26 08:45:43 +09:00
Dan Carpenter 951e9bb1fa ASoC: Intel: sst-firmware: missing curly braces (harmless)
There were some curly braces intended here, but the code actually
works the same either way so it's not a bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-26 08:45:39 +09:00
Jarkko Nikula 5069e5c93c ASoC: Intel: sst-acpi: Fix Oops in case of missing firmware
I swear I tested missing firmware in commit e5161d7987 ("ASoC: Intel:
sst-acpi: Request firmware before SST platform driver probing").

Unfortunately same wasn't done in commit 6dda27cbbd ("ASoC: Intel:
sst-acpi: Add support for multiple machine drivers per platform") which
will cause NULL pointer dereference in sst_acpi_fw_cb() when printing the
error since sst_acpi->mach is not set.

Fix this obvious error by setting the sst_acpi->mach in sst_acpi_probe().

Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-26 08:45:35 +09:00
Jarkko Nikula 20df8d03a7 ASoC: Intel: Add build support for Baytrail SST
Enable build support for Baytrail SST DSP platform and byt-rt5640 machine
drivers.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25 13:44:44 +09:00
Jarkko Nikula e029861214 ASoC: Intel: Add Baytrail SST and byt-rt5640 machine driver probing
Add Baytrail SST descriptor with the byt-rt5640 machine driver to sst-acpi
loader.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25 13:44:41 +09:00
Jarkko Nikula 6439c8ad1e ASoC: Intel: Add machine driver for Baytrail SST with RT5640 codec
Add machine driver for Baytrail SST DSP platform with RT5640 audio codec.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25 13:44:39 +09:00
Jarkko Nikula aef1311a7d ASoC: Intel: Add Intel Baytrail SST PCM platform driver
This adds the Baytrail SST DSP PCM platform driver. It registers itself with
the ALSA SoC layer and uses Intel Baytrail SST DSP IPC for DSP control.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25 13:44:36 +09:00
Jarkko Nikula f7d01fd675 ASoC: Intel: Add Intel Baytrail SST DSP IPC support
Add support for Baytrail SST DSP IPC. This provides mechanism to communicate
with the DSP firmware.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25 13:44:34 +09:00
Jarkko Nikula f746966377 ASoC: Intel: Add Intel Baytrail SST DSP support
This adds basic functionality for Baytrail SST DSP initialization and
firmware loading.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25 13:44:31 +09:00
Jarkko Nikula 6ef20de726 ASoC: Intel: Add Baytrail SST ID and Baytrail specific register bits
While the SHIM register addresses in Baytrail are the same than Haswell and
Broadwell their register size is 64-bit and some bits are different.

This patch adds the SST device ID for Baytrail and Baytrail specific
SHIM bit definitions.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25 13:44:27 +09:00
Liam Girdwood 90931b9eae ASoC: Intel: Add Haswell Machine support
Add support for Haswell based machines with SST DSP audio.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-22 11:22:27 +09:00
Liam Girdwood 5e4482fcb1 ASoC: Intel: Add build support for Haswell ADSP
Build the Haswell/Broadwell PCM, IPC and DSP drivers.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-22 11:22:26 +09:00
Liam Girdwood d37797705d ASoC: Intel: Add Haswell and Broadwell PCM platform driver
Add the Haswell and Broadwell PCM DSP platform driver. This driver uses
the IPC driver for communication with the SST DSP.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-22 11:22:25 +09:00
Liam Girdwood 2298124358 ASoC: Intel: Add Haswell/Broadwell IPC
Add support for Haswell and Broadwell DSP IPC. This is used by the DSP
platform PCM driver to configure the DSP for audio operations.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-22 11:22:25 +09:00
Liam Girdwood 1e42c3e426 ASoC: Intel: Add support for Haswell/Broadwell DSP
Add support for low level differentiation functions for Haswell and Broadwell
SST DSPs. This includes suppoprt for DSP boot and reset, DSP firmware module
parsing and DSP memory block map initialisation.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-22 11:22:21 +09:00
Charles Keepax 121df681da ASoC: mfld_machine: Update locking around use of DAPM pin API
The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 19:22:58 +09:00
Liam Girdwood afd954900a ASoC: Intel: Fix build for sst-dsp.c on PPC architecture
Disable build on non X86 architectures except for compile testing. This fixes
the following build errors on PPC and adds an option for testing the build on other
architectures as suggested by Mark Brown :-

sound/soc/intel/sst-dsp.c: In function 'sst_dsp_outbox_write':
sound/soc/intel/sst-dsp.c:218:2: error: implicit declaration of function 'memcpy_toio' [-Werror=implicit-function-declaration]
  memcpy_toio(sst->mailbox.out_base, message, bytes);
  ^
sound/soc/intel/sst-dsp.c: In function 'sst_dsp_outbox_read':
sound/soc/intel/sst-dsp.c:231:2: error: implicit declaration of function 'memcpy_fromio' [-Werror=implicit-function-declaration]
  memcpy_fromio(message, sst->mailbox.out_base, bytes);
  ^

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:54:45 +09:00
Jarkko Nikula 6dda27cbbd ASoC: Intel: sst-acpi: Add support for multiple machine drivers per platform
Initial implementation of this driver focused only matching SST ACPI ID
with single machine driver and same firmware file per platform. It was known
restriction to be improved incrementally.

This patch is now changing this that SST ACPI ID refers purely to platform
specific data which refers to machine drivers on this platform, not vice
versa.

Matching machine driver is found by looking at ACPI ID which would best
match with the driver. Typically this would be the ACPI ID of audio codec
but is not tied to it.

This patch also changes that DSP firmware name is machine not platform
specific.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:42:07 +09:00
Liam Girdwood 7bcd84878e ASoC: Intel: Fix sparse warnings for firmware loader
Sparse gives us the following warnings on sst-firmware.c

  CHECK   sound/soc/intel/sst-firmware.c
sound/soc/intel/sst-firmware.c:39:34: warning: incorrect type in argument 1 (different address spaces)
sound/soc/intel/sst-firmware.c:39:34:    expected void volatile [noderef] <asn:2>*dst
sound/soc/intel/sst-firmware.c:39:34:    got void *
sound/soc/intel/sst-firmware.c:417:36: warning: incorrect type in argument 1 (different address spaces)
sound/soc/intel/sst-firmware.c:417:36:    expected void *dest
sound/soc/intel/sst-firmware.c:417:36:    got void [noderef] <asn:2>*
sound/soc/intel/sst-firmware.c:430:5: warning: symbol 'sst_block_module_remove' was not declared. Should it be static?

and

  CC [M]  sound/soc/intel/sst-dsp.o
sound/soc/intel/sst-dsp-priv.h:271:53: warning: incorrect type in argument 3 (different address spaces)
sound/soc/intel/sst-dsp-priv.h:271:53:    expected void *src
sound/soc/intel/sst-dsp-priv.h:271:53:    got void [noderef] <asn:2>*
sound/soc/intel/sst-dsp-priv.h:271:53: warning: incorrect type in argument 3 (different address spaces)
sound/soc/intel/sst-dsp-priv.h:271:53:    expected void *src
sound/soc/intel/sst-dsp-priv.h:271:53:    got void [noderef] <asn:2>*
sound/soc/intel/sst-dsp-priv.h:271:53: warning: incorrect type in argument 3 (different address spaces)
sound/soc/intel/sst-dsp-priv.h:271:53:    expected void *src
sound/soc/intel/sst-dsp-priv.h:271:53:    got void [noderef] <asn:2>*

This patch removes these warnings

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 00:08:24 +09:00
Jarkko Nikula e5161d7987 ASoC: Intel: sst-acpi: Request firmware before SST platform driver probing
We originally thought to request SST audio DSP firmware during the SST
platform driver initialization. However plain request_firmware doesn't
work in driver probe paths if userspace is not ready to handle it. For
instance when drivers are built-in.

Implementing asynchronous firmware request in SST platform driver
initialization complicates code needlessly since it anyway will fail if
firmware is missing.

This is more simple to handle by requesting firmware asynchronously in
sst_acpi_probe() and register SST platform only after firmware is loaded.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 21:20:42 +09:00
Jarkko Nikula 0c49a8c9f9 ASoC: Intel: Move extended fw base and size fields in struct sst_pdata
Move fw_base and fw_size fields in struct sst_pdata under ACPI data for
clarifying that these are not related to firmware file but for platform
specific extended firmware area reserved by the BIOS.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 13:41:10 +09:00
Liam Girdwood b47bd099fb ASoC: Intel: Rename SST trace event header to be less generic.
The Intel audio DSP SST trace event header has been renamed from sst.h
to intel-sst.h in order to avoid any confusion with any future
Samoa Standard Time drivers ;)

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 13:27:04 +09:00
Liam Girdwood 2280e90efa ASoC: Intel: Add GFP_KERNEL flag to firmware DMA buffer.
Add GFP_KERNEL when allocating firmware DMA buffer.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 13:25:52 +09:00
Liam Girdwood ddfa40b158 ASoC: Intel: Add build support for Intel SST DSP core.
This adds kernel build support for Intel SST core audio.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 10:39:25 +09:00
Liam Girdwood 30020472c3 ASoC: Intel: Add Intel SST audio DSP Firmware loader.
Provide services for Intel SST drivers to load SST modular firmware.

SST Firmware can be made up of several modules. These modules can exist
within any of the compatible SST memory blocks. Provide a generic memory
block and firmware module manager that can be used with any SST firmware
and core.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 10:39:20 +09:00
Jarkko Nikula c2f8783fa2 ASoC: Intel: Add common SST driver loader on ACPI systems
Most of the SST devices will be exposed as ACPI devices. It makes sense to
avoid duplication of the driver enumeration logic and concentrate the functionality
into a single ACPI SST enumeration file.

Idea of this loader is to parse data we get from ACPI and to be able to load
needed other SST drivers and ASoC machine driver runtime based on single
ACPI ID what BIOS gives to us.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 10:38:35 +09:00
Liam Girdwood 790aff6229 ASoC: Intel: Add Intel SST audio DSP low level shim driver.
Add support for Intel Smart Sound Technology (SST) audio DSPs.
This driver provides the low level IO, reset, boot and IRQ management
for Intel audio DSPs. These files make up  the low level part of the SST
audio driver stack and will be used by many Intel SST cores like
Haswell, Broadwell and Baytrail.

SST DSPs expose a memory mapped region (shim) for config and control.
The shim layout is mostly shared without much modification across cores
and this driver provides a uniform API to access the shim and to enable
basic shim functions. It also provides functionality to abstract some shim
functions for cores with different shim features.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 10:38:20 +09:00
Liam Girdwood a355d67817 ASoC: Intel: Add a mfld prefix to Intel SST drivers.
Resent with correct email for Mark.

In order to differentiate the different Intel SST audio core drivers we
need to rename the current drivers with a mfld prefix. This also includes
renaming in the Makefile and Kconfig

Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-12 15:09:49 +00:00
Lars-Peter Clausen c098284a4b ASoC: intel: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:27:39 +00:00
Jarkko Nikula 784cbf8ab4 ASoC: Rename mid-x86 directory to intel
We have other Intel platforms coming having the Smart Sound Technology (SST)
so rename the mid-x86 directory to intel as originally directory name
reflected only Intel MID platform.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-24 13:44:19 +00:00