1
0
Fork 0
Commit Graph

28727 Commits (redonkable)

Author SHA1 Message Date
Viorel Suman 3612d5be22 MLK-17817-2: ASoC: imx-ak4458: enable 16 channels in TDM mode
In TDM mode with Daisy Chain enabled (CPLD mode 0x04) DAC1 and DAC2
AK4458 codecs on audio board are able to play 16 channels, so extend
the TDM mode constraint to 16 channels.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit bc8b6a74175c2d120383875b00b5a2a44def9dd0)
2018-12-06 16:42:30 +02:00
Viorel Suman a2531cbb14 MLK-17817-1: ASoC: ak4458: enable daisy chain
Enable Daisy Chain if in TDM mode and the number of played
channels is bigger than the maximum supported number of channels.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 5ae97f159bfd9c4a37e7e60cd20aa3437041b251)
2018-12-06 16:42:29 +02:00
Daniel Baluta 51a120cf6d MLK-20095-3: ASoC: fsl: dsp: Add ASRC clocks
We enable the ASRC clocks from CPU side. We only need
the following clocks: "mem", "ipg" and "asrc0..3".

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 586297d7d5855cf75e25f629ca495b8ac5c1bb96)
2018-11-28 11:48:51 +02:00
Cosmin-Gabriel Samoila 556c040708 MLKU-24-10 sound: asoc: change License comment to SPDX format
Change source and header License comment to SPDX format.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit 6d17e38a8d8cd3eab3015988a6f24cf64ec0d1df)
2018-11-23 10:18:58 +02:00
Cosmin-Gabriel Samoila 57706103cc MLKU-24-9 sound: soc: fix unused warning
When CONFIG_PM is not defined, the runtime suspend and resume
are unused so we should use __maybe_unused attribute.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit b2285d1937872b5023074644d0a8f7c9a2e3158a)
2018-11-23 10:18:42 +02:00
Cosmin-Gabriel Samoila 9e2cd26c61 MLKU-24-8 sound:asoc: change soc_enum array to single enums
It is error prone to use soc_enum array for controls because introducing
new controls must always be done at the end of array or it will add
offset to existing controls.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit 409e235cb0e3fbf48251375e040d7f37b2734be2)
2018-11-23 10:18:28 +02:00
Viorel Suman 5d5cba3a28 MLK-20328-1: ASoC: fsl_sai: map number of pins to dataline masks
The patch enable mapping the number of pins required to play or record
a specific number of channels to a specific dataline mask.

Three consequent elements in "fsl,dataline" and "fsl,dataline,dsd" defines a
particular mapping, for instance for: fsl,dataline = "0 0xff 0xff 2 0x11 0x11"
there are two mappings defined:

default (0 pins) "rx" and "tx" dataline masks: 0 0xff 0xff
         2 pins  "rx" and "tx" dataline masks: 2 0x11 0x11

In case if property is missing, then default value "0 0x1 0x1" is considered.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 707fdf7759c0e11abf84573eb60bba104d681736)
2018-11-23 10:03:07 +02:00
Shengjiu Wang 78014408cd MLK-20428-2: ASoC: imx-cs42xx8: The FMT should be same for tx and rx
If the FMT of tx and rx is different, there will be issue. for example
tx is working at TDM mode, but rx want to work at I2S mode, this case
is not supported in current ALSA driver, the best way to support this
is to distinguish substream in set_fmt function.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 897e9e8b4e7a59d81048d05f9377b8c68fc7cd64)
2018-11-23 15:34:21 +08:00
Shengjiu Wang 323d176850 MLK-20428-1: ASoC: cs42xx8: add constraint for tdm mode
TDM mode can only work with codec slave mode, and the mclk
frequency should be 256FS.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 769121ead6ef8919b7f6869defe594be978d82cd)
2018-11-23 15:34:20 +08:00
Shengjiu Wang 3879fa6b05 MLK-20434: ASoC: fsl_rpmsg_i2s: add more rates in constraint list
add more rates in constraint list, Fixes commit ee959e2c9b
("MLK-19581-3: ASoC: fsl_rpmsg_i2s: support multipul rate and DSD format")

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit bcc6185a392b46d2b5af315894b06e6ebaff8046)
2018-11-23 15:34:20 +08:00
Shengjiu Wang 5e76ecfef1 MLK-20357-1: ASoC: imx-rpmsg: add audio routing for wm8960
The rpmsg wm8960 codec driver is completed to support
full function, not only the volume control. which cause
an issue that there is no sound when recording, the reason
is that the MIC Bias not enabled, and it should be enabled
through audio routing.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-15 10:25:02 +08:00
Cosmin-Gabriel Samoila 0a1ce9e471 MLKU-24-7 sound:asoc: fix checkpatch paranthesis error
Remove paranthesis that are not needed.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-14 15:46:02 +02:00
Cosmin-Gabriel Samoila 9adc4e0542 MLKU-24-6 sound:asoc: remove comented code
Remove unused commented code.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-14 15:46:01 +02:00
Cosmin-Gabriel Samoila 83b78ca8c5 MLKU-24-5 sound:asoc: remove multiple empty rows
Fix checkpatch error by removin extra empty rows.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-14 15:46:01 +02:00
Cosmin-Gabriel Samoila 24853d2c40 MLKU-24-4 sound:asoc: fix checkpatch braces error
Braces {} are not necessary for single statement blocks.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-14 15:46:00 +02:00
Cosmin-Gabriel Samoila ecd01c473d MLKU-24-3 sound:asoc: fix missing space after if checkpatch errors
In order to upstream the micfil driver, we need to fix
missing space after if errors and warnings reported
by checkpatch.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-14 15:46:00 +02:00
Cosmin-Gabriel Samoila 91813ee2b4 MLKU-24-2 sound:asoc: fix line over 80 char errors
In order to upstream the micfil driver, we need to fix
line over 80 characters errors and warnings reported
by checkpatch.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-14 15:45:59 +02:00
Cosmin-Gabriel Samoila ecad04fcce MLKU-24-1 sound:asoc: fix alignment and code indent errors
In order to upstream the micfil driver, we need to fix allignment
and code indent errors and warnings reported by checkpatch.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-14 15:45:49 +02:00
Daniel Baluta de2f62c6a5 MLK-20189-10: ASoC: fsl: dsp: Avoid unnecessary check
strtab is always non-null so remove unnecessary check.

This is a follow up of patch
167a6d79f ("ASoC: fsl: Skip checking for string section type")
and finally fixes CID3901026

Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-14 09:47:51 +02:00
Colin Ian King 1e58af346c ASoC: sgtl5000: avoid division by zero if lo_vag is zero
In the case where lo_vag <= SGTL5000_LINE_OUT_GND_BASE, lo_vag
is set to zero and later vol_quot is computed by dividing by
lo_vag causing a division by zero error.  Fix this by avoiding
a zero division and set vol_quot to zero in this specific case
so that the lowest setting for i is correctly set.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-13 15:09:09 +02:00
Viorel Suman 302259f814 MLK-20189-9: ASoC: fsl: amix: remove dead code
Remove the dead code.

This fixes Coverity issue: CID1529915

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-11-13 15:09:09 +02:00
Viorel Suman 7b73200fa6 MLK-20189-8: ASoC: fsl_sai: use signed offset variable
Both dataline_off and dataline_off_dsd fields are unsigned,
thus checking negative values make no sense. Use a signed
variable to calculate offset instead.

This fixes Coverity issue: CID1899299

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-11-13 15:09:09 +02:00
Viorel Suman 9386717093 MLK-20189-7: ASoC: ak4458: check reset control status
Save error so that the following error checking now make sense.

This fixes Coverity issue: CID2828734

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-11-13 15:09:09 +02:00
Cosmin-Gabriel Samoila ad0ab32c08 MLK-20308 sound:asoc: fix re-enablement bug
When hwvad is enabled, if you try to re-enable it again, it should fail.
However, we were also double setting state to OFF on fail, which is
wrong because it resets the state and allows the second retry to enable
even if it wasn't disabled before.
Now we only return EBUSY.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
2018-11-13 14:34:36 +02:00
Cosmin-Gabriel Samoila 8c94563a3f MLK-20189 sound: asoc: fix unsigned compared against 0
An unsigned value can never be negative, so this test will always
evaluate the same way.

Fixes Coverity issue CID3618200

Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
2018-11-13 14:26:42 +02:00
Cosmin-Gabriel Samoila c262dde8ac MLK-20189 sound: asoc: fix dereference before null check
There may be a null pointer dereference, or else the comparison against
null is unnecessary.

Fixes Coverity issue CID5327850

Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
2018-11-13 13:55:36 +02:00
Daniel Baluta 167a6d79f4 MLK-20189-6: ASoC: fsl: Skip checking for string section type
e_shstrndx already contains the section header index, so
shdr->sh_type will always be SHT_STRTAB.

Remove this redundant check and make Coverity happy.

Fixes: CID3901026
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-09 13:08:30 +02:00
Daniel Baluta 2f83d82c72 MLK-20189-5: ASoC: fsl: dsp_proxy: Unlock proxy->lock on error path
xf_cmd_send_recv returns with lock taken if waiting was
interrupted by a signal.

This fixes Coverity issues: CID5233120 / CID5233060

Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-09 10:16:33 +02:00
Daniel Baluta 56efef908f MLK-20189-4: ASoC: fsl: library_load: Check return value for kernel_read
Bail out if kernel_read returns an error.

Fixes: CID1477415

Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-09 10:16:33 +02:00
Daniel Baluta 984f676b90 MLK-20189-3: ASoC: fsl: library_load: Remove dead code
At this point err is always 0. So, just remove the check.

Fixes: CID1477380

Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-09 10:16:33 +02:00
Daniel Baluta 3f25235525 MLK-20189-2: ASoC: dsp: Replace atomic_dec_return with atomic_dec
Return value is not used so better use atomic_dec.
This also silences coverity warning CID3344689.

Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-09 10:16:33 +02:00
Daniel Baluta 8464574897 MLK-20189-1: ASoC: fsl: dsp: Unlock proxy->lock on error path
xf_cmd_recv will return with lock taken in two cases:
	* msg was received
	* waiting for msg was interrupted by a signal

Make sure we unlock proxy->lock in both cases.

This fixes Coverity issue: CID3335482.

