Граф коммитов

142 Коммитов

Автор SHA1 Сообщение Дата
Mark Brown 7c063edee6 Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/fsl', 'asoc/fix/fsl-esai', 'asoc/fix/intel', 'asoc/fix/mcasp' and 'asoc/fix/pxa' into asoc-linus 2014-08-15 12:51:29 +01:00
Jarkko Nikula b80d19c166 ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset
There is no need to restore and restart PCM streams in case ADSP didn't
reach reset and power off state during system suspend/resume cycle. In that
case stream is still active but paused and firmware doesn't allow allocating
a new stream before paused stream is freed.

ADSP remains active in case suspend sequence didn't go to suspend_late
stage. This can happen when either suspend sequence is aborted by a wakeup
or by letting only devices suspend by "echo devices >/sys/power/pm_test".

Currently stream restoring fails in these suspend cases. Fix this by adding
a flag that indicates is complete stream reinitialization needed or is it
enough to resume paused stream. Flag is set when we know that ADSP reached
suspend_late.

Initial fix to this issue came from Fang Yang. I modified it a little and
forward ported it to top of two other suspend/resume patches from me.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Borun Fu <borun.fu@intel.com>
Cc: yang fang <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-11 13:40:24 +01:00
Jarkko Nikula 9246539bdd ASoC: Intel: Wait Baytrail ADSP boot at resume_early stage
Remove sst_byt_pcm_dev_resume() and move waiting of firmware boot into
sst_byt_pcm_dev_resume_early(). Now suspend_late and resume_early phases are
in sync with each other so that we know that ADSP was put into reset and was
unpowered after suspend_late and is ready to resume IO after resume_early
during resume stage in sst_byt_pcm_trigger().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Borun Fu <borun.fu@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-11 13:40:23 +01:00
Jarkko Nikula 27d3f02689 ASoC: Intel: Merge Baytrail ADSP suspend_noirq into suspend_late
Merge DSP reset and cleanup sequence in sst_byt_pcm_dev_suspend_noirq()
into sst_byt_pcm_dev_suspend_late(). First their order was wrong by first
unloading firmware modules in suspend_late and then taking DSP into reset
in suspend_noirq. Second ACPI has put device into OFF state already during
suspend_late so trying to reset the DSP is a no-op at suspend_noirq stage.

Fix these by moving DSP reset and cleanup into
sst_byt_pcm_dev_suspend_late() before firmware unloading.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Borun Fu <borun.fu@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-11 13:40:23 +01:00
Jarkko Nikula 9b11eb44ef ASoC: Intel: Update Baytrail ADSP firmware name
Update the initial Baytrail ADSP firmware file name with the one that is now
in linux-firmware.git. Please see linux-firmware.git commit 7551a3a78453
("fw_sst_0f28: Add firmware for Intel Baytrail SST DSP").

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-06 20:36:13 +01:00
Mark Brown a6ce305207 Merge remote-tracking branches 'asoc/topic/intel', 'asoc/topic/kirkwood', 'asoc/topic/max98090' and 'asoc/topic/mc13783' into asoc-next 2014-08-04 16:31:45 +01:00
Paweł Piskorski d6e08617cb ASoC: Intel: update stream only on stream IPC msgs
Only update the stream when the IPC message type matches stream type.

Signed-off-by: Paweł Piskorski <pawel.piskorski@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 19:11:29 +01:00
Paweł Piskorski 94ce33456d ASoC: Intel: Don't issue ipc when processing response
Make sure we dont issue IPC when we are processing a response.

