25 Nov, 2019
10 commits
-
On QM the DSP is inside the VPU subsystem while in QXP
it is inside the Audio DMA subsystem. For this reason
there are "subtle" differences.Introduce new compatible string for QM to help us correctly
configure the DSP depending on the board they run.dsp_mem_msg structure is shared with the DSP, so by introducing
new member dsp_board_type we can let DSP know on which target it runs.Reviewed-by: Shengjiu Wang
Signed-off-by: Daniel Baluta -
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
Reviewed-by: Cosmin-Gabriel Samoila
Signed-off-by: Daniel Baluta -
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] [] _raw_spin_lock+0x14/0x48
[ 2157.153995] [] xf_cmd_send_recv_complete+0x40/0xf0
[ 2157.160354] [] xf_close+0x40/0x88
[ 2157.165239] [] xaf_comp_delete+0x5c/0x70
[ 2157.170730] [] dsp_platform_compr_free+0xa0/0xe8
[ 2157.176917] [] soc_compr_free_fe+0x144/0x1a0
[ 2157.182754] [] snd_compr_free+0x64/0x98This 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
Signed-off-by: Daniel Baluta -
This will allow DSP driver to create/destroy a client on
DSP audio-framework proxy.Registering a client on remote DSP proxy means creating
a component.The implementation is similar with userspace application
proxy implementation.Reviewed-by: Cosmin-Gabriel Samoila
Signed-off-by: Shengjiu Wang -
This commit adds 3 new function helpers for sending
messages to DSP framework and waiting for response.While at it cleanup spaces around struct client fields.
Reviewed-by: Cosmin-Gabriel Samoila
Signed-off-by: Shengjiu Wang -
xf_cmd_send_recv function returns with a lock taken
in case of success. Fix this, now!This bug is present since the beginning of time and it didn't
show up because no one used xd_cmd_alloc/xf_cmd_free.Reviewed-by: Cosmin-Gabriel Samoila
Signed-off-by: Shengjiu Wang -
This is a cleanup patch to have all the headers style
consistent across DSP driver.Reviewed-by: Cosmin-Gabriel Samoila
Signed-off-by: Shengjiu Wang -
correct the license issue
Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta -
The reserved memory for dsp is defined in dts file, however, the dsp
driver has also defined the address and size of this reserved memory,
which is repeated and inflexible.So by cancelling the definition in dsp driver and use system API to
get the information of reserved memory from dts dynamically to fix
this problem.Signed-off-by: Weiguang Kong
-
In order to avoid the name problem going forward with
integration with Qcom, Qcom has their own dsp and hifi
is competitor, so the hifi name should not be used in
our code.So use the name of dsp instead of hifi to fix this
problem.Signed-off-by: Weiguang Kong