Reviewed-by: S.j. Wang <shengjiu.wang@nxp.com>
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-09 10:16:33 +02:00
Shengjiu Wang 532a86fb06 MLK-20247: ASoC: imx-rpmsg: fix error when m4 image is not loaded
The reason is same as commit d4eb8ab263 ("MLK-19854-1: ASoC:
imx-cs42888: fix error when m4 image is not loaded")

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-09 15:33:15 +08:00
Shengjiu Wang eef266eed8 MLK-20277-3: ASoC: imx-pcm-rpmsg: change the state of substream in resume
In LPA mode, the system will be resumed by audio notification, when the
period size is small, there will be occasion that when notification
the underrun is happen, but the substream runtime state is not running
so the aplay won't trigger stop first, then start. just only trigger
the start, which don't comply with the convention.
So in this patch, we change the substream runtime state to running, when
the notification happened at resume.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-09 14:03:12 +08:00
Shengjiu Wang 2d8a7e5990 MLK-20277-2: ASoC: rpmsg_ak4497: remove digital_mute function
For the LPA mode, when the system enter suspend, the M4 will
continue to play the data, but for normal ALSA case, the digital
mute should be called at suspend, so the codec will be mute,
which conflict with the requirement of LPA.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-09 14:03:12 +08:00
Shengjiu Wang 8036a8b198 MLK-20277-1: ASoC: imx-pcm-rpmsg: reset the period index at stop
With the case that underrun happened, the aplay will trigger
stop and start, if the period index is not reset at stop, the
counter of period will be wrong

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-09 14:03:11 +08:00
Cosmin-Gabriel Samoila 904ab2a6d4 MLK-20253 sound: asoc: remove verbose messages from micfil
Enable and disable procedures contain info and warn prints. This
introduces delay in initialization / disablement procedures and we have
kept only the necessary prints in case of error.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-08 13:26:56 +02:00
Ranjani Vaidyanathan bf852ad46f MLK-20222-4 sound: Update SCFW API
Update SCFW API to the following commit:
"
   ("430d1e3646fbe75e339e18abf2330565eac906e0")
   Author: Chuck Cannon <chuck.cannon@nxp.com>
   Date:   Fri Nov 2 15:25:45 2018 -0500

   SCF-105: RN updates.
"

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
2018-11-02 17:21:17 -05:00
Cosmin-Gabriel Samoila 9f8cf447d1 MLK-20100 sound: asoc: make hwvad work after system suspend/resume
Implemented system suspend resume functions to call hwvad enable/disable
then do runtime_force_suspend/resume.
Since hwvad can run independently, when user calls enable/disable, we
will have to increment/decrement usage counter by calling
runtime_*_sync but to avoid doing this when disable/enable is called
from system_suspend/resume since we called pm_runtime functions - this
is why we have added the sync parameter in enable/disable_hwvad.
However, we ignore the busy flag because the module wasn't designed to
work with arecord and hwvad in parralel and we only print a warning.
Since hwvad and recording share the same clock and initialization
procedures require module to be disabled, the busy flag will be set
when having both features enabled.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-02 18:21:19 +02:00
Daniel Baluta 8964b2b0e5 MLK-20094: ASoC: fsl: dsp: Fix crash in compress cleanup path
We must find a way to no longer touch resources after they are
cleand up.

Now, after a stress test we get the following crash:

[ 2156.863772] fsl-dsp 596e8000.dsp: xf_pool_alloc failed
[ 2156.869337] Unable to handle kernel NULL pointer dereference at
virtual address 00000060
[ 2157.148594] [<ffff000008d8839c>] _raw_spin_lock+0x14/0x48
[ 2157.153995] [<ffff000008b3e0b8>] xf_cmd_send_recv_complete+0x40/0xf0
[ 2157.160354] [<ffff000008b3e470>] xf_close+0x40/0x88
[ 2157.165239] [<ffff000008b3f7a4>] xaf_comp_delete+0x5c/0x70
[ 2157.170730] [<ffff000008b40530>] dsp_platform_compr_free+0xa0/0xe8
[ 2157.176917] [<ffff000008b287fc>] soc_compr_free_fe+0x144/0x1a0
[ 2157.182754] [<ffff000008b11b24>] snd_compr_free+0x64/0x98

This happens because:

	1) dsp_platform_process work handler waits in a loop for
	   messages to arrive.
	2) when cplay process finishes it cleans up most of the
	   resources.
	3) when another cplay process starts it reinitializes the
	  resources including queues for example.
	4) a message will be generated and kernel will crash because
	   dsp_platform_process uses the older queues.

A solution for this is to make sure dsp_platform_process work loop
is stopped at cleanup time.

We use is_active state and signal dsp_platform_process handler to
finish because we are on the cleanup path.

