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
92a9d152
Commit
92a9d152
authored
Jan 10, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/fix/wm-adsp' into tmp
parents
a883eae5
a76fefab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
sound/soc/codecs/wm_adsp.c
sound/soc/codecs/wm_adsp.c
+22
-1
No files found.
sound/soc/codecs/wm_adsp.c
View file @
92a9d152
...
...
@@ -169,6 +169,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)
const
struct
wm_adsp_region
*
mem
;
const
char
*
region_name
;
char
*
file
,
*
text
;
void
*
buf
;
unsigned
int
reg
;
int
regions
=
0
;
int
ret
,
offset
,
type
,
sizes
;
...
...
@@ -322,8 +323,18 @@ static int wm_adsp_load(struct wm_adsp *dsp)
}
if
(
reg
)
{
ret
=
regmap_raw_write
(
regmap
,
reg
,
region
->
data
,
buf
=
kmemdup
(
region
->
data
,
le32_to_cpu
(
region
->
len
),
GFP_KERNEL
);
if
(
!
buf
)
{
adsp_err
(
dsp
,
"Out of memory
\n
"
);
return
-
ENOMEM
;
}
ret
=
regmap_raw_write
(
regmap
,
reg
,
buf
,
le32_to_cpu
(
region
->
len
));
kfree
(
buf
);
if
(
ret
!=
0
)
{
adsp_err
(
dsp
,
"%s.%d: Failed to write %d bytes at %d in %s: %d
\n
"
,
...
...
@@ -359,6 +370,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
const
char
*
region_name
;
int
ret
,
pos
,
blocks
,
type
,
offset
,
reg
;
char
*
file
;
void
*
buf
;
file
=
kzalloc
(
PAGE_SIZE
,
GFP_KERNEL
);
if
(
file
==
NULL
)
...
...
@@ -426,6 +438,13 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
}
if
(
reg
)
{
buf
=
kmemdup
(
blk
->
data
,
le32_to_cpu
(
blk
->
len
),
GFP_KERNEL
);
if
(
!
buf
)
{
adsp_err
(
dsp
,
"Out of memory
\n
"
);
return
-
ENOMEM
;
}
ret
=
regmap_raw_write
(
regmap
,
reg
,
blk
->
data
,
le32_to_cpu
(
blk
->
len
));
if
(
ret
!=
0
)
{
...
...
@@ -433,6 +452,8 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
"%s.%d: Failed to write to %x in %s
\n
"
,
file
,
blocks
,
reg
,
region_name
);
}
kfree
(
buf
);
}
pos
+=
le32_to_cpu
(
blk
->
len
)
+
sizeof
(
*
blk
);
...
...
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