Skip to content

Commit dc0e5ca

Browse files
rfvirgilbroonie
authored andcommitted
firmware: cs_dsp: Rename fw_ver to wmfw_ver
Rename the confusingly named struct member fw_ver to wmfw_ver. It contains the wmfw format version of the loaded wmfw file. This commit also contains an update to wm_adsp for the new name. Signed-off-by: Richard Fitzgerald <[email protected]> Reviewed-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent a493911 commit dc0e5ca

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

drivers/firmware/cirrus/cs_dsp.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ static int cs_dsp_create_control(struct cs_dsp *dsp,
10481048

10491049
ctl->fw_name = dsp->fw_name;
10501050
ctl->alg_region = *alg_region;
1051-
if (subname && dsp->fw_ver >= 2) {
1051+
if (subname && dsp->wmfw_ver >= 2) {
10521052
ctl->subname_len = subname_len;
10531053
ctl->subname = kasprintf(GFP_KERNEL, "%.*s", subname_len, subname);
10541054
if (!ctl->subname) {
@@ -1175,7 +1175,7 @@ static int cs_dsp_coeff_parse_alg(struct cs_dsp *dsp,
11751175

11761176
raw = (const struct wmfw_adsp_alg_data *)region->data;
11771177

1178-
switch (dsp->fw_ver) {
1178+
switch (dsp->wmfw_ver) {
11791179
case 0:
11801180
case 1:
11811181
if (sizeof(*raw) > data_len)
@@ -1252,7 +1252,7 @@ static int cs_dsp_coeff_parse_coeff(struct cs_dsp *dsp,
12521252
blk->offset = le16_to_cpu(raw->hdr.offset);
12531253
blk->mem_type = le16_to_cpu(raw->hdr.type);
12541254

1255-
switch (dsp->fw_ver) {
1255+
switch (dsp->wmfw_ver) {
12561256
case 0:
12571257
case 1:
12581258
if (sizeof(*raw) > (data_len - pos))
@@ -1499,7 +1499,7 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware,
14991499
goto out_fw;
15001500
}
15011501

1502-
dsp->fw_ver = header->ver;
1502+
dsp->wmfw_ver = header->ver;
15031503

15041504
if (header->core != dsp->type) {
15051505
cs_dsp_err(dsp, "%s: invalid core %d != %d\n",
@@ -1779,7 +1779,7 @@ static struct cs_dsp_alg_region *cs_dsp_create_region(struct cs_dsp *dsp,
17791779

17801780
list_add_tail(&alg_region->list, &dsp->alg_regions);
17811781

1782-
if (dsp->fw_ver > 0)
1782+
if (dsp->wmfw_ver > 0)
17831783
cs_dsp_ctl_fixup_base(dsp, alg_region);
17841784

17851785
return alg_region;
@@ -1902,7 +1902,7 @@ static int cs_dsp_adsp1_setup_algs(struct cs_dsp *dsp)
19021902
ret = PTR_ERR(alg_region);
19031903
goto out;
19041904
}
1905-
if (dsp->fw_ver == 0) {
1905+
if (dsp->wmfw_ver == 0) {
19061906
if (i + 1 < n_algs) {
19071907
len = be32_to_cpu(adsp1_alg[i + 1].dm);
19081908
len -= be32_to_cpu(adsp1_alg[i].dm);
@@ -1924,7 +1924,7 @@ static int cs_dsp_adsp1_setup_algs(struct cs_dsp *dsp)
19241924
ret = PTR_ERR(alg_region);
19251925
goto out;
19261926
}
1927-
if (dsp->fw_ver == 0) {
1927+
if (dsp->wmfw_ver == 0) {
19281928
if (i + 1 < n_algs) {
19291929
len = be32_to_cpu(adsp1_alg[i + 1].zm);
19301930
len -= be32_to_cpu(adsp1_alg[i].zm);
@@ -2015,7 +2015,7 @@ static int cs_dsp_adsp2_setup_algs(struct cs_dsp *dsp)
20152015
ret = PTR_ERR(alg_region);
20162016
goto out;
20172017
}
2018-
if (dsp->fw_ver == 0) {
2018+
if (dsp->wmfw_ver == 0) {
20192019
if (i + 1 < n_algs) {
20202020
len = be32_to_cpu(adsp2_alg[i + 1].xm);
20212021
len -= be32_to_cpu(adsp2_alg[i].xm);
@@ -2037,7 +2037,7 @@ static int cs_dsp_adsp2_setup_algs(struct cs_dsp *dsp)
20372037
ret = PTR_ERR(alg_region);
20382038
goto out;
20392039
}
2040-
if (dsp->fw_ver == 0) {
2040+
if (dsp->wmfw_ver == 0) {
20412041
if (i + 1 < n_algs) {
20422042
len = be32_to_cpu(adsp2_alg[i + 1].ym);
20432043
len -= be32_to_cpu(adsp2_alg[i].ym);
@@ -2059,7 +2059,7 @@ static int cs_dsp_adsp2_setup_algs(struct cs_dsp *dsp)
20592059
ret = PTR_ERR(alg_region);
20602060
goto out;
20612061
}
2062-
if (dsp->fw_ver == 0) {
2062+
if (dsp->wmfw_ver == 0) {
20632063
if (i + 1 < n_algs) {
20642064
len = be32_to_cpu(adsp2_alg[i + 1].zm);
20652065
len -= be32_to_cpu(adsp2_alg[i].zm);

include/linux/firmware/cirrus/cs_dsp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ struct cs_dsp {
167167
const struct cs_dsp_region *mem;
168168
int num_mems;
169169

170-
int fw_ver;
170+
int wmfw_ver;
171171

172172
bool booted;
173173
bool running;

sound/soc/codecs/wm_adsp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ static int wm_adsp_control_add(struct cs_dsp_coeff_ctl *cs_ctl)
601601
return -EINVAL;
602602
}
603603

604-
switch (cs_dsp->fw_ver) {
604+
switch (cs_dsp->wmfw_ver) {
605605
case 0:
606606
case 1:
607607
ret = scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,

0 commit comments

Comments
 (0)