While at it replace cancel_work with cancel_work sync to be sure
that work handler ends before going on with the rest of the cleanup.

Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-11-02 18:09:16 +02:00
Shengjiu Wang e8401a450c MLK-20183-2: ASoC: imx-cdnhdmi: reconfigure the mclk for HDMI on imx8mq
In order to support 44kHz and 48kHz sample rate together, we need to
reconfigure the parent clock of mclk.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-02 19:16:53 +08:00
Shengjiu Wang e366eb506e MLK-19750-3: ASoC: rpmsg_cs42xx8: enhance async mode for rpmsg_cs42xx8
with this patch,codec driver can support tx and rx in
different master/slave mode, for example, tx in master mode,
rx in slave mode

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-01 10:03:29 +08:00
Shengjiu Wang 874fabab6f MLK-19750-2: ASoC: cs42xx8: enhance the async mode for cs42xx8
with this patch, codec driver can support tx and rx in
different master/slave mode, for example, tx in master mode,
rx in slave mode

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-01 10:03:29 +08:00
Shengjiu Wang 018e6aee7d MLK-19750-1: ASoC: fsl_esai: enhance async mode
With this patch, esai driver can support tx and rx in
different master/slave mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-11-01 10:03:29 +08:00
Cosmin-Gabriel Samoila d67a67e8b1 MLK-20102 sound: asoc: fix VAD channel select
The documentation specifies that VADCHSEL is used to select
the channel number on which hwvad detector will work. However,
we have used this field wrong (similar to the recording where
you can enable, disable multiple channels at the time).
This patch fixes hwvad and you can enable it by writing 0 to 7
in /sys/devices/platform/30080000.micfil/hwvad/enable or any
other number to disable it.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-10-31 09:34:19 +02:00
Cosmin-Gabriel Samoila 1ebac560b2 MLK-19662 sound: asoc: add support for recording and hwvad in parallel
Remove all clock disable from driver suspend/hwvad_disable
to avoid crashing one or another when recording stops or
voice is detected and hwvad is disabled.
Another change done to make this work is to remove atomic
variables that guard mutual exclusion between recording and
VAD.
We have also added a restriction such that recording rate
should be the same as hwvad rate when hwvad is enabled to
avoid changing the mclk rate.
However, the hwvad can be enabled before or after recording
but not when recording is done. On the other hand, recording
can be triggered at any time.
I am not sure we are supposed to support recording and hwvad
in parallel since micfil documentation requires PDM to be
disabled when any initialization or reconfiguration of hwvad
is done. An workaround to make this working is never disabling
the pdm module from hwvad functions and this seems to work,
even we are not following the whole reconfiguration procedure.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-10-30 11:16:58 +02:00
Daniel Baluta fb214bbcec MLK-19972-2: ASoC: fsl: dsp: Fix component creation cleanup path
Because we don't correctly free resources when an error occurs
on component creation path we can end up with partially initialized
components.

Freeing such partially initialized components most of the time leads
to kernel crashing in pain.

Avoid this by making sure we either:
	* return a fully initialized component, comp->active = true
	* don't "create" the component at all, comp->active = false

Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-10-29 13:35:59 +02:00
Daniel Baluta 68db475b4f MLK-19972-1: ASoC: fsl: dsp: Fix compr_set_param cleanup path
In case of error no cleanup was done leaving thus reasources
in an undefined state.

This can cause crashes like this:

[   34.259281] fsl-dsp 596e8000.dsp: load codec wrap lib error
[   34.266333] fsl-dsp 596e8000.dsp: create component failed, type = 1,
err = -2
[   34.273493] err pool alloc ret = -2
[   34.298363] Unable to handle kernel NULL pointer dereference at
virtual address 00000000

... which happens when lib_dsp_codec_wrap.so is not present.

While at it, we also realign some lines of code in order to avoid
going over the 80 characters limit that Linux kernel coding style
preaches on.

Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-10-29 13:35:59 +02:00
Shengjiu Wang e101e57de0 MLK-20034-1: ASoC: imx-ak4458: constrain the mclk rate for DSD
When enable DSD for ak4458 with imx8mm platform, in DSD256 mode
the mclk calculated from ak4458_get_mclk_rate is 256fs, but
the codec require the mclk should be 512fs. so just hard code
the clock to be 512fs in DSD mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-10-29 11:10:38 +08:00
Cosmin-Gabriel Samoila 6fef4d2b05 MLK-19936-4: sound: asoc:add clock source control in alsa mixer
Add control to select clock source from alasamixer or select
auto mode where clock source is automatically selected.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-10-29 11:10:38 +08:00