Signed-off-by: Paweł Piskorski <pawel.piskorski@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 19:11:28 +01:00
Liam Girdwood 97cfc751e1 ASoC: Intel: Delete message when IPC timeout occurs
This fixes a bug where we dont delete the current message when an
IPC message timeout occurs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 19:11:28 +01:00
Jie Yang 4ebd599e35 ASoC: Intel: Add dependency to DW_DMAC for BDW platform
Add dependency to DW_DMAC for broadwell machine, which
have built in DW dma engines.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 19:11:28 +01:00
Subhransu S. Prusty 2741d43a1e ASoC: Intel: mfld-pcm: Allocate platform data
Platform data may be null during platform_device_add. Allocate platform
data before using.

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@linaro.org>
2014-07-31 20:18:09 +01:00
Subhransu S. Prusty 19a23a5d76 ASoC: Intel: mfld-pcm: Fix to use correct sst_data pointer
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@linaro.org>
2014-07-31 20:18:09 +01:00
Liam Girdwood 30bba67c43 ASoC: Intel: Check ops before we derefference pointers.
Check ops pointer members before we can derefference them.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-30 13:24:21 +01:00
Liam Girdwood 543ec637e0 ASoC: Intel: Add debug to set DX state
Add some debugging info to help with Dx state debug.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-30 13:16:58 +01:00
Liam Girdwood 8155261250 ASoC: Intel: Add notification trace for reset.
Add trace notification of IPC stream reset.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-30 13:16:58 +01:00
Liam Girdwood d7d7d1eda0 ASoC: Intel: Add macros for SST shim register bits.
Add some register definitions for other shim register bits.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-30 13:16:58 +01:00
Liam Girdwood ee4a6ce6cd ASoC: Intel: Fix naming of HMDC register macros.
HMDC is the correct naming for this register.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-30 13:16:58 +01:00
Liam Girdwood afdb74fd70 ASoC: Intel: Add Broadwell Machine support
Add support for Broadwell based machines with SST DSP audio.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-16 23:16:51 +01:00
Jie Yang 249adddb1a ASoC: Intel: Update FW version readback
Update FW version readback. IPC_GLB_GET_FW_VERSION reads back
the ABI version whilst the release version is in the mailbox.
Update to use mailbox version for info logging.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-16 22:26:57 +01:00
Lv Zheng 1d34f3ef4b ASoC: intel: Cleanup useless ACPI inclusion.
The sst-haswell-dsp.c is an ACPI independent file, this patch removes
ACPI header files for it.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-16 13:06:41 +01:00
Vinod Koul e310fb9141 ASoC: Intel: mfld: add generic parameter interface
This interface will be used by subsequent patches to set/get parameters from DSP

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-14 19:44:52 +01:00
Vinod Koul 8813e66db7 ASoC: Intel: mfld: add dsp error codes
DSP returns error codes for IPC return so add them in driver

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-14 19:44:47 +01:00
Vinod Koul 1ad0e33060 ASoC: Intel: add sst shim register start-end variables
the shim registers start and end can be useful while parsing the shim addresses,
so add these

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-14 19:44:47 +01:00
Jie Yang 85e63007bb ASoC: Intel: Start with all memory banks disabled
All required banks are enabled during boot procedure.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-14 19:12:09 +01:00
Jie Yang 548793232f ASoC: Intel: Use a table for ADSP SRAM shift
Use a table for ADSP IRAM/DRAM bit shift.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-14 19:12:09 +01:00
Jie Yang 15446c0b8d ASoC: Intel: Merge wild cat point ADSP DRAM regions
Merge D-SRAM0 D-SRAM1 D-SRAM2 to D-SRAM, for wild cat point ADSP mem regions.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-14 19:12:09 +01:00
Jie Yang c761b58306 ASoC: Intel: Add dummy read for SRAM block enable
Add dummy read after each block enable, to workaround
SRAM write missing bytes issue.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-14 19:11:27 +01:00
Jie Yang 8e89761876 ASoC: Intel: Cleanup HSW pcm format support
This change removes unsupported formats from System,
Capture and Loopback FE DAIs.
Also it fixes S24_LE support on all DAIs.
While at this fix 24 bit flag for BYT as well.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-07-14 19:09:05 +01:00
Jarkko Nikula b29d7c5f71 ASoC: Intel: byt-max98090: Do not change speaker and DMIC with jack state
Kernel should not enable/disable speakers and digital microphone whenever
jack is inserted/removed. This is more use-case than kernel specific
decision. For instance one may want to play VoIP ring tones using both
speakers and headphone but play music only from one of them.

Because of above reason remove "Ext Spk" and "Int Mic" update when jack
state is changed. Also this update was illogical anyway: "Ext Spk" was
enabled when jack was inserted and disabled when jack was removed.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-24 16:21:36 +01:00
Jarkko Nikula ab6f7d0d93 ASoC: Intel: byt-max98090: Do not enable MAX98090 microphone detection
It turned out there is no need to enable microphone detection in MAX98090
codec. Headset microphone is anyway detected by a GPIO signal from another
chip and headset button presses cannot be detected either because a signal
needed for it is not connected.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-24 16:20:43 +01:00
Jarkko Nikula 2498899293 ASoC: Intel: byt-max98090: Fix jack type in order to report correctly
Pass actual jack type bitmask to snd_soc_jack_new() in order to report
also microphone detections and not only headphone. While at it change also
jack name and pass also SND_JACK_LINEOUT type.

