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
64a07133
Commit
64a07133
authored
Mar 04, 2015
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/fix/atmel-build' into asoc-linus
parents
13a7a6ac
d7a6fe01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
37 deletions
+31
-37
sound/soc/atmel/sam9g20_wm8731.c
sound/soc/atmel/sam9g20_wm8731.c
+31
-37
No files found.
sound/soc/atmel/sam9g20_wm8731.c
View file @
64a07133
...
...
@@ -46,8 +46,6 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <asm/mach-types.h>
#include "../codecs/wm8731.h"
#include "atmel-pcm.h"
#include "atmel_ssc_dai.h"
...
...
@@ -171,9 +169,7 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
int
ret
;
if
(
!
np
)
{
if
(
!
(
machine_is_at91sam9g20ek
()
||
machine_is_at91sam9g20ek_2mmc
()))
return
-
ENODEV
;
return
-
ENODEV
;
}
ret
=
atmel_ssc_set_audio
(
0
);
...
...
@@ -210,39 +206,37 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
card
->
dev
=
&
pdev
->
dev
;
/* Parse device node info */
if
(
np
)
{
ret
=
snd_soc_of_parse_card_name
(
card
,
"atmel,model"
);
if
(
ret
)
goto
err
;
ret
=
snd_soc_of_parse_audio_routing
(
card
,
"atmel,audio-routing"
);
if
(
ret
)
goto
err
;
/* Parse codec info */
at91sam9g20ek_dai
.
codec_name
=
NULL
;
codec_np
=
of_parse_phandle
(
np
,
"atmel,audio-codec"
,
0
);
if
(
!
codec_np
)
{
dev_err
(
&
pdev
->
dev
,
"codec info missing
\n
"
);
return
-
EINVAL
;
}
at91sam9g20ek_dai
.
codec_of_node
=
codec_np
;
/* Parse dai and platform info */
at91sam9g20ek_dai
.
cpu_dai_name
=
NULL
;
at91sam9g20ek_dai
.
platform_name
=
NULL
;
cpu_np
=
of_parse_phandle
(
np
,
"atmel,ssc-controller"
,
0
);
if
(
!
cpu_np
)
{
dev_err
(
&
pdev
->
dev
,
"dai and pcm info missing
\n
"
);
return
-
EINVAL
;
}
at91sam9g20ek_dai
.
cpu_of_node
=
cpu_np
;
at91sam9g20ek_dai
.
platform_of_node
=
cpu_np
;
of_node_put
(
codec_np
);
of_node_put
(
cpu_np
);
ret
=
snd_soc_of_parse_card_name
(
card
,
"atmel,model"
);
if
(
ret
)
goto
err
;
ret
=
snd_soc_of_parse_audio_routing
(
card
,
"atmel,audio-routing"
);
if
(
ret
)
goto
err
;
/* Parse codec info */
at91sam9g20ek_dai
.
codec_name
=
NULL
;
codec_np
=
of_parse_phandle
(
np
,
"atmel,audio-codec"
,
0
);
if
(
!
codec_np
)
{
dev_err
(
&
pdev
->
dev
,
"codec info missing
\n
"
);
return
-
EINVAL
;
}
at91sam9g20ek_dai
.
codec_of_node
=
codec_np
;
/* Parse dai and platform info */
at91sam9g20ek_dai
.
cpu_dai_name
=
NULL
;
at91sam9g20ek_dai
.
platform_name
=
NULL
;
cpu_np
=
of_parse_phandle
(
np
,
"atmel,ssc-controller"
,
0
);
if
(
!
cpu_np
)
{
dev_err
(
&
pdev
->
dev
,
"dai and pcm info missing
\n
"
);
return
-
EINVAL
;
}
at91sam9g20ek_dai
.
cpu_of_node
=
cpu_np
;
at91sam9g20ek_dai
.
platform_of_node
=
cpu_np
;
of_node_put
(
codec_np
);
of_node_put
(
cpu_np
);
ret
=
snd_soc_register_card
(
card
);
if
(
ret
)
{
...
...
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