|
@@ -543,10 +543,10 @@ static void wm_adsp2_show_fw_status(struct wm_adsp *dsp)
|
|
be16_to_cpu(scratch[3]));
|
|
be16_to_cpu(scratch[3]));
|
|
}
|
|
}
|
|
|
|
|
|
-static int wm_coeff_info(struct snd_kcontrol *kcontrol,
|
|
|
|
|
|
+static int wm_coeff_info(struct snd_kcontrol *kctl,
|
|
struct snd_ctl_elem_info *uinfo)
|
|
struct snd_ctl_elem_info *uinfo)
|
|
{
|
|
{
|
|
- struct wm_coeff_ctl *ctl = (struct wm_coeff_ctl *)kcontrol->private_value;
|
|
|
|
|
|
+ struct wm_coeff_ctl *ctl = (struct wm_coeff_ctl *)kctl->private_value;
|
|
|
|
|
|
uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
|
|
uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
|
|
uinfo->count = ctl->len;
|
|
uinfo->count = ctl->len;
|
|
@@ -592,10 +592,10 @@ static int wm_coeff_write_control(struct wm_coeff_ctl *ctl,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static int wm_coeff_put(struct snd_kcontrol *kcontrol,
|
|
|
|
|
|
+static int wm_coeff_put(struct snd_kcontrol *kctl,
|
|
struct snd_ctl_elem_value *ucontrol)
|
|
struct snd_ctl_elem_value *ucontrol)
|
|
{
|
|
{
|
|
- struct wm_coeff_ctl *ctl = (struct wm_coeff_ctl *)kcontrol->private_value;
|
|
|
|
|
|
+ struct wm_coeff_ctl *ctl = (struct wm_coeff_ctl *)kctl->private_value;
|
|
char *p = ucontrol->value.bytes.data;
|
|
char *p = ucontrol->value.bytes.data;
|
|
|
|
|
|
memcpy(ctl->cache, p, ctl->len);
|
|
memcpy(ctl->cache, p, ctl->len);
|
|
@@ -646,10 +646,10 @@ static int wm_coeff_read_control(struct wm_coeff_ctl *ctl,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static int wm_coeff_get(struct snd_kcontrol *kcontrol,
|
|
|
|
|
|
+static int wm_coeff_get(struct snd_kcontrol *kctl,
|
|
struct snd_ctl_elem_value *ucontrol)
|
|
struct snd_ctl_elem_value *ucontrol)
|
|
{
|
|
{
|
|
- struct wm_coeff_ctl *ctl = (struct wm_coeff_ctl *)kcontrol->private_value;
|
|
|
|
|
|
+ struct wm_coeff_ctl *ctl = (struct wm_coeff_ctl *)kctl->private_value;
|
|
char *p = ucontrol->value.bytes.data;
|
|
char *p = ucontrol->value.bytes.data;
|
|
|
|
|
|
if (ctl->flags & WMFW_CTL_FLAG_VOLATILE) {
|
|
if (ctl->flags & WMFW_CTL_FLAG_VOLATILE) {
|
|
@@ -828,8 +828,7 @@ static int wm_adsp_create_control(struct wm_adsp *dsp,
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
- list_for_each_entry(ctl, &dsp->ctl_list,
|
|
|
|
- list) {
|
|
|
|
|
|
+ list_for_each_entry(ctl, &dsp->ctl_list, list) {
|
|
if (!strcmp(ctl->name, name)) {
|
|
if (!strcmp(ctl->name, name)) {
|
|
if (!ctl->enabled)
|
|
if (!ctl->enabled)
|
|
ctl->enabled = 1;
|
|
ctl->enabled = 1;
|
|
@@ -1108,7 +1107,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)
|
|
goto out_fw;
|
|
goto out_fw;
|
|
}
|
|
}
|
|
|
|
|
|
- header = (void*)&firmware->data[0];
|
|
|
|
|
|
+ header = (void *)&firmware->data[0];
|
|
|
|
|
|
if (memcmp(&header->magic[0], "WMFW", 4) != 0) {
|
|
if (memcmp(&header->magic[0], "WMFW", 4) != 0) {
|
|
adsp_err(dsp, "%s: invalid magic\n", file);
|
|
adsp_err(dsp, "%s: invalid magic\n", file);
|
|
@@ -1188,7 +1187,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)
|
|
offset = le32_to_cpu(region->offset) & 0xffffff;
|
|
offset = le32_to_cpu(region->offset) & 0xffffff;
|
|
type = be32_to_cpu(region->type) & 0xff;
|
|
type = be32_to_cpu(region->type) & 0xff;
|
|
mem = wm_adsp_find_region(dsp, type);
|
|
mem = wm_adsp_find_region(dsp, type);
|
|
-
|
|
|
|
|
|
+
|
|
switch (type) {
|
|
switch (type) {
|
|
case WMFW_NAME_TEXT:
|
|
case WMFW_NAME_TEXT:
|
|
region_name = "Firmware name";
|
|
region_name = "Firmware name";
|
|
@@ -1645,7 +1644,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
|
|
goto out_fw;
|
|
goto out_fw;
|
|
}
|
|
}
|
|
|
|
|
|
- hdr = (void*)&firmware->data[0];
|
|
|
|
|
|
+ hdr = (void *)&firmware->data[0];
|
|
if (memcmp(hdr->magic, "WMDR", 4) != 0) {
|
|
if (memcmp(hdr->magic, "WMDR", 4) != 0) {
|
|
adsp_err(dsp, "%s: invalid magic\n", file);
|
|
adsp_err(dsp, "%s: invalid magic\n", file);
|
|
goto out_fw;
|
|
goto out_fw;
|
|
@@ -1671,7 +1670,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
|
|
blocks = 0;
|
|
blocks = 0;
|
|
while (pos < firmware->size &&
|
|
while (pos < firmware->size &&
|
|
pos - firmware->size > sizeof(*blk)) {
|
|
pos - firmware->size > sizeof(*blk)) {
|
|
- blk = (void*)(&firmware->data[pos]);
|
|
|
|
|
|
+ blk = (void *)(&firmware->data[pos]);
|
|
|
|
|
|
type = le16_to_cpu(blk->type);
|
|
type = le16_to_cpu(blk->type);
|
|
offset = le16_to_cpu(blk->offset);
|
|
offset = le16_to_cpu(blk->offset);
|
|
@@ -1814,7 +1813,7 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w,
|
|
struct wm_adsp_alg_region *alg_region;
|
|
struct wm_adsp_alg_region *alg_region;
|
|
struct wm_coeff_ctl *ctl;
|
|
struct wm_coeff_ctl *ctl;
|
|
int ret;
|
|
int ret;
|
|
- int val;
|
|
|
|
|
|
+ unsigned int val;
|
|
|
|
|
|
dsp->card = codec->component.card;
|
|
dsp->card = codec->component.card;
|
|
|
|
|
|
@@ -1829,7 +1828,7 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w,
|
|
* For simplicity set the DSP clock rate to be the
|
|
* For simplicity set the DSP clock rate to be the
|
|
* SYSCLK rate rather than making it configurable.
|
|
* SYSCLK rate rather than making it configurable.
|
|
*/
|
|
*/
|
|
- if(dsp->sysclk_reg) {
|
|
|
|
|
|
+ if (dsp->sysclk_reg) {
|
|
ret = regmap_read(dsp->regmap, dsp->sysclk_reg, &val);
|
|
ret = regmap_read(dsp->regmap, dsp->sysclk_reg, &val);
|
|
if (ret != 0) {
|
|
if (ret != 0) {
|
|
adsp_err(dsp, "Failed to read SYSCLK state: %d\n",
|
|
adsp_err(dsp, "Failed to read SYSCLK state: %d\n",
|