29 May, 2020
3 commits
-
Allow playback for SPDIF only.
Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
(cherry picked from commit 321894d403e0a2a99823f5dbe2c1ecd92a936b66) -
Add missing SPDIF constraints.
Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
(cherry picked from commit c94af0b933848b42b167a787c6ed68f172f9a4fa) -
Split RAM, regs and FIFO resources in DTS.
Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
(cherry picked from commit fbdea7bf8e53c3dc6ba8348c1e2438431a5a34b3)
27 May, 2020
1 commit
-
instantiate snd_soc_dai_driver for independent symmetric control.
Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman
25 May, 2020
1 commit
-
The original patch updates REG_MICFIL_STAT in fsl_micfil_reset
method, but not in configure_hwvad_interrupts, fix this.Fixes: e12b0060cdac ("MLK-22598: ASoC: fsl_micfil: Reset channel output
data Flag")
Signed-off-by: Viorel Suman
(cherry picked from commit eb01ee51095e0b11b3f58b52549eec09a14ebca1)
22 May, 2020
2 commits
-
During probe SOF driver loads the topology, which will send messages
to DSP to create the Audio components.SOF DAI component at creation time calls probe() and touches DAI
registers thus we need to make sure DAI clocks are turned on during
probe.Using pm_runtime_get_sync() we force resume to be called which will
enable all necessary clocks.Later we call the pm_runtime_put_sync() and mark the device as
autosuspend. This will cause suspend to be called which will disable
all clocks to save power.Later, when userspace uses the sound card (via aplay/arecord) or any
alsa-lib calls the normal runtime resume/suspend flow will happen.Signed-off-by: Daniel Baluta
Reviewed-by: Shengjiu Wang -
The reason is that we access the register when power is disabled
reproduce command:
echo 8 > /sys/devices/platform/soc@0/30c00000.bus/30c00000.spba-bus/30ca0000.micfil/hwvad/enable[ 332.838518] SError Interrupt on CPU2, code 0xbf000002 -- SError
[ 332.838521] CPU: 2 PID: 1383 Comm: sh Tainted: G O 5.4.24-2.1.0+g2ad925d15481 #1
[ 332.838523] Hardware name: NXP i.MX8MPlus EVK board (DT)
[ 332.838525] pstate: 20000085 (nzCv daIf -PAN -UAO)
[ 332.838526] pc : regcache_sync_block+0x7c/0x258
[ 332.838528] lr : regcache_sync_block+0xf0/0x258
[ 332.838531] sp : ffff800012bf3be0
[ 332.838532] x29: ffff800012bf3be0 x28: 0000000000000000
[ 332.838535] x27: 0000000000000000 x26: 0000000000000001
[ 332.838541] x25: ffff00017753ed00 x24: 0000000000000000
[ 332.838546] x23: ffff00017706d400 x22: 000000000000002b
[ 332.838550] x21: ffff00017753f100 x20: ffff000177538c00
[ 332.838554] x19: 0000000000000001 x18: 0000000000000000
[ 332.838559] x17: 0000000000000000 x16: 0000000000000000
[ 332.838564] x15: 0000000000000000 x14: 0000000000000000
[ 332.838567] x13: 0000000000000000 x12: 0000000000000000
[ 332.838572] x11: ffff800012bf3d50 x10: ffff000173c0e900
[ 332.838577] x9 : ffff00017706d870 x8 : 0000000000000000
[ 332.838582] x7 : 00000000000000a8 x6 : 0000000000000000
[ 332.838587] x5 : 0000000000000000 x4 : ffff800010769d88
[ 332.838592] x3 : ffff80001076d278 x2 : 0000000008000000
[ 332.838597] x1 : ffff800023c10000 x0 : 0000000000000000
[ 332.838603] Kernel panic - not syncing: Asynchronous SError Interrupt
[ 332.838605] CPU: 2 PID: 1383 Comm: sh Tainted: G O 5.4.24-2.1.0+g2ad925d15481 #1
[ 332.838606] Hardware name: NXP i.MX8MPlus EVK board (DT)
[ 332.838608] Call trace:
[ 332.838609] dump_backtrace+0x0/0x140
[ 332.838612] show_stack+0x14/0x20
[ 332.838613] dump_stack+0xb4/0xf8
[ 332.838617] panic+0x158/0x324
[ 332.838618] nmi_panic+0x84/0x88
[ 332.838621] arm64_serror_panic+0x74/0x80
[ 332.838622] do_serror+0x80/0x138
[ 332.838623] el1_error+0x84/0xf8
[ 332.838627] regcache_sync_block+0x7c/0x258
[ 332.838628] regcache_rbtree_sync+0x60/0xb0
[ 332.838629] regcache_sync+0xac/0x140
[ 332.838633] disable_hwvad+0x3c/0x1f0
[ 332.838634] micfil_hwvad_handler+0x78/0x170
[ 332.838635] kobj_attr_store+0x14/0x28
[ 332.838637] sysfs_kf_write+0x40/0x50
[ 332.838640] kernfs_fop_write+0xf8/0x210
[ 332.838641] __vfs_write+0x18/0x40
[ 332.838642] vfs_write+0xdc/0x1c8
[ 332.838646] ksys_write+0x68/0xf0
[ 332.838647] __arm64_sys_write+0x18/0x20
[ 332.838648] el0_svc_common.constprop.0+0x68/0x160
[ 332.838651] el0_svc_handler+0x20/0x80
[ 332.838653] el0_svc+0x8/0xc
[ 332.838972] SMP: stopping secondary CPUs
[ 332.838974] Kernel Offset: disabled
[ 332.838975] CPU features: 0x0002,2000200c
[ 332.838976] Memory Limit: noneSigned-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman
21 May, 2020
3 commits
-
in_filled_len need to be reset on suspend, for suspend, every state
will go back to initilization state.Fixes: 3e87108614d1 ("MLK-24044: ASoC: fsl_easrc_m2m: Fix output length not accurate")
Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta -
initilize the m2m->complete in open() to avoid the NULL pointer in suspend
because the suspend can be called before initilizing m2m->complete in convert[ 591.006691] Filesystems sync: 0.084 seconds
[ 591.012292] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 591.020768] OOM killer disabled.
[ 591.024016] Freezing remaining freezable tasks ... (elapsed 0.105 seconds) done.
[ 591.809374] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[ 591.818160] Mem abort info:
[ 591.820949] ESR = 0x96000004
[ 591.824000] EC = 0x25: DABT (current EL), IL = 32 bits
[ 591.829307] SET = 0, FnV = 0
[ 591.832356] EA = 0, S1PTW = 0
[ 591.835493] Data abort info:
[ 591.838369] ISV = 0, ISS = 0x00000004
[ 591.842200] CM = 0, WnR = 0
[ 591.845165] user pgtable: 4k pages, 48-bit VAs, pgdp=00000001b033e000
[ 591.851600] [0000000000000000] pgd=0000000000000000
[ 591.856476] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 591.862043] Modules linked in:
[ 591.865097] CPU: 2 PID: 867 Comm: rtcwakeup.out Not tainted 5.4.24-04892-g8b7eb66 #911
[ 591.873009] Hardware name: NXP i.MX8MPlus EVK board (DT)
[ 591.878317] pstate: a0000085 (NzCv daIf -PAN -UAO)
[ 591.883110] pc : __wake_up_common+0x58/0x170
[ 591.887377] lr : __wake_up_locked+0x18/0x20
[ 591.891555] sp : ffff8000120b3a00
[ 591.894866] x29: ffff8000120b3a00 x28: ffff800011b84000
[ 591.900174] x27: 0000000000000000 x26: 0000000000000000
[ 591.905482] x25: 0000000000000003 x24: 0000000000000000
[ 591.910791] x23: 0000000000000001 x22: 0000000000000000
[ 591.916099] x21: ffff000171369420 x20: ffff000171369418
[ 591.921407] x19: ffff000171369410 x18: 0000000000000000
[ 591.926715] x17: 0000000000000000 x16: 0000000000000000
[ 591.932023] x15: 0000000000000000 x14: ffff0001760daa00
[ 591.937331] x13: ffff80016dbdc000 x12: 0000000034d4d91d
[ 591.942639] x11: 0000000000000000 x10: 00000000000009c0
[ 591.947948] x9 : ffff000171a30470 x8 : 00000000ffffffff
[ 591.953256] x7 : ffff8000120b3a38 x6 : ffffffffffffffe8
[ 591.958564] x5 : 0000000000000000 x4 : 0000000000000000
[ 591.963871] x3 : 0000000000000000 x2 : 0000000000000001
[ 591.969179] x1 : 0000000000000003 x0 : 0000000000000000
[ 591.974487] Call trace:
[ 591.976931] __wake_up_common+0x58/0x170
[ 591.980851] __wake_up_locked+0x18/0x20
[ 591.984683] complete+0x48/0x68
[ 591.987823] fsl_easrc_suspend+0x84/0x100
[ 591.991831] dpm_run_callback.isra.0+0x38/0xd8
[ 591.996271] __device_suspend+0xfc/0x3c8
[ 592.000191] dpm_suspend+0xf0/0x1e8
[ 592.003676] dpm_suspend_start+0x98/0xa0
[ 592.007596] suspend_devices_and_enter+0xec/0x5b8
[ 592.012297] pm_suspend+0x2f8/0x340
[ 592.015781] state_store+0x88/0x108
[ 592.019267] kobj_attr_store+0x14/0x28
[ 592.023015] sysfs_kf_write+0x40/0x50
[ 592.026674] kernfs_fop_write+0xf8/0x210
[ 592.030594] __vfs_write+0x18/0x40
[ 592.033992] vfs_write+0xdc/0x1c8
[ 592.037303] ksys_write+0x68/0xf0
[ 592.040615] __arm64_sys_write+0x18/0x20
[ 592.044536] el0_svc_common.constprop.0+0x68/0x160
[ 592.049324] el0_svc_handler+0x20/0x80
[ 592.053070] el0_svc+0x8/0xc
[ 592.055950] Code: 54000700 a90153f3 2a0203f7 52800018 (f9400cd3)
[ 592.062040] ---[ end trace a36c1a42637c268e ]---Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta -
initilize the m2m->complete in open() to avoid the NULL pointer in suspend
because the suspend can be called before initilizing m2m->complete in convertSigned-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta
20 May, 2020
1 commit
-
Add fsl,imx-audio-ak5552 to imx-ak5558 machine ASoC
driver, limit actual number of channels for ak5552
ADC supportSigned-off-by: Adrian Alonso
(cherry picked from commit 8fb5fb0a6610470113105b11935d394e5a2a23da)
15 May, 2020
4 commits
-
We need to accumulate the input data length for calculating the
output length because there are data need to be prefilled in
the beginning. If the fraction part beyond the integrity of
sample is not considered in calculating, which may cause the
output task timeout.Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman -
Add intermediate RX rates for iMX8MM.
Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
(cherry picked from commit a4f24900c310f44af4f3399129476c3d231b74ba) -
At SPDIF TX interrupt the firmware running on M0+ core
overwrites TX DPATH BYPASS FEM bit which turns the
expected PHY DMAC TX PLL clock 2*bitclock instead of
expected 10*bitclock if SAI PLL is used as PHY DMAC TX
PLL.Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
(cherry picked from commit ae30f694dad4fcbcba09e895505211f29d0a83ae) -
The existing "shutdown" callback does not consider
full duplex mode, fix this.Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
(cherry picked from commit 16346350984e9f613f8ef5945b14c4ce7c0d6e65)
13 May, 2020
1 commit
-
Update drivers constrains, limit sample rates to
[8Khz - 64Khz] and up to 8 channels.
Use SND_SOC_DAIFMT_PDM format type and remove
tdm slot settings to allow capture from multiple
SAI_RxD pins.Reviewed-by: Shengjiu Wang
Signed-off-by: Adrian Alonso
(cherry picked from commit c9f12b9c9e60d93ce011a6d37ebceb78ac910300)
12 May, 2020
1 commit
-
The criteria used to drop eARC mode into ARC mode
makes eARC function to fail. Drop it for now.Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
11 May, 2020
4 commits
-
With route "Playback" -> "Playback", dapm will enable
the "Playback" widget to be power on, there is this same
widget for codec component, then codec will enter
the SND_SOC_BIAS_ON level, then mclk is enabledWhen the mclk is bound with a power domain, the power
domain will be enabled always.Signed-off-by: Shengjiu Wang
Reviewed-by: Peng Zhang -
Use SAI PLL for SPDIF playback in order to allow
full duplex mode.Signed-off-by: Viorel Suman
(cherry picked from commit e8bc5163ce3ce6bc84fb22d74ceffa93ac14b87a) -
On imx8mp, there is no dedicated reset controller for DSP and
there is no dedicated power domain for DSP.The power of DSP is bound with audiomix, so we need to check
the DSP status for judging the audiomix is reset or not.We use the PID register for status check, after reset, it will
be set to zero, when DSP is used we set it to 1.Signed-off-by: Shengjiu Wang
Reviewed-by: Peng Zhang
Reviewed-by: Daniel Baluta
(cherry picked from commit cacd4e1389be6e70bf95a82ececb4a2d9e53653e) -
Fix the error handler in probe. otherwise the resource
can't be release when error happen.Signed-off-by: Shengjiu Wang
Reviewed-by: Peng Zhang
09 May, 2020
1 commit
-
Need to use pm_runtime_get_sync & pm_runtime_put_sync in probe
to bind the attached power domain with device.Fixes: ee1a47b87fff ("MLK-23618-6: ASoC: fsl_dsp: refine handling of multi power domain")
Signed-off-by: Shengjiu Wang
Reviewed-by: Peng Zhang
08 May, 2020
1 commit
-
Add support for 88200 Hz and 17600 Hz.
Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
07 May, 2020
4 commits
-
The call flow:
devm_regmap_init_mmio_clk
- clk_prepare()
- clk_pm_runtime_get()Cause the power domain of ipg clock always be enabled.
which impact the power consumption.so we can't bind clock with regmap, but explicitly enable
clock when using.Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman -
The call flow:
devm_regmap_init_mmio_clk
- clk_prepare()
- clk_pm_runtime_get()Cause the power domain of mem clock always be enabled.
which impact the power consumption.so we can't bind clock with regmap, but explicitly enable
clock when using.Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman -
With imx-pcm-dma, the dma channel is created in probe, when
there is power domain attached with dma device, the power
domain will be enabled when channel is created, then the
power of the domain will be always enabled from beginning.So switch to imx-pcm-dma-v2, then the dma channel will be
created when playback or capture really started.Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman -
The call flow:
devm_regmap_init_mmio_clk
- clk_prepare()
- clk_pm_runtime_get()Cause the power domain of bus clock always be enabled.
which impact the power consumption.So we can't bind clock with regmap, then explicitly enable
clock when using.Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman
01 May, 2020
2 commits
-
A power domain associated with a device may be disabled in
a separate thread by "genpd_power_off_work_fn" function in
case the device has no PM runtime enabled at that moment.
This will stop the parent clock of "bus" clk and hang
the probe in regmap read/write operation. In order to avoid
this PM runtime must be enabled before any regmap read/write
ops. Aside of this replace clk bus clocks with
pm_runtime_get/put_sync calls.Signed-off-by: Viorel Suman
Fixes: c2641e1974f7 ("MLK-23618-9: ASoC: fsl_sai: Don't bind clock with regmap")
Reviewed-by: Shengjiu Wang -
Set regmap to use regcache only in probe in order to avoid
issue on cat /sys/kernel/debug/regmap/30cc0000.xcvr/registersSigned-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
29 Apr, 2020
3 commits
-
The issue is GPU will crash when do dsp suspend test, and only
meet this issue when load GPU as module.
The reason is that dsp framework's global data set size little
than actul size. So dsp will touch the memory that not owned
dsp, then caused GPU crash.Signed-off-by: Zhang Peng
-
Add support 6 channels
Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman -
Add iec958 controls, then user can set the AES from user space.
The command is "iecset", which is in alsa-utils.For HBR test, we need do below steps
1. Generate iec61937 mat stream by ffmpeg.
ffmpeg -i input.mlp -acodec copy -f spdif output.spd2. Add iec60958 header by iec958 plugin in alsa-lib
IMX-CDNHDMI.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD {
type string
}
@args.AES0 {
type integer
}
@args.AES1 {
type integer
}
@args.AES2 {
type integer
}
@args.AES3 {
type integer
}
type iec958
slave {
format IEC958_SUBFRAME_LE
pcm {
type file
slave.pcm null
file "output.spd.iec958"
format "raw"
}
}
status [ $AES0 $AES1 $AES2 $AES3 ]
preamble.z 0x1
preamble.x 0x0
preamble.y 0x0
}
aplay -Diec958:3,AES0=0x06,AES1=0x80,AES2=0x02,AES3=0x09 -r 192000 -c 2 -f S16_LE output.spd3. Enable non-linear pcm.
iecset -c 3 audio off4. aplay -Dcdnhdmi8ch -r 192000 -c 8 -f S32_LE output.spd.iec958
pcm.cdnhdmi8ch {
type dshare
slave {
pcm "hw:3,0"
channels 8
rate 192000
format S32_LE
}
ipc_key 5144458
bindings.0 0
bindings.1 4
bindings.2 1
bindings.3 5
bindings.4 2
bindings.5 6
bindings.6 3
bindings.7 7
}5. Test is finished, disable non-linear pcm
iecset -c 3 audio onSigned-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman
27 Apr, 2020
8 commits
-
We need to check priv->pd_dev after allocating memory. Issue
detected by Coverity (CID9607920).Signed-off-by: Daniel Baluta
Reviewed-by: Shengjiu Wang -
Unnecessary header files may slow down build performance.
Issue reported by coverity (CID9607920).Signed-off-by: Daniel Baluta
Reviewed-by: Shengjiu Wang -
In order to be able to access SAI3/SDMA3 registers
we need to enable SAI3_IPG and SDMA3_ROOT clocks.Signed-off-by: Daniel Baluta
-
Currently the INFO_ flags such as PAUSE/NO_PERIOD_WAKEUP are defined
in the SOF PCM core, which doesn't scale. To account for platform
variations, these flags need to be set in DSP ops.This patch only moves the definitions and does not change any
functionality.Signed-off-by: Daniel Baluta
-
We're passing "&posn" instead of "posn" so it ends up corrupting
memory instead of doing something useful.Fixes: 53e0c72d98ba ("ASoC: SOF: Add support for IPC IO between DSP and Host")
Signed-off-by: Dan Carpenter
Reviewed-by: Kai Vehmanen
Link: https://lore.kernel.org/r/20200303101858.ytehbrivocyp3cnf@kili.mountain
Signed-off-by: Mark Brown -
In tx_wait_done the ipc payload is copied before the DSP transaction
error code is checked. This might lead to corrupted data in kernel side
even though the error would be handled later. It is also pointless to
copy the data in case of error. So change the order of error check and
copy.Signed-off-by: Pierre-Louis Bossart
Signed-off-by: Jaska Uimonen
Link: https://lore.kernel.org/r/20200228231850.9226-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown -
M0+ core must be released prior raising any interrupt
to M0+ core, otherwise interrupt will be lost.Fixes: b16426007842 ("MLK-23567-2 ASoC: fsl_xcvr: enable SPDIF TX")
Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang -
Before the parameters getting from dsp is not right, now correct it.
Signed-off-by: Zhang Peng
Reviewed-by: Daniel Baluta