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
e162520d
Commit
e162520d
authored
Apr 12, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/fix/samsung' into asoc-next
parents
75c3475d
c6f9b1eb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
sound/soc/samsung/i2s.c
sound/soc/samsung/i2s.c
+12
-5
No files found.
sound/soc/samsung/i2s.c
View file @
e162520d
...
...
@@ -972,6 +972,7 @@ static const struct snd_soc_dai_ops samsung_i2s_dai_ops = {
static
struct
i2s_dai
*
i2s_alloc_dai
(
struct
platform_device
*
pdev
,
bool
sec
)
{
struct
i2s_dai
*
i2s
;
int
ret
;
i2s
=
devm_kzalloc
(
&
pdev
->
dev
,
sizeof
(
struct
i2s_dai
),
GFP_KERNEL
);
if
(
i2s
==
NULL
)
...
...
@@ -996,15 +997,17 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec)
i2s
->
i2s_dai_drv
.
capture
.
channels_max
=
2
;
i2s
->
i2s_dai_drv
.
capture
.
rates
=
SAMSUNG_I2S_RATES
;
i2s
->
i2s_dai_drv
.
capture
.
formats
=
SAMSUNG_I2S_FMTS
;
dev_set_drvdata
(
&
i2s
->
pdev
->
dev
,
i2s
);
}
else
{
/* Create a new platform_device for Secondary */
i2s
->
pdev
=
platform_device_register_resndata
(
NULL
,
"samsung-i2s-sec"
,
-
1
,
NULL
,
0
,
NULL
,
0
);
i2s
->
pdev
=
platform_device_alloc
(
"samsung-i2s-sec"
,
-
1
);
if
(
IS_ERR
(
i2s
->
pdev
))
return
NULL
;
}
/* Pre-assign snd_soc_dai_set_drvdata */
dev_set_drvdata
(
&
i2s
->
pdev
->
dev
,
i2s
);
platform_set_drvdata
(
i2s
->
pdev
,
i2s
);
ret
=
platform_device_add
(
i2s
->
pdev
);
if
(
ret
<
0
)
return
NULL
;
}
return
i2s
;
}
...
...
@@ -1107,6 +1110,10 @@ static int samsung_i2s_probe(struct platform_device *pdev)
if
(
samsung_dai_type
==
TYPE_SEC
)
{
sec_dai
=
dev_get_drvdata
(
&
pdev
->
dev
);
if
(
!
sec_dai
)
{
dev_err
(
&
pdev
->
dev
,
"Unable to get drvdata
\n
"
);
return
-
EFAULT
;
}
snd_soc_register_dai
(
&
sec_dai
->
pdev
->
dev
,
&
sec_dai
->
i2s_dai_drv
);
asoc_dma_platform_register
(
&
pdev
->
dev
);
...
...
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