Reported-by: Jin Yao <yao.jin@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-24 16:20:43 +01:00
Jarkko Nikula 6a0cdccad8 ASoC: Intel: byt-max98090: Do not report SND_JACK_LINEIN
Headset jack has only mono microphone input.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-24 16:20:43 +01:00
Jarkko Nikula 725a6dfd01 ASoC: Intel: byt-max98090: Fix mic detect GPIO polarity
Mic detect GPIO is active low when headset microphone is detected. Found
both by debugging and checking the schematics.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-24 16:20:43 +01:00
Jarkko Nikula a5b37bf36f ASoC: Intel: byt-max98090: Move MICBIAS widget to supply of Headset Mic
Move "MICBIAS" as a supply widget to "Headset Mic" instead of keeping it
between input pin "IN34" and "Headset Mic".

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-24 16:20:42 +01:00
Vinod Koul 0ec66fed40 ASoC: Intel: use common stream allocation method for compressed stream
As added in previosu patch along with stream to piep conversion si required for
compressed audio too

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-23 12:24:28 +01:00
Vinod Koul 61b165caa6 ASoC: Intel: add mrfld pipelines
Merrifield DSP used various pipelines to identify the streams and processing
modules. Add these defination in the pcm driver and also add a table for device
entries to firmware pipeline id conversion

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-23 12:24:27 +01:00
Vinod Koul a870cdce9e ASoC: Intel: mfld-pcm: modularize stream allocation code
Tis will be used to add table based support for pcm front ends in subsequent
patches

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-22 12:01:49 +01:00
Vinod Koul aa9b045f70 ASoC: Intel: add the mrfld fw IPC definations
This will be used to update current driver as well as in support for the mrfld
patches

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-22 12:01:49 +01:00
Vinod Koul 2a63582500 ASoc: Intel: mfld-pcm: report pcm delay
Now the DSP is capable of reporting the delay, report it to upper layers

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 16:31:01 +01:00
Vinod Koul 9daa5bd34f ASoC: Intel: mfld-pcm rename period callback arg
The argument was called mad_substream which is no longer apt as older driver
is not used anymore so rename as arg

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 16:31:00 +01:00
Vinod Koul 6cc0f4e639 ASoC: Intel: mfld_pcm: move stream handling to dai_ops
This helps us to handle pcm and compress ops seperately and per dai

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 16:31:00 +01:00
Jarkko Nikula c9a8e3bd3d ASoC: Intel: byt-rt5640: Enable headset mic bias voltage
Connect "Headset Mic" to "MICBIAS1" supply widget of RT5640 in order to
enable bias voltage for headset microphones.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 11:39:26 +01:00
Jarkko Nikula 4131eceb4a ASoC: Intel: Show Baytrail SST DSP firmware details during init
DSP initialization complete message IPC_IA_FW_INIT_CMPLT is a large message
carrying firmware details in mailbox. Read and show those details during
init in order to be able to get that information to QA reports.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21 11:39:26 +01:00
Mark Brown 9713d5d0c4 Merge remote-tracking branches 'asoc/topic/gpio' and 'asoc/topic/intel' into asoc-next 2014-06-03 10:39:50 +01:00
Mark Brown d8188f00e7 ASoC: intel: The Baytrail/MAX98090 driver depends on I2C
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 20:12:05 +01:00
Jarkko Nikula 4af72f4e69 ASoC: Intel: byt-rt5640: Use card PM ops from core
Use card PM ops from ASoC core instead of defining custom PM ops here since
we are calling anyway common suspend/resume callbacks.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:50:45 +01:00
Jarkko Nikula 8eb776ab17 ASoC: Intel: Use devm_snd_soc_register_card
Simplify byt-rt5640.c and haswell.c machine drivers by using
devm_snd_soc_register_card(). Remove also needless dev_set_drvdata()
from byt_rt5640_probe() since snd_soc_register_card() does it too.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:50:45 +01:00
Andy Shevchenko a018c28550 ASoC: Intel: remove duplicate headers
A few files contain duplicate headers. This patch removes the second entry of
duplicate in each file under question.

There is no functional changes.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:50:45 +01:00
Jarkko Nikula 58dcc48816 ASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start
Stored DSP DMA pointer must be cleared before starting the stream since
PCM pointer callback sst_byt_pcm_pointer() can be called before pointer is
updated. In that case last position of previous stream was wronly returned.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:50:45 +01:00
Imre Deak 9cf0e4520d ASoC: Intel: byt/hsw: Add missing kthread_stop to error/cleanup path
Baytrail and Haswell SST IPC don't stop the kernel thread in error and
cleanup path thus leaving orphan kernel thread behind in such a case.

Also while at it, fix one error path in sst-haswell-ipc.c that doesn't free
hsw->msg.

[Jarkko: I edited the commit log a little]
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:44:49 +01:00