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
nexedi
linux
Commits
425c5a85
Commit
425c5a85
authored
Nov 03, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next
parents
14d90774
3626992a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
sound/soc/codecs/wm_adsp.c
sound/soc/codecs/wm_adsp.c
+20
-7
No files found.
sound/soc/codecs/wm_adsp.c
View file @
425c5a85
...
@@ -396,11 +396,12 @@ static int wm_coeff_write_control(struct snd_kcontrol *kcontrol,
...
@@ -396,11 +396,12 @@ static int wm_coeff_write_control(struct snd_kcontrol *kcontrol,
ret
=
regmap_raw_write
(
adsp
->
regmap
,
reg
,
scratch
,
ret
=
regmap_raw_write
(
adsp
->
regmap
,
reg
,
scratch
,
ctl
->
len
);
ctl
->
len
);
if
(
ret
)
{
if
(
ret
)
{
adsp_err
(
adsp
,
"Failed to write %zu bytes to %x
\n
"
,
adsp_err
(
adsp
,
"Failed to write %zu bytes to %x
: %d
\n
"
,
ctl
->
len
,
reg
);
ctl
->
len
,
reg
,
ret
);
kfree
(
scratch
);
kfree
(
scratch
);
return
ret
;
return
ret
;
}
}
adsp_dbg
(
adsp
,
"Wrote %zu bytes to %x
\n
"
,
ctl
->
len
,
reg
);
kfree
(
scratch
);
kfree
(
scratch
);
...
@@ -450,11 +451,12 @@ static int wm_coeff_read_control(struct snd_kcontrol *kcontrol,
...
@@ -450,11 +451,12 @@ static int wm_coeff_read_control(struct snd_kcontrol *kcontrol,
ret
=
regmap_raw_read
(
adsp
->
regmap
,
reg
,
scratch
,
ctl
->
len
);
ret
=
regmap_raw_read
(
adsp
->
regmap
,
reg
,
scratch
,
ctl
->
len
);
if
(
ret
)
{
if
(
ret
)
{
adsp_err
(
adsp
,
"Failed to read %zu bytes from %x
\n
"
,
adsp_err
(
adsp
,
"Failed to read %zu bytes from %x
: %d
\n
"
,
ctl
->
len
,
reg
);
ctl
->
len
,
reg
,
ret
);
kfree
(
scratch
);
kfree
(
scratch
);
return
ret
;
return
ret
;
}
}
adsp_dbg
(
adsp
,
"Read %zu bytes from %x
\n
"
,
ctl
->
len
,
reg
);
memcpy
(
buf
,
scratch
,
ctl
->
len
);
memcpy
(
buf
,
scratch
,
ctl
->
len
);
kfree
(
scratch
);
kfree
(
scratch
);
...
@@ -568,6 +570,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)
...
@@ -568,6 +570,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)
file
,
header
->
ver
);
file
,
header
->
ver
);
goto
out_fw
;
goto
out_fw
;
}
}
adsp_info
(
dsp
,
"Firmware version: %d
\n
"
,
header
->
ver
);
if
(
header
->
core
!=
dsp
->
type
)
{
if
(
header
->
core
!=
dsp
->
type
)
{
adsp_err
(
dsp
,
"%s: invalid core %d != %d
\n
"
,
adsp_err
(
dsp
,
"%s: invalid core %d != %d
\n
"
,
...
@@ -689,7 +692,8 @@ static int wm_adsp_load(struct wm_adsp *dsp)
...
@@ -689,7 +692,8 @@ static int wm_adsp_load(struct wm_adsp *dsp)
&
buf_list
);
&
buf_list
);
if
(
!
buf
)
{
if
(
!
buf
)
{
adsp_err
(
dsp
,
"Out of memory
\n
"
);
adsp_err
(
dsp
,
"Out of memory
\n
"
);
return
-
ENOMEM
;
ret
=
-
ENOMEM
;
goto
out_fw
;
}
}
ret
=
regmap_raw_write_async
(
regmap
,
reg
,
buf
->
buf
,
ret
=
regmap_raw_write_async
(
regmap
,
reg
,
buf
->
buf
,
...
@@ -1313,8 +1317,8 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
...
@@ -1313,8 +1317,8 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
le32_to_cpu
(
blk
->
len
));
le32_to_cpu
(
blk
->
len
));
if
(
ret
!=
0
)
{
if
(
ret
!=
0
)
{
adsp_err
(
dsp
,
adsp_err
(
dsp
,
"%s.%d: Failed to write to %x in %s
\n
"
,
"%s.%d: Failed to write to %x in %s
: %d
\n
"
,
file
,
blocks
,
reg
,
region_name
);
file
,
blocks
,
reg
,
region_name
,
ret
);
}
}
}
}
...
@@ -1358,6 +1362,7 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w,
...
@@ -1358,6 +1362,7 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w,
struct
snd_soc_codec
*
codec
=
w
->
codec
;
struct
snd_soc_codec
*
codec
=
w
->
codec
;
struct
wm_adsp
*
dsps
=
snd_soc_codec_get_drvdata
(
codec
);
struct
wm_adsp
*
dsps
=
snd_soc_codec_get_drvdata
(
codec
);
struct
wm_adsp
*
dsp
=
&
dsps
[
w
->
shift
];
struct
wm_adsp
*
dsp
=
&
dsps
[
w
->
shift
];
struct
wm_adsp_alg_region
*
alg_region
;
struct
wm_coeff_ctl
*
ctl
;
struct
wm_coeff_ctl
*
ctl
;
int
ret
;
int
ret
;
int
val
;
int
val
;
...
@@ -1435,6 +1440,14 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w,
...
@@ -1435,6 +1440,14 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w,
list_for_each_entry
(
ctl
,
&
dsp
->
ctl_list
,
list
)
list_for_each_entry
(
ctl
,
&
dsp
->
ctl_list
,
list
)
ctl
->
enabled
=
0
;
ctl
->
enabled
=
0
;
while
(
!
list_empty
(
&
dsp
->
alg_regions
))
{
alg_region
=
list_first_entry
(
&
dsp
->
alg_regions
,
struct
wm_adsp_alg_region
,
list
);
list_del
(
&
alg_region
->
list
);
kfree
(
alg_region
);
}
break
;
break
;
default:
default:
...
...
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