Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c0b38be1
Commit
c0b38be1
authored
May 04, 2022
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
ASoC: Pull in fixes
Cleanups for the dmaengine code build on top of current fixes.
parents
55d2a66c
a962890a
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
124 additions
and
70 deletions
+124
-70
drivers/firmware/cirrus/cs_dsp.c
drivers/firmware/cirrus/cs_dsp.c
+1
-2
sound/soc/atmel/mchp-pdmc.c
sound/soc/atmel/mchp-pdmc.c
+1
-0
sound/soc/codecs/da7219.c
sound/soc/codecs/da7219.c
+10
-4
sound/soc/codecs/lpass-rx-macro.c
sound/soc/codecs/lpass-rx-macro.c
+10
-4
sound/soc/codecs/lpass-tx-macro.c
sound/soc/codecs/lpass-tx-macro.c
+10
-4
sound/soc/codecs/lpass-va-macro.c
sound/soc/codecs/lpass-va-macro.c
+6
-2
sound/soc/codecs/max98090.c
sound/soc/codecs/max98090.c
+6
-1
sound/soc/codecs/rt5514.c
sound/soc/codecs/rt5514.c
+1
-1
sound/soc/codecs/rt9120.c
sound/soc/codecs/rt9120.c
+0
-1
sound/soc/codecs/wm8958-dsp2.c
sound/soc/codecs/wm8958-dsp2.c
+4
-4
sound/soc/codecs/wm8960.c
sound/soc/codecs/wm8960.c
+14
-1
sound/soc/generic/simple-card-utils.c
sound/soc/generic/simple-card-utils.c
+1
-1
sound/soc/meson/aiu-acodec-ctrl.c
sound/soc/meson/aiu-acodec-ctrl.c
+1
-1
sound/soc/meson/aiu-codec-ctrl.c
sound/soc/meson/aiu-codec-ctrl.c
+1
-1
sound/soc/meson/axg-card.c
sound/soc/meson/axg-card.c
+0
-1
sound/soc/meson/axg-tdm-interface.c
sound/soc/meson/axg-tdm-interface.c
+5
-21
sound/soc/meson/g12a-tohdmitx.c
sound/soc/meson/g12a-tohdmitx.c
+1
-1
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+0
-2
sound/soc/soc-generic-dmaengine-pcm.c
sound/soc/soc-generic-dmaengine-pcm.c
+3
-3
sound/soc/soc-ops.c
sound/soc/soc-ops.c
+18
-2
sound/soc/sof/ipc3-topology.c
sound/soc/sof/ipc3-topology.c
+26
-13
sound/soc/sof/sof-pci-dev.c
sound/soc/sof/sof-pci-dev.c
+5
-0
No files found.
drivers/firmware/cirrus/cs_dsp.c
View file @
c0b38be1
...
...
@@ -955,8 +955,7 @@ static int cs_dsp_create_control(struct cs_dsp *dsp,
ctl
->
alg_region
=
*
alg_region
;
if
(
subname
&&
dsp
->
fw_ver
>=
2
)
{
ctl
->
subname_len
=
subname_len
;
ctl
->
subname
=
kmemdup
(
subname
,
strlen
(
subname
)
+
1
,
GFP_KERNEL
);
ctl
->
subname
=
kasprintf
(
GFP_KERNEL
,
"%.*s"
,
subname_len
,
subname
);
if
(
!
ctl
->
subname
)
{
ret
=
-
ENOMEM
;
goto
err_ctl
;
...
...
sound/soc/atmel/mchp-pdmc.c
View file @
c0b38be1
...
...
@@ -966,6 +966,7 @@ static int mchp_pdmc_process(struct snd_pcm_substream *substream,
static
struct
snd_dmaengine_pcm_config
mchp_pdmc_config
=
{
.
process
=
mchp_pdmc_process
,
.
prepare_slave_config
=
snd_dmaengine_pcm_prepare_slave_config
,
};
static
int
mchp_pdmc_probe
(
struct
platform_device
*
pdev
)
...
...
sound/soc/codecs/da7219.c
View file @
c0b38be1
...
...
@@ -446,7 +446,7 @@ static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol,
struct
soc_mixer_control
*
mixer_ctrl
=
(
struct
soc_mixer_control
*
)
kcontrol
->
private_value
;
unsigned
int
reg
=
mixer_ctrl
->
reg
;
__le16
val
;
__le16
val
_new
,
val_old
;
int
ret
;
/*
...
...
@@ -454,13 +454,19 @@ static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol,
* Therefore we need to convert to little endian here to align with
* HW registers.
*/
val
=
cpu_to_le16
(
ucontrol
->
value
.
integer
.
value
[
0
]);
val
_new
=
cpu_to_le16
(
ucontrol
->
value
.
integer
.
value
[
0
]);
mutex_lock
(
&
da7219
->
ctrl_lock
);
ret
=
regmap_raw_write
(
da7219
->
regmap
,
reg
,
&
val
,
sizeof
(
val
));
ret
=
regmap_raw_read
(
da7219
->
regmap
,
reg
,
&
val_old
,
sizeof
(
val_old
));
if
(
ret
==
0
&&
(
val_old
!=
val_new
))
ret
=
regmap_raw_write
(
da7219
->
regmap
,
reg
,
&
val_new
,
sizeof
(
val_new
));
mutex_unlock
(
&
da7219
->
ctrl_lock
);
return
ret
;
if
(
ret
<
0
)
return
ret
;
return
val_old
!=
val_new
;
}
...
...
sound/soc/codecs/lpass-rx-macro.c
View file @
c0b38be1
...
...
@@ -3566,12 +3566,16 @@ static int rx_macro_probe(struct platform_device *pdev)
return
PTR_ERR
(
rx
->
pds
);
base
=
devm_platform_ioremap_resource
(
pdev
,
0
);
if
(
IS_ERR
(
base
))
return
PTR_ERR
(
base
);
if
(
IS_ERR
(
base
))
{
ret
=
PTR_ERR
(
base
);
goto
err
;
}
rx
->
regmap
=
devm_regmap_init_mmio
(
dev
,
base
,
&
rx_regmap_config
);
if
(
IS_ERR
(
rx
->
regmap
))
return
PTR_ERR
(
rx
->
regmap
);
if
(
IS_ERR
(
rx
->
regmap
))
{
ret
=
PTR_ERR
(
rx
->
regmap
);
goto
err
;
}
dev_set_drvdata
(
dev
,
rx
);
...
...
@@ -3632,6 +3636,8 @@ static int rx_macro_probe(struct platform_device *pdev)
err_dcodec:
clk_disable_unprepare
(
rx
->
macro
);
err:
lpass_macro_pds_exit
(
rx
->
pds
);
return
ret
;
}
...
...
sound/soc/codecs/lpass-tx-macro.c
View file @
c0b38be1
...
...
@@ -1828,8 +1828,10 @@ static int tx_macro_probe(struct platform_device *pdev)
return
PTR_ERR
(
tx
->
pds
);
base
=
devm_platform_ioremap_resource
(
pdev
,
0
);
if
(
IS_ERR
(
base
))
return
PTR_ERR
(
base
);
if
(
IS_ERR
(
base
))
{
ret
=
PTR_ERR
(
base
);
goto
err
;
}
/* Update defaults for lpass sc7280 */
if
(
of_device_is_compatible
(
np
,
"qcom,sc7280-lpass-tx-macro"
))
{
...
...
@@ -1846,8 +1848,10 @@ static int tx_macro_probe(struct platform_device *pdev)
}
tx
->
regmap
=
devm_regmap_init_mmio
(
dev
,
base
,
&
tx_regmap_config
);
if
(
IS_ERR
(
tx
->
regmap
))
return
PTR_ERR
(
tx
->
regmap
);
if
(
IS_ERR
(
tx
->
regmap
))
{
ret
=
PTR_ERR
(
tx
->
regmap
);
goto
err
;
}
dev_set_drvdata
(
dev
,
tx
);
...
...
@@ -1907,6 +1911,8 @@ static int tx_macro_probe(struct platform_device *pdev)
err_dcodec:
clk_disable_unprepare
(
tx
->
macro
);
err:
lpass_macro_pds_exit
(
tx
->
pds
);
return
ret
;
}
...
...
sound/soc/codecs/lpass-va-macro.c
View file @
c0b38be1
...
...
@@ -1434,8 +1434,10 @@ static int va_macro_probe(struct platform_device *pdev)
va
->
dmic_clk_div
=
VA_MACRO_CLK_DIV_2
;
}
else
{
ret
=
va_macro_validate_dmic_sample_rate
(
sample_rate
,
va
);
if
(
!
ret
)
return
-
EINVAL
;
if
(
!
ret
)
{
ret
=
-
EINVAL
;
goto
err
;
}
}
base
=
devm_platform_ioremap_resource
(
pdev
,
0
);
...
...
@@ -1492,6 +1494,8 @@ static int va_macro_probe(struct platform_device *pdev)
err_dcodec:
clk_disable_unprepare
(
va
->
macro
);
err:
lpass_macro_pds_exit
(
va
->
pds
);
return
ret
;
}
...
...
sound/soc/codecs/max98090.c
View file @
c0b38be1
...
...
@@ -396,6 +396,7 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol,
unsigned
int
sel
=
ucontrol
->
value
.
integer
.
value
[
0
];
unsigned
int
val
=
snd_soc_component_read
(
component
,
mc
->
reg
);
unsigned
int
*
select
;
int
change
;
switch
(
mc
->
reg
)
{
case
M98090_REG_MIC1_INPUT_LEVEL
:
...
...
@@ -413,6 +414,10 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol,
val
=
(
val
>>
mc
->
shift
)
&
mask
;
if
(
sel
<
0
||
sel
>
mc
->
max
)
return
-
EINVAL
;
change
=
*
select
!=
sel
;
*
select
=
sel
;
/* Setting a volume is only valid if it is already On */
...
...
@@ -427,7 +432,7 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol,
mask
<<
mc
->
shift
,
sel
<<
mc
->
shift
);
return
0
;
return
change
;
}
static
const
char
*
max98090_perf_pwr_text
[]
=
...
...
sound/soc/codecs/rt5514.c
View file @
c0b38be1
...
...
@@ -419,7 +419,7 @@ static int rt5514_dsp_voice_wake_up_put(struct snd_kcontrol *kcontrol,
}
}
return
0
;
return
1
;
}
static
const
struct
snd_kcontrol_new
rt5514_snd_controls
[]
=
{
...
...
sound/soc/codecs/rt9120.c
View file @
c0b38be1
...
...
@@ -341,7 +341,6 @@ static int rt9120_get_reg_size(unsigned int reg)
{
switch
(
reg
)
{
case
0x00
:
case
0x09
:
case
0x20
...
0x27
:
return
2
;
case
0x30
...
0x3D
:
...
...
sound/soc/codecs/wm8958-dsp2.c
View file @
c0b38be1
...
...
@@ -530,7 +530,7 @@ static int wm8958_mbc_put(struct snd_kcontrol *kcontrol,
wm8958_dsp_apply
(
component
,
mbc
,
wm8994
->
mbc_ena
[
mbc
]);
return
0
;
return
1
;
}
#define WM8958_MBC_SWITCH(xname, xval) {\
...
...
@@ -656,7 +656,7 @@ static int wm8958_vss_put(struct snd_kcontrol *kcontrol,
wm8958_dsp_apply
(
component
,
vss
,
wm8994
->
vss_ena
[
vss
]);
return
0
;
return
1
;
}
...
...
@@ -730,7 +730,7 @@ static int wm8958_hpf_put(struct snd_kcontrol *kcontrol,
wm8958_dsp_apply
(
component
,
hpf
%
3
,
ucontrol
->
value
.
integer
.
value
[
0
]);
return
0
;
return
1
;
}
#define WM8958_HPF_SWITCH(xname, xval) {\
...
...
@@ -824,7 +824,7 @@ static int wm8958_enh_eq_put(struct snd_kcontrol *kcontrol,
wm8958_dsp_apply
(
component
,
eq
,
ucontrol
->
value
.
integer
.
value
[
0
]);
return
0
;
return
1
;
}
#define WM8958_ENH_EQ_SWITCH(xname, xval) {\
...
...
sound/soc/codecs/wm8960.c
View file @
c0b38be1
...
...
@@ -14,6 +14,7 @@
#include <linux/pm.h>
#include <linux/clk.h>
#include <linux/i2c.h>
#include <linux/acpi.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
...
...
@@ -1497,16 +1498,28 @@ static const struct i2c_device_id wm8960_i2c_id[] = {
};
MODULE_DEVICE_TABLE
(
i2c
,
wm8960_i2c_id
);
#if defined(CONFIG_OF)
static
const
struct
of_device_id
wm8960_of_match
[]
=
{
{
.
compatible
=
"wlf,wm8960"
,
},
{
}
};
MODULE_DEVICE_TABLE
(
of
,
wm8960_of_match
);
#endif
#if defined(CONFIG_ACPI)
static
const
struct
acpi_device_id
wm8960_acpi_match
[]
=
{
{
"1AEC8960"
,
0
},
/* Wolfson PCI ID + part ID */
{
"10138960"
,
0
},
/* Cirrus Logic PCI ID + part ID */
{
},
};
MODULE_DEVICE_TABLE
(
acpi
,
wm8960_acpi_match
);
#endif
static
struct
i2c_driver
wm8960_i2c_driver
=
{
.
driver
=
{
.
name
=
"wm8960"
,
.
of_match_table
=
wm8960_of_match
,
.
of_match_table
=
of_match_ptr
(
wm8960_of_match
),
.
acpi_match_table
=
ACPI_PTR
(
wm8960_acpi_match
),
},
.
probe_new
=
wm8960_i2c_probe
,
.
remove
=
wm8960_i2c_remove
,
...
...
sound/soc/generic/simple-card-utils.c
View file @
c0b38be1
...
...
@@ -322,7 +322,7 @@ void asoc_simple_shutdown(struct snd_pcm_substream *substream)
if
(
props
->
mclk_fs
&&
!
dai
->
clk_fixed
&&
!
snd_soc_dai_active
(
cpu_dai
))
snd_soc_dai_set_sysclk
(
cpu_dai
,
0
,
0
,
SND_SOC_CLOCK_
IN
);
0
,
0
,
SND_SOC_CLOCK_
OUT
);
asoc_simple_clk_disable
(
dai
);
}
...
...
sound/soc/meson/aiu-acodec-ctrl.c
View file @
c0b38be1
...
...
@@ -58,7 +58,7 @@ static int aiu_acodec_ctrl_mux_put_enum(struct snd_kcontrol *kcontrol,
snd_soc_dapm_mux_update_power
(
dapm
,
kcontrol
,
mux
,
e
,
NULL
);
return
0
;
return
1
;
}
static
SOC_ENUM_SINGLE_DECL
(
aiu_acodec_ctrl_mux_enum
,
AIU_ACODEC_CTRL
,
...
...
sound/soc/meson/aiu-codec-ctrl.c
View file @
c0b38be1
...
...
@@ -57,7 +57,7 @@ static int aiu_codec_ctrl_mux_put_enum(struct snd_kcontrol *kcontrol,
snd_soc_dapm_mux_update_power
(
dapm
,
kcontrol
,
mux
,
e
,
NULL
);
return
0
;
return
1
;
}
static
SOC_ENUM_SINGLE_DECL
(
aiu_hdmi_ctrl_mux_enum
,
AIU_HDMI_CLK_DATA_CTRL
,
...
...
sound/soc/meson/axg-card.c
View file @
c0b38be1
...
...
@@ -320,7 +320,6 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np,
dai_link
->
cpus
=
cpu
;
dai_link
->
num_cpus
=
1
;
dai_link
->
nonatomic
=
true
;
ret
=
meson_card_parse_dai
(
card
,
np
,
&
dai_link
->
cpus
->
of_node
,
&
dai_link
->
cpus
->
dai_name
);
...
...
sound/soc/meson/axg-tdm-interface.c
View file @
c0b38be1
...
...
@@ -351,29 +351,13 @@ static int axg_tdm_iface_hw_free(struct snd_pcm_substream *substream,
return
0
;
}
static
int
axg_tdm_iface_trigger
(
struct
snd_pcm_substream
*
substream
,
int
cmd
,
static
int
axg_tdm_iface_prepare
(
struct
snd_pcm_substream
*
substream
,
struct
snd_soc_dai
*
dai
)
{
struct
axg_tdm_stream
*
ts
=
snd_soc_dai_get_dma_data
(
dai
,
substream
);
switch
(
cmd
)
{
case
SNDRV_PCM_TRIGGER_START
:
case
SNDRV_PCM_TRIGGER_RESUME
:
case
SNDRV_PCM_TRIGGER_PAUSE_RELEASE
:
axg_tdm_stream_start
(
ts
);
break
;
case
SNDRV_PCM_TRIGGER_SUSPEND
:
case
SNDRV_PCM_TRIGGER_PAUSE_PUSH
:
case
SNDRV_PCM_TRIGGER_STOP
:
axg_tdm_stream_stop
(
ts
);
break
;
default:
return
-
EINVAL
;
}
struct
axg_tdm_stream
*
ts
=
snd_soc_dai_get_dma_data
(
dai
,
substream
);
return
0
;
/* Force all attached formatters to update */
return
axg_tdm_stream_reset
(
ts
);
}
static
int
axg_tdm_iface_remove_dai
(
struct
snd_soc_dai
*
dai
)
...
...
@@ -413,8 +397,8 @@ static const struct snd_soc_dai_ops axg_tdm_iface_ops = {
.
set_fmt
=
axg_tdm_iface_set_fmt
,
.
startup
=
axg_tdm_iface_startup
,
.
hw_params
=
axg_tdm_iface_hw_params
,
.
prepare
=
axg_tdm_iface_prepare
,
.
hw_free
=
axg_tdm_iface_hw_free
,
.
trigger
=
axg_tdm_iface_trigger
,
};
/* TDM Backend DAIs */
...
...
sound/soc/meson/g12a-tohdmitx.c
View file @
c0b38be1
...
...
@@ -67,7 +67,7 @@ static int g12a_tohdmitx_i2s_mux_put_enum(struct snd_kcontrol *kcontrol,
snd_soc_dapm_mux_update_power
(
dapm
,
kcontrol
,
mux
,
e
,
NULL
);
return
0
;
return
1
;
}
static
SOC_ENUM_SINGLE_DECL
(
g12a_tohdmitx_i2s_mux_enum
,
TOHDMITX_CTRL0
,
...
...
sound/soc/soc-dapm.c
View file @
c0b38be1
...
...
@@ -3437,7 +3437,6 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
update
.
val
=
val
;
card
->
update
=
&
update
;
}
change
|=
reg_change
;
ret
=
soc_dapm_mixer_update_power
(
card
,
kcontrol
,
connect
,
rconnect
);
...
...
@@ -3539,7 +3538,6 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
update
.
val
=
val
;
card
->
update
=
&
update
;
}
change
|=
reg_change
;
ret
=
soc_dapm_mux_update_power
(
card
,
kcontrol
,
item
[
0
],
e
);
...
...
sound/soc/soc-generic-dmaengine-pcm.c
View file @
c0b38be1
...
...
@@ -86,10 +86,10 @@ static int dmaengine_pcm_hw_params(struct snd_soc_component *component,
memset
(
&
slave_config
,
0
,
sizeof
(
slave_config
));
if
(
pcm
->
config
&&
pcm
->
config
->
prepare_slave_config
)
prepare_slave_config
=
pcm
->
config
->
prepare_slave_config
;
else
if
(
!
pcm
->
config
)
prepare_slave_config
=
snd_dmaengine_pcm_prepare_slave_config
;
else
prepare_slave_config
=
pcm
->
config
->
prepare_slave_config
;
if
(
prepare_slave_config
)
{
int
ret
=
prepare_slave_config
(
substream
,
params
,
&
slave_config
);
...
...
sound/soc/soc-ops.c
View file @
c0b38be1
...
...
@@ -461,7 +461,7 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
ret
=
err
;
}
}
return
err
;
return
ret
;
}
EXPORT_SYMBOL_GPL
(
snd_soc_put_volsw_sx
);
...
...
@@ -519,7 +519,15 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
unsigned
int
mask
=
(
1
<<
fls
(
max
))
-
1
;
unsigned
int
invert
=
mc
->
invert
;
unsigned
int
val
,
val_mask
;
int
err
,
ret
;
int
err
,
ret
,
tmp
;
tmp
=
ucontrol
->
value
.
integer
.
value
[
0
];
if
(
tmp
<
0
)
return
-
EINVAL
;
if
(
mc
->
platform_max
&&
tmp
>
mc
->
platform_max
)
return
-
EINVAL
;
if
(
tmp
>
mc
->
max
-
mc
->
min
+
1
)
return
-
EINVAL
;
if
(
invert
)
val
=
(
max
-
ucontrol
->
value
.
integer
.
value
[
0
])
&
mask
;
...
...
@@ -534,6 +542,14 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
ret
=
err
;
if
(
snd_soc_volsw_is_stereo
(
mc
))
{
tmp
=
ucontrol
->
value
.
integer
.
value
[
1
];
if
(
tmp
<
0
)
return
-
EINVAL
;
if
(
mc
->
platform_max
&&
tmp
>
mc
->
platform_max
)
return
-
EINVAL
;
if
(
tmp
>
mc
->
max
-
mc
->
min
+
1
)
return
-
EINVAL
;
if
(
invert
)
val
=
(
max
-
ucontrol
->
value
.
integer
.
value
[
1
])
&
mask
;
else
...
...
sound/soc/sof/ipc3-topology.c
View file @
c0b38be1
...
...
@@ -20,7 +20,8 @@
struct
sof_widget_data
{
int
ctrl_type
;
int
ipc_cmd
;
struct
sof_abi_hdr
*
pdata
;
void
*
pdata
;
size_t
pdata_size
;
struct
snd_sof_control
*
control
;
};
...
...
@@ -784,16 +785,26 @@ static int sof_get_control_data(struct snd_soc_component *scomp,
}
cdata
=
wdata
[
i
].
control
->
ipc_control_data
;
wdata
[
i
].
pdata
=
cdata
->
data
;
if
(
!
wdata
[
i
].
pdata
)
return
-
EINVAL
;
/* make sure data is valid - data can be updated at runtime */
if
(
widget
->
dobj
.
widget
.
kcontrol_type
[
i
]
==
SND_SOC_TPLG_TYPE_BYTES
&&
wdata
[
i
].
pdata
->
magic
!=
SOF_ABI_MAGIC
)
return
-
EINVAL
;
if
(
widget
->
dobj
.
widget
.
kcontrol_type
[
i
]
==
SND_SOC_TPLG_TYPE_BYTES
)
{
/* make sure data is valid - data can be updated at runtime */
if
(
cdata
->
data
->
magic
!=
SOF_ABI_MAGIC
)
return
-
EINVAL
;
wdata
[
i
].
pdata
=
cdata
->
data
->
data
;
wdata
[
i
].
pdata_size
=
cdata
->
data
->
size
;
}
else
{
/* points to the control data union */
wdata
[
i
].
pdata
=
cdata
->
chanv
;
/*
* wdata[i].control->size is calculated with struct_size
* and includes the size of struct sof_ipc_ctrl_data
*/
wdata
[
i
].
pdata_size
=
wdata
[
i
].
control
->
size
-
sizeof
(
struct
sof_ipc_ctrl_data
);
}
*
size
+=
wdata
[
i
].
pdata
->
size
;
*
size
+=
wdata
[
i
].
pdata
_
size
;
/* get data type */
switch
(
cdata
->
cmd
)
{
...
...
@@ -876,10 +887,12 @@ static int sof_process_load(struct snd_soc_component *scomp,
*/
if
(
ipc_data_size
)
{
for
(
i
=
0
;
i
<
widget
->
num_kcontrols
;
i
++
)
{
memcpy
(
&
process
->
data
[
offset
],
wdata
[
i
].
pdata
->
data
,
wdata
[
i
].
pdata
->
size
);
offset
+=
wdata
[
i
].
pdata
->
size
;
if
(
!
wdata
[
i
].
pdata_size
)
continue
;
memcpy
(
&
process
->
data
[
offset
],
wdata
[
i
].
pdata
,
wdata
[
i
].
pdata_size
);
offset
+=
wdata
[
i
].
pdata_size
;
}
}
...
...
sound/soc/sof/sof-pci-dev.c
View file @
c0b38be1
...
...
@@ -187,6 +187,11 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
dev_dbg
(
&
pci
->
dev
,
"PCI DSP detected"
);
if
(
!
desc
)
{
dev_err
(
dev
,
"error: no matching PCI descriptor
\n
"
);
return
-
ENODEV
;
}
if
(
!
desc
->
ops
)
{
dev_err
(
dev
,
"error: no matching PCI descriptor ops
\n
"
);
return
-
ENODEV
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment