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
a9930569
Commit
a9930569
authored
Jan 12, 2018
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/fix/mtk' into asoc-linus
parents
15fc3a22
dd6bb9b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+14
-17
No files found.
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
View file @
a9930569
...
@@ -1590,12 +1590,16 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
...
@@ -1590,12 +1590,16 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
}
}
platform_set_drvdata
(
pdev
,
afe
);
platform_set_drvdata
(
pdev
,
afe
);
pm_runtime_enable
(
&
pdev
->
dev
);
if
(
!
pm_runtime_enabled
(
&
pdev
->
dev
))
pm_runtime_enable
(
dev
);
if
(
!
pm_runtime_enabled
(
dev
))
{
ret
=
mt2701_afe_runtime_resume
(
dev
);
if
(
ret
)
goto
err_pm_disable
;
goto
err_pm_disable
;
pm_runtime_get_sync
(
&
pdev
->
dev
);
}
pm_runtime_get_sync
(
dev
);
ret
=
snd_soc_register_platform
(
&
pdev
->
dev
,
&
mtk_afe_pcm_platform
);
ret
=
snd_soc_register_platform
(
dev
,
&
mtk_afe_pcm_platform
);
if
(
ret
)
{
if
(
ret
)
{
dev_warn
(
dev
,
"err_platform
\n
"
);
dev_warn
(
dev
,
"err_platform
\n
"
);
goto
err_platform
;
goto
err_platform
;
...
@@ -1610,35 +1614,28 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
...
@@ -1610,35 +1614,28 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
goto
err_dai_component
;
goto
err_dai_component
;
}
}
mt2701_afe_runtime_resume
(
&
pdev
->
dev
);
return
0
;
return
0
;
err_dai_component:
err_dai_component:
snd_soc_unregister_component
(
&
pdev
->
dev
);
snd_soc_unregister_platform
(
dev
);
err_platform:
err_platform:
snd_soc_unregister_platform
(
&
pdev
->
dev
);
pm_runtime_put_sync
(
dev
);
err_pm_disable:
err_pm_disable:
pm_runtime_disable
(
&
pdev
->
dev
);
pm_runtime_disable
(
dev
);
return
ret
;
return
ret
;
}
}
static
int
mt2701_afe_pcm_dev_remove
(
struct
platform_device
*
pdev
)
static
int
mt2701_afe_pcm_dev_remove
(
struct
platform_device
*
pdev
)
{
{
struct
mtk_base_afe
*
afe
=
platform_get_drvdata
(
pdev
);
pm_runtime_put_sync
(
&
pdev
->
dev
);
pm_runtime_disable
(
&
pdev
->
dev
);
pm_runtime_disable
(
&
pdev
->
dev
);
if
(
!
pm_runtime_status_suspended
(
&
pdev
->
dev
))
if
(
!
pm_runtime_status_suspended
(
&
pdev
->
dev
))
mt2701_afe_runtime_suspend
(
&
pdev
->
dev
);
mt2701_afe_runtime_suspend
(
&
pdev
->
dev
);
pm_runtime_put_sync
(
&
pdev
->
dev
);
snd_soc_unregister_component
(
&
pdev
->
dev
);
snd_soc_unregister_component
(
&
pdev
->
dev
);
snd_soc_unregister_platform
(
&
pdev
->
dev
);
snd_soc_unregister_platform
(
&
pdev
->
dev
);
/* disable afe clock */
mt2701_afe_disable_clock
(
afe
);
return
0
;
return
0
;
}
}
...
...
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