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
13419625
Commit
13419625
authored
Apr 12, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/component' into asoc-next
parents
604c724b
89cab462
Changes
59
Hide whitespace changes
Inline
Side-by-side
Showing
59 changed files
with
522 additions
and
171 deletions
+522
-171
include/sound/soc-dai.h
include/sound/soc-dai.h
+0
-8
include/sound/soc.h
include/sound/soc.h
+20
-0
sound/soc/atmel/atmel_ssc_dai.c
sound/soc/atmel/atmel_ssc_dai.c
+8
-3
sound/soc/au1x/ac97c.c
sound/soc/au1x/ac97c.c
+7
-2
sound/soc/au1x/i2sc.c
sound/soc/au1x/i2sc.c
+7
-2
sound/soc/au1x/psc-ac97.c
sound/soc/au1x/psc-ac97.c
+7
-2
sound/soc/au1x/psc-i2s.c
sound/soc/au1x/psc-i2s.c
+7
-2
sound/soc/blackfin/bf5xx-ac97.c
sound/soc/blackfin/bf5xx-ac97.c
+7
-2
sound/soc/blackfin/bf5xx-i2s.c
sound/soc/blackfin/bf5xx-i2s.c
+7
-2
sound/soc/blackfin/bf5xx-tdm.c
sound/soc/blackfin/bf5xx-tdm.c
+7
-2
sound/soc/blackfin/bf6xx-i2s.c
sound/soc/blackfin/bf6xx-i2s.c
+7
-2
sound/soc/cirrus/ep93xx-ac97.c
sound/soc/cirrus/ep93xx-ac97.c
+7
-2
sound/soc/cirrus/ep93xx-i2s.c
sound/soc/cirrus/ep93xx-i2s.c
+7
-2
sound/soc/davinci/davinci-i2s.c
sound/soc/davinci/davinci-i2s.c
+10
-5
sound/soc/davinci/davinci-mcasp.c
sound/soc/davinci/davinci-mcasp.c
+10
-5
sound/soc/davinci/davinci-vcif.c
sound/soc/davinci/davinci-vcif.c
+8
-3
sound/soc/dwc/designware_i2s.c
sound/soc/dwc/designware_i2s.c
+7
-2
sound/soc/fsl/fsl_ssi.c
sound/soc/fsl/fsl_ssi.c
+8
-3
sound/soc/fsl/imx-ssi.c
sound/soc/fsl/imx-ssi.c
+8
-3
sound/soc/fsl/mpc5200_psc_ac97.c
sound/soc/fsl/mpc5200_psc_ac97.c
+6
-2
sound/soc/fsl/mpc5200_psc_i2s.c
sound/soc/fsl/mpc5200_psc_i2s.c
+7
-2
sound/soc/jz4740/jz4740-i2s.c
sound/soc/jz4740/jz4740-i2s.c
+7
-2
sound/soc/kirkwood/kirkwood-i2s.c
sound/soc/kirkwood/kirkwood-i2s.c
+8
-3
sound/soc/mid-x86/sst_platform.c
sound/soc/mid-x86/sst_platform.c
+6
-2
sound/soc/mxs/mxs-saif.c
sound/soc/mxs/mxs-saif.c
+8
-3
sound/soc/nuc900/nuc900-ac97.c
sound/soc/nuc900/nuc900-ac97.c
+7
-2
sound/soc/omap/omap-dmic.c
sound/soc/omap/omap-dmic.c
+7
-2
sound/soc/omap/omap-hdmi.c
sound/soc/omap/omap-hdmi.c
+7
-2
sound/soc/omap/omap-mcbsp.c
sound/soc/omap/omap-mcbsp.c
+7
-2
sound/soc/omap/omap-mcpdm.c
sound/soc/omap/omap-mcpdm.c
+7
-2
sound/soc/pxa/mmp-sspa.c
sound/soc/pxa/mmp-sspa.c
+7
-2
sound/soc/pxa/pxa-ssp.c
sound/soc/pxa/pxa-ssp.c
+7
-2
sound/soc/pxa/pxa2xx-ac97.c
sound/soc/pxa/pxa2xx-ac97.c
+7
-4
sound/soc/pxa/pxa2xx-i2s.c
sound/soc/pxa/pxa2xx-i2s.c
+7
-2
sound/soc/s6000/s6000-i2s.c
sound/soc/s6000/s6000-i2s.c
+7
-2
sound/soc/samsung/ac97.c
sound/soc/samsung/ac97.c
+8
-4
sound/soc/samsung/goni_wm8994.c
sound/soc/samsung/goni_wm8994.c
+8
-3
sound/soc/samsung/i2s.c
sound/soc/samsung/i2s.c
+10
-4
sound/soc/samsung/pcm.c
sound/soc/samsung/pcm.c
+8
-3
sound/soc/samsung/s3c-i2s-v2.c
sound/soc/samsung/s3c-i2s-v2.c
+5
-4
sound/soc/samsung/s3c-i2s-v2.h
sound/soc/samsung/s3c-i2s-v2.h
+4
-3
sound/soc/samsung/s3c2412-i2s.c
sound/soc/samsung/s3c2412-i2s.c
+9
-3
sound/soc/samsung/s3c24xx-i2s.c
sound/soc/samsung/s3c24xx-i2s.c
+8
-3
sound/soc/samsung/spdif.c
sound/soc/samsung/spdif.c
+8
-3
sound/soc/sh/fsi.c
sound/soc/sh/fsi.c
+8
-4
sound/soc/sh/hac.c
sound/soc/sh/hac.c
+7
-3
sound/soc/sh/migor.c
sound/soc/sh/migor.c
+1
-1
sound/soc/sh/siu_dai.c
sound/soc/sh/siu_dai.c
+8
-3
sound/soc/sh/ssi.c
sound/soc/sh/ssi.c
+7
-3
sound/soc/soc-core.c
sound/soc/soc-core.c
+91
-8
sound/soc/spear/spdif_in.c
sound/soc/spear/spdif_in.c
+7
-2
sound/soc/spear/spdif_out.c
sound/soc/spear/spdif_out.c
+7
-2
sound/soc/tegra/tegra20_ac97.c
sound/soc/tegra/tegra20_ac97.c
+10
-5
sound/soc/tegra/tegra20_i2s.c
sound/soc/tegra/tegra20_i2s.c
+10
-5
sound/soc/tegra/tegra20_spdif.c
sound/soc/tegra/tegra20_spdif.c
+10
-5
sound/soc/tegra/tegra30_i2s.c
sound/soc/tegra/tegra30_i2s.c
+10
-5
sound/soc/tegra/tegra_wm9712.c
sound/soc/tegra/tegra_wm9712.c
+1
-1
sound/soc/txx9/txx9aclc-ac97.c
sound/soc/txx9/txx9aclc-ac97.c
+7
-2
sound/soc/ux500/ux500_msp_dai.c
sound/soc/ux500/ux500_msp_dai.c
+9
-4
No files found.
include/sound/soc-dai.h
View file @
13419625
...
...
@@ -95,14 +95,6 @@ struct snd_soc_dai_driver;
struct
snd_soc_dai
;
struct
snd_ac97_bus_ops
;
/* Digital Audio Interface registration */
int
snd_soc_register_dai
(
struct
device
*
dev
,
struct
snd_soc_dai_driver
*
dai_drv
);
void
snd_soc_unregister_dai
(
struct
device
*
dev
);
int
snd_soc_register_dais
(
struct
device
*
dev
,
struct
snd_soc_dai_driver
*
dai_drv
,
size_t
count
);
void
snd_soc_unregister_dais
(
struct
device
*
dev
,
size_t
count
);
/* Digital Audio Interface clocking API.*/
int
snd_soc_dai_set_sysclk
(
struct
snd_soc_dai
*
dai
,
int
clk_id
,
unsigned
int
freq
,
int
dir
);
...
...
include/sound/soc.h
View file @
13419625
...
...
@@ -324,6 +324,8 @@ struct snd_soc_dai_link;
struct
snd_soc_platform_driver
;
struct
snd_soc_codec
;
struct
snd_soc_codec_driver
;
struct
snd_soc_component
;
struct
snd_soc_component_driver
;
struct
soc_enum
;
struct
snd_soc_jack
;
struct
snd_soc_jack_zone
;
...
...
@@ -377,6 +379,10 @@ int snd_soc_register_codec(struct device *dev,
const
struct
snd_soc_codec_driver
*
codec_drv
,
struct
snd_soc_dai_driver
*
dai_drv
,
int
num_dai
);
void
snd_soc_unregister_codec
(
struct
device
*
dev
);
int
snd_soc_register_component
(
struct
device
*
dev
,
const
struct
snd_soc_component_driver
*
cmpnt_drv
,
struct
snd_soc_dai_driver
*
dai_drv
,
int
num_dai
);
void
snd_soc_unregister_component
(
struct
device
*
dev
);
int
snd_soc_codec_volatile_register
(
struct
snd_soc_codec
*
codec
,
unsigned
int
reg
);
int
snd_soc_codec_readable_register
(
struct
snd_soc_codec
*
codec
,
...
...
@@ -841,6 +847,20 @@ struct snd_soc_platform {
#endif
};
struct
snd_soc_component_driver
{
const
char
*
name
;
};
struct
snd_soc_component
{
const
char
*
name
;
int
id
;
int
num_dai
;
struct
device
*
dev
;
struct
list_head
list
;
const
struct
snd_soc_component_driver
*
driver
;
};
struct
snd_soc_dai_link
{
/* config - must be set by machine driver */
const
char
*
name
;
/* Codec name */
...
...
sound/soc/atmel/atmel_ssc_dai.c
View file @
13419625
...
...
@@ -750,13 +750,18 @@ static struct snd_soc_dai_driver atmel_ssc_dai = {
.
ops
=
&
atmel_ssc_dai_ops
,
};
static
const
struct
snd_soc_component_driver
atmel_ssc_component
=
{
.
name
=
"atmel-ssc"
,
};
static
int
asoc_ssc_init
(
struct
device
*
dev
)
{
struct
platform_device
*
pdev
=
to_platform_device
(
dev
);
struct
ssc_device
*
ssc
=
platform_get_drvdata
(
pdev
);
int
ret
;
ret
=
snd_soc_register_dai
(
dev
,
&
atmel_ssc_dai
);
ret
=
snd_soc_register_component
(
dev
,
&
atmel_ssc_component
,
&
atmel_ssc_dai
,
1
);
if
(
ret
)
{
dev_err
(
dev
,
"Could not register DAI: %d
\n
"
,
ret
);
goto
err
;
...
...
@@ -775,7 +780,7 @@ static int asoc_ssc_init(struct device *dev)
return
0
;
err_unregister_dai:
snd_soc_unregister_
dai
(
dev
);
snd_soc_unregister_
component
(
dev
);
err:
return
ret
;
}
...
...
@@ -790,7 +795,7 @@ static void asoc_ssc_exit(struct device *dev)
else
atmel_pcm_pdc_platform_unregister
(
dev
);
snd_soc_unregister_
dai
(
dev
);
snd_soc_unregister_
component
(
dev
);
}
/**
...
...
sound/soc/au1x/ac97c.c
View file @
13419625
...
...
@@ -223,6 +223,10 @@ static struct snd_soc_dai_driver au1xac97c_dai_driver = {
.
ops
=
&
alchemy_ac97c_ops
,
};
static
const
struct
snd_soc_component_driver
au1xac97c_component
=
{
.
name
=
"au1xac97c"
,
};
static
int
au1xac97c_drvprobe
(
struct
platform_device
*
pdev
)
{
int
ret
;
...
...
@@ -268,7 +272,8 @@ static int au1xac97c_drvprobe(struct platform_device *pdev)
platform_set_drvdata
(
pdev
,
ctx
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
au1xac97c_dai_driver
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
au1xac97c_component
,
&
au1xac97c_dai_driver
,
1
);
if
(
ret
)
return
ret
;
...
...
@@ -280,7 +285,7 @@ static int au1xac97c_drvremove(struct platform_device *pdev)
{
struct
au1xpsc_audio_data
*
ctx
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
WR
(
ctx
,
AC97_ENABLE
,
EN_D
);
/* clock off, disable */
...
...
sound/soc/au1x/i2sc.c
View file @
13419625
...
...
@@ -225,6 +225,10 @@ static struct snd_soc_dai_driver au1xi2s_dai_driver = {
.
ops
=
&
au1xi2s_dai_ops
,
};
static
const
struct
snd_soc_component_driver
au1xi2s_component
=
{
.
name
=
"au1xi2s"
,
};
static
int
au1xi2s_drvprobe
(
struct
platform_device
*
pdev
)
{
struct
resource
*
iores
,
*
dmares
;
...
...
@@ -260,14 +264,15 @@ static int au1xi2s_drvprobe(struct platform_device *pdev)
platform_set_drvdata
(
pdev
,
ctx
);
return
snd_soc_register_dai
(
&
pdev
->
dev
,
&
au1xi2s_dai_driver
);
return
snd_soc_register_component
(
&
pdev
->
dev
,
&
au1xi2s_component
,
&
au1xi2s_dai_driver
,
1
);
}
static
int
au1xi2s_drvremove
(
struct
platform_device
*
pdev
)
{
struct
au1xpsc_audio_data
*
ctx
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
WR
(
ctx
,
I2S_ENABLE
,
EN_D
);
/* clock off, disable */
...
...
sound/soc/au1x/psc-ac97.c
View file @
13419625
...
...
@@ -361,6 +361,10 @@ static const struct snd_soc_dai_driver au1xpsc_ac97_dai_template = {
.
ops
=
&
au1xpsc_ac97_dai_ops
,
};
static
const
struct
snd_soc_component_driver
au1xpsc_ac97_component
=
{
.
name
=
"au1xpsc-ac97"
,
};
static
int
au1xpsc_ac97_drvprobe
(
struct
platform_device
*
pdev
)
{
int
ret
;
...
...
@@ -419,7 +423,8 @@ static int au1xpsc_ac97_drvprobe(struct platform_device *pdev)
platform_set_drvdata
(
pdev
,
wd
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
wd
->
dai_drv
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
au1xpsc_ac97_component
,
&
wd
->
dai_drv
,
1
);
if
(
ret
)
return
ret
;
...
...
@@ -431,7 +436,7 @@ static int au1xpsc_ac97_drvremove(struct platform_device *pdev)
{
struct
au1xpsc_audio_data
*
wd
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
/* disable PSC completely */
au_writel
(
0
,
AC97_CFG
(
wd
));
...
...
sound/soc/au1x/psc-i2s.c
View file @
13419625
...
...
@@ -288,6 +288,10 @@ static const struct snd_soc_dai_driver au1xpsc_i2s_dai_template = {
.
ops
=
&
au1xpsc_i2s_dai_ops
,
};
static
const
struct
snd_soc_component_driver
au1xpsc_i2s_component
=
{
.
name
=
"au1xpsc-i2s"
,
};
static
int
au1xpsc_i2s_drvprobe
(
struct
platform_device
*
pdev
)
{
struct
resource
*
iores
,
*
dmares
;
...
...
@@ -350,14 +354,15 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
platform_set_drvdata
(
pdev
,
wd
);
return
snd_soc_register_dai
(
&
pdev
->
dev
,
&
wd
->
dai_drv
);
return
snd_soc_register_component
(
&
pdev
->
dev
,
&
au1xpsc_i2s_component
,
&
wd
->
dai_drv
,
1
);
}
static
int
au1xpsc_i2s_drvremove
(
struct
platform_device
*
pdev
)
{
struct
au1xpsc_audio_data
*
wd
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
au_writel
(
0
,
I2S_CFG
(
wd
));
au_sync
();
...
...
sound/soc/blackfin/bf5xx-ac97.c
View file @
13419625
...
...
@@ -282,6 +282,10 @@ static struct snd_soc_dai_driver bfin_ac97_dai = {
.
formats
=
SNDRV_PCM_FMTBIT_S16_LE
,
},
};
static
const
struct
snd_soc_component_driver
bfin_ac97_component
=
{
.
name
=
"bfin-ac97"
,
};
static
int
asoc_bfin_ac97_probe
(
struct
platform_device
*
pdev
)
{
struct
sport_device
*
sport_handle
;
...
...
@@ -331,7 +335,8 @@ static int asoc_bfin_ac97_probe(struct platform_device *pdev)
goto
sport_config_err
;
}
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
bfin_ac97_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
bfin_ac97_component
,
&
bfin_ac97_dai
,
1
);
if
(
ret
)
{
pr_err
(
"Failed to register DAI: %d
\n
"
,
ret
);
goto
sport_config_err
;
...
...
@@ -356,7 +361,7 @@ static int asoc_bfin_ac97_remove(struct platform_device *pdev)
{
struct
sport_device
*
sport_handle
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
sport_done
(
sport_handle
);
#ifdef CONFIG_SND_BF5XX_HAVE_COLD_RESET
gpio_free
(
CONFIG_SND_BF5XX_RESET_GPIO_NUM
);
...
...
sound/soc/blackfin/bf5xx-i2s.c
View file @
13419625
...
...
@@ -245,6 +245,10 @@ static struct snd_soc_dai_driver bf5xx_i2s_dai = {
.
ops
=
&
bf5xx_i2s_dai_ops
,
};
static
const
struct
snd_soc_component_driver
bf5xx_i2s_component
=
{
.
name
=
"bf5xx-i2s"
,
};
static
int
bf5xx_i2s_probe
(
struct
platform_device
*
pdev
)
{
struct
sport_device
*
sport_handle
;
...
...
@@ -257,7 +261,8 @@ static int bf5xx_i2s_probe(struct platform_device *pdev)
return
-
ENODEV
;
/* register with the ASoC layers */
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
bf5xx_i2s_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
bf5xx_i2s_component
,
&
bf5xx_i2s_dai
,
1
);
if
(
ret
)
{
pr_err
(
"Failed to register DAI: %d
\n
"
,
ret
);
sport_done
(
sport_handle
);
...
...
@@ -273,7 +278,7 @@ static int bf5xx_i2s_remove(struct platform_device *pdev)
pr_debug
(
"%s enter
\n
"
,
__func__
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
sport_done
(
sport_handle
);
return
0
;
...
...
sound/soc/blackfin/bf5xx-tdm.c
View file @
13419625
...
...
@@ -249,6 +249,10 @@ static struct snd_soc_dai_driver bf5xx_tdm_dai = {
.
ops
=
&
bf5xx_tdm_dai_ops
,
};
static
const
struct
snd_soc_component_driver
bf5xx_tdm_component
=
{
.
name
=
"bf5xx-tdm"
,
};
static
int
bfin_tdm_probe
(
struct
platform_device
*
pdev
)
{
struct
sport_device
*
sport_handle
;
...
...
@@ -282,7 +286,8 @@ static int bfin_tdm_probe(struct platform_device *pdev)
goto
sport_config_err
;
}
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
bf5xx_tdm_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
bf5xx_tdm_component
,
&
bf5xx_tdm_dai
,
1
);
if
(
ret
)
{
pr_err
(
"Failed to register DAI: %d
\n
"
,
ret
);
goto
sport_config_err
;
...
...
@@ -299,7 +304,7 @@ static int bfin_tdm_remove(struct platform_device *pdev)
{
struct
sport_device
*
sport_handle
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
sport_done
(
sport_handle
);
return
0
;
...
...
sound/soc/blackfin/bf6xx-i2s.c
View file @
13419625
...
...
@@ -186,6 +186,10 @@ static struct snd_soc_dai_driver bfin_i2s_dai = {
.
ops
=
&
bfin_i2s_dai_ops
,
};
static
const
struct
snd_soc_component_driver
bfin_i2s_component
=
{
.
name
=
"bfin-i2s"
,
};
static
int
bfin_i2s_probe
(
struct
platform_device
*
pdev
)
{
struct
sport_device
*
sport
;
...
...
@@ -197,7 +201,8 @@ static int bfin_i2s_probe(struct platform_device *pdev)
return
-
ENODEV
;
/* register with the ASoC layers */
ret
=
snd_soc_register_dai
(
dev
,
&
bfin_i2s_dai
);
ret
=
snd_soc_register_component
(
dev
,
&
bfin_i2s_component
,
&
bfin_i2s_dai
,
1
);
if
(
ret
)
{
dev_err
(
dev
,
"Failed to register DAI: %d
\n
"
,
ret
);
sport_delete
(
sport
);
...
...
@@ -212,7 +217,7 @@ static int bfin_i2s_remove(struct platform_device *pdev)
{
struct
sport_device
*
sport
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
sport_delete
(
sport
);
return
0
;
...
...
sound/soc/cirrus/ep93xx-ac97.c
View file @
13419625
...
...
@@ -353,6 +353,10 @@ static struct snd_soc_dai_driver ep93xx_ac97_dai = {
.
ops
=
&
ep93xx_ac97_dai_ops
,
};
static
const
struct
snd_soc_component_driver
ep93xx_ac97_component
=
{
.
name
=
"ep93xx-ac97"
,
};
static
int
ep93xx_ac97_probe
(
struct
platform_device
*
pdev
)
{
struct
ep93xx_ac97_info
*
info
;
...
...
@@ -390,7 +394,8 @@ static int ep93xx_ac97_probe(struct platform_device *pdev)
ep93xx_ac97_info
=
info
;
platform_set_drvdata
(
pdev
,
info
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
ep93xx_ac97_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
ep93xx_ac97_component
,
&
ep93xx_ac97_dai
,
1
);
if
(
ret
)
goto
fail
;
...
...
@@ -407,7 +412,7 @@ static int ep93xx_ac97_remove(struct platform_device *pdev)
{
struct
ep93xx_ac97_info
*
info
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
/* disable the AC97 controller */
ep93xx_ac97_write_reg
(
info
,
AC97GCR
,
0
);
...
...
sound/soc/cirrus/ep93xx-i2s.c
View file @
13419625
...
...
@@ -366,6 +366,10 @@ static struct snd_soc_dai_driver ep93xx_i2s_dai = {
.
ops
=
&
ep93xx_i2s_dai_ops
,
};
static
const
struct
snd_soc_component_driver
ep93xx_i2s_component
=
{
.
name
=
"ep93xx-i2s"
,
};
static
int
ep93xx_i2s_probe
(
struct
platform_device
*
pdev
)
{
struct
ep93xx_i2s_info
*
info
;
...
...
@@ -405,7 +409,8 @@ static int ep93xx_i2s_probe(struct platform_device *pdev)
dev_set_drvdata
(
&
pdev
->
dev
,
info
);
info
->
dma_params
=
ep93xx_i2s_dma_params
;
err
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
ep93xx_i2s_dai
);
err
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
ep93xx_i2s_component
,
&
ep93xx_i2s_dai
,
1
);
if
(
err
)
goto
fail_put_lrclk
;
...
...
@@ -426,7 +431,7 @@ static int ep93xx_i2s_remove(struct platform_device *pdev)
{
struct
ep93xx_i2s_info
*
info
=
dev_get_drvdata
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
dev_set_drvdata
(
&
pdev
->
dev
,
NULL
);
clk_put
(
info
->
lrclk
);
clk_put
(
info
->
sclk
);
...
...
sound/soc/davinci/davinci-i2s.c
View file @
13419625
...
...
@@ -645,6 +645,10 @@ static struct snd_soc_dai_driver davinci_i2s_dai = {
};
static
const
struct
snd_soc_component_driver
davinci_i2s_component
=
{
.
name
=
"davinci-i2s"
,
};
static
int
davinci_i2s_probe
(
struct
platform_device
*
pdev
)
{
struct
snd_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
...
...
@@ -727,20 +731,21 @@ static int davinci_i2s_probe(struct platform_device *pdev)
dev_set_drvdata
(
&
pdev
->
dev
,
dev
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
davinci_i2s_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
davinci_i2s_component
,
&
davinci_i2s_dai
,
1
);
if
(
ret
!=
0
)
goto
err_release_clk
;
ret
=
davinci_soc_platform_register
(
&
pdev
->
dev
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"register PCM failed: %d
\n
"
,
ret
);
goto
err_unregister_
dai
;
goto
err_unregister_
component
;
}
return
0
;
err_unregister_
dai
:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
err_unregister_
component
:
snd_soc_unregister_
component
(
&
pdev
->
dev
);
err_release_clk:
clk_disable
(
dev
->
clk
);
clk_put
(
dev
->
clk
);
...
...
@@ -751,7 +756,7 @@ static int davinci_i2s_remove(struct platform_device *pdev)
{
struct
davinci_mcbsp_dev
*
dev
=
dev_get_drvdata
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
davinci_soc_platform_unregister
(
&
pdev
->
dev
);
clk_disable
(
dev
->
clk
);
...
...
sound/soc/davinci/davinci-mcasp.c
View file @
13419625
...
...
@@ -962,6 +962,10 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
};
static
const
struct
snd_soc_component_driver
davinci_mcasp_component
=
{
.
name
=
"davinci-mcasp"
,
};
static
const
struct
of_device_id
mcasp_dt_ids
[]
=
{
{
.
compatible
=
"ti,dm646x-mcasp-audio"
,
...
...
@@ -1170,7 +1174,8 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
dma_data
->
channel
=
res
->
start
;
dev_set_drvdata
(
&
pdev
->
dev
,
dev
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
davinci_mcasp_dai
[
pdata
->
op_mode
]);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
davinci_mcasp_component
,
&
davinci_mcasp_dai
[
pdata
->
op_mode
],
1
);
if
(
ret
!=
0
)
goto
err_release_clk
;
...
...
@@ -1178,13 +1183,13 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
ret
=
davinci_soc_platform_register
(
&
pdev
->
dev
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"register PCM failed: %d
\n
"
,
ret
);
goto
err_unregister_
dai
;
goto
err_unregister_
component
;
}
return
0
;
err_unregister_
dai
:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
err_unregister_
component
:
snd_soc_unregister_
component
(
&
pdev
->
dev
);
err_release_clk:
pm_runtime_put_sync
(
&
pdev
->
dev
);
pm_runtime_disable
(
&
pdev
->
dev
);
...
...
@@ -1194,7 +1199,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
static
int
davinci_mcasp_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
davinci_soc_platform_unregister
(
&
pdev
->
dev
);
pm_runtime_put_sync
(
&
pdev
->
dev
);
...
...
sound/soc/davinci/davinci-vcif.c
View file @
13419625
...
...
@@ -204,6 +204,10 @@ static struct snd_soc_dai_driver davinci_vcif_dai = {
};
static
const
struct
snd_soc_component_driver
davinci_vcif_component
=
{
.
name
=
"davinci-vcif"
,
};
static
int
davinci_vcif_probe
(
struct
platform_device
*
pdev
)
{
struct
davinci_vc
*
davinci_vc
=
pdev
->
dev
.
platform_data
;
...
...
@@ -234,7 +238,8 @@ static int davinci_vcif_probe(struct platform_device *pdev)
dev_set_drvdata
(
&
pdev
->
dev
,
davinci_vcif_dev
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
davinci_vcif_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
davinci_vcif_component
,
&
davinci_vcif_dai
,
1
);
if
(
ret
!=
0
)
{
dev_err
(
&
pdev
->
dev
,
"could not register dai
\n
"
);
return
ret
;
...
...
@@ -243,7 +248,7 @@ static int davinci_vcif_probe(struct platform_device *pdev)
ret
=
davinci_soc_platform_register
(
&
pdev
->
dev
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"register PCM failed: %d
\n
"
,
ret
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
ret
;
}
...
...
@@ -252,7 +257,7 @@ static int davinci_vcif_probe(struct platform_device *pdev)
static
int
davinci_vcif_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
davinci_soc_platform_unregister
(
&
pdev
->
dev
);
return
0
;
...
...
sound/soc/dwc/designware_i2s.c
View file @
13419625
...
...
@@ -297,6 +297,10 @@ static struct snd_soc_dai_ops dw_i2s_dai_ops = {
.
trigger
=
dw_i2s_trigger
,
};
static
const
struct
snd_soc_component_driver
dw_i2s_component
=
{
.
name
=
"dw-i2s"
,
};
#ifdef CONFIG_PM
static
int
dw_i2s_suspend
(
struct
snd_soc_dai
*
dai
)
...
...
@@ -413,7 +417,8 @@ static int dw_i2s_probe(struct platform_device *pdev)
dev
->
dev
=
&
pdev
->
dev
;
dev_set_drvdata
(
&
pdev
->
dev
,
dev
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
dw_i2s_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
dw_i2s_component
,
dw_i2s_dai
,
1
);
if
(
ret
!=
0
)
{
dev_err
(
&
pdev
->
dev
,
"not able to register dai
\n
"
);
goto
err_set_drvdata
;
...
...
@@ -434,7 +439,7 @@ static int dw_i2s_remove(struct platform_device *pdev)
{
struct
dw_i2s_dev
*
dev
=
dev_get_drvdata
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
dev_set_drvdata
(
&
pdev
->
dev
,
NULL
);
clk_put
(
dev
->
clk
);
...
...
sound/soc/fsl/fsl_ssi.c
View file @
13419625
...
...
@@ -574,6 +574,10 @@ static struct snd_soc_dai_driver fsl_ssi_dai_template = {
.
ops
=
&
fsl_ssi_dai_ops
,
};
static
const
struct
snd_soc_component_driver
fsl_ssi_component
=
{
.
name
=
"fsl-ssi"
,
};
/* Show the statistics of a flag only if its interrupt is enabled. The
* compiler will optimze this code to a no-op if the interrupt is not
* enabled.
...
...
@@ -782,7 +786,8 @@ static int fsl_ssi_probe(struct platform_device *pdev)
/* Register with ASoC */
dev_set_drvdata
(
&
pdev
->
dev
,
ssi_private
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
ssi_private
->
cpu_dai_drv
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
fsl_ssi_component
,
&
ssi_private
->
cpu_dai_drv
,
1
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"failed to register DAI: %d
\n
"
,
ret
);
goto
error_dev
;
...
...
@@ -835,7 +840,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
error_dai:
if
(
ssi_private
->
ssi_on_imx
)
platform_device_unregister
(
ssi_private
->
imx_pcm_pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
error_dev:
dev_set_drvdata
(
&
pdev
->
dev
,
NULL
);
...
...
@@ -873,7 +878,7 @@ static int fsl_ssi_remove(struct platform_device *pdev)
clk_disable_unprepare
(
ssi_private
->
clk
);
clk_put
(
ssi_private
->
clk
);
}
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
device_remove_file
(
&
pdev
->
dev
,
&
ssi_private
->
dev_attr
);
free_irq
(
ssi_private
->
irq
,
ssi_private
);
...
...
sound/soc/fsl/imx-ssi.c
View file @
13419625
...
...
@@ -413,6 +413,10 @@ static struct snd_soc_dai_driver imx_ac97_dai = {
.
ops
=
&
imx_ssi_pcm_dai_ops
,
};
static
const
struct
snd_soc_component_driver
imx_component
=
{
.
name
=
DRV_NAME
,
};
static
void
setup_channel_to_ac97
(
struct
imx_ssi
*
imx_ssi
)
{
void
__iomem
*
base
=
imx_ssi
->
base
;
...
...
@@ -591,7 +595,8 @@ static int imx_ssi_probe(struct platform_device *pdev)
platform_set_drvdata
(
pdev
,
ssi
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
imx_component
,
dai
,
1
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"register DAI failed
\n
"
);
goto
failed_register
;
...
...
@@ -632,7 +637,7 @@ static int imx_ssi_probe(struct platform_device *pdev)
failed_pdev_fiq_add:
platform_device_put
(
ssi
->
soc_platform_pdev_fiq
);
failed_pdev_fiq_alloc:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
failed_register:
release_mem_region
(
res
->
start
,
resource_size
(
res
));
failed_get_resource:
...
...
@@ -650,7 +655,7 @@ static int imx_ssi_remove(struct platform_device *pdev)
platform_device_unregister
(
ssi
->
soc_platform_pdev
);
platform_device_unregister
(
ssi
->
soc_platform_pdev_fiq
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
if
(
ssi
->
flags
&
IMX_SSI_USE_AC97
)
ac97_ssi
=
NULL
;
...
...
sound/soc/fsl/mpc5200_psc_ac97.c
View file @
13419625
...
...
@@ -270,6 +270,9 @@ static struct snd_soc_dai_driver psc_ac97_dai[] = {
.
ops
=
&
psc_ac97_digital_ops
,
}
};
static
const
struct
snd_soc_component_driver
psc_ac97_component
=
{
.
name
=
DRV_NAME
,
};
/* ---------------------------------------------------------------------
...
...
@@ -287,7 +290,8 @@ static int psc_ac97_of_probe(struct platform_device *op)
if
(
rc
!=
0
)
return
rc
;
rc
=
snd_soc_register_dais
(
&
op
->
dev
,
psc_ac97_dai
,
ARRAY_SIZE
(
psc_ac97_dai
));
rc
=
snd_soc_register_component
(
&
op
->
dev
,
&
psc_ac97_component
,
psc_ac97_dai
,
ARRAY_SIZE
(
psc_ac97_dai
));
if
(
rc
!=
0
)
{
dev_err
(
&
op
->
dev
,
"Failed to register DAI
\n
"
);
return
rc
;
...
...
@@ -313,7 +317,7 @@ static int psc_ac97_of_probe(struct platform_device *op)
static
int
psc_ac97_of_remove
(
struct
platform_device
*
op
)
{
mpc5200_audio_dma_destroy
(
op
);
snd_soc_unregister_
dais
(
&
op
->
dev
,
ARRAY_SIZE
(
psc_ac97_dai
)
);
snd_soc_unregister_
component
(
&
op
->
dev
);
return
0
;
}
...
...
sound/soc/fsl/mpc5200_psc_i2s.c
View file @
13419625
...
...
@@ -148,6 +148,10 @@ static struct snd_soc_dai_driver psc_i2s_dai[] = {{
.
ops
=
&
psc_i2s_dai_ops
,
}
};
static
const
struct
snd_soc_component_driver
psc_i2s_component
=
{
.
name
=
"mpc5200-i2s"
,
};
/* ---------------------------------------------------------------------
* OF platform bus binding code:
* - Probe/remove operations
...
...
@@ -163,7 +167,8 @@ static int psc_i2s_of_probe(struct platform_device *op)
if
(
rc
!=
0
)
return
rc
;
rc
=
snd_soc_register_dais
(
&
op
->
dev
,
psc_i2s_dai
,
ARRAY_SIZE
(
psc_i2s_dai
));
rc
=
snd_soc_register_component
(
&
op
->
dev
,
&
psc_i2s_component
,
psc_i2s_dai
,
ARRAY_SIZE
(
psc_i2s_dai
));
if
(
rc
!=
0
)
{
pr_err
(
"Failed to register DAI
\n
"
);
return
rc
;
...
...
@@ -208,7 +213,7 @@ static int psc_i2s_of_probe(struct platform_device *op)
static
int
psc_i2s_of_remove
(
struct
platform_device
*
op
)
{
mpc5200_audio_dma_destroy
(
op
);
snd_soc_unregister_
dais
(
&
op
->
dev
,
ARRAY_SIZE
(
psc_i2s_dai
)
);
snd_soc_unregister_
component
(
&
op
->
dev
);
return
0
;
}
...
...
sound/soc/jz4740/jz4740-i2s.c
View file @
13419625
...
...
@@ -425,6 +425,10 @@ static struct snd_soc_dai_driver jz4740_i2s_dai = {
.
resume
=
jz4740_i2s_resume
,
};
static
const
struct
snd_soc_component_driver
jz4740_i2s_component
=
{
.
name
=
"jz4740-i2s"
,
};
static
int
jz4740_i2s_dev_probe
(
struct
platform_device
*
pdev
)
{
struct
jz4740_i2s
*
i2s
;
...
...
@@ -469,7 +473,8 @@ static int jz4740_i2s_dev_probe(struct platform_device *pdev)
}
platform_set_drvdata
(
pdev
,
i2s
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
jz4740_i2s_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
jz4740_i2s_component
,
&
jz4740_i2s_dai
,
1
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"Failed to register DAI
\n
"
);
...
...
@@ -496,7 +501,7 @@ static int jz4740_i2s_dev_remove(struct platform_device *pdev)
{
struct
jz4740_i2s
*
i2s
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
clk_put
(
i2s
->
clk_i2s
);
clk_put
(
i2s
->
clk_aic
);
...
...
sound/soc/kirkwood/kirkwood-i2s.c
View file @
13419625
...
...
@@ -451,6 +451,10 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai_extclk = {
.
ops
=
&
kirkwood_i2s_dai_ops
,
};
static
const
struct
snd_soc_component_driver
kirkwood_i2s_component
=
{
.
name
=
DRV_NAME
,
};
static
int
kirkwood_i2s_dev_probe
(
struct
platform_device
*
pdev
)
{
struct
kirkwood_asoc_platform_data
*
data
=
pdev
->
dev
.
platform_data
;
...
...
@@ -524,10 +528,11 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
priv
->
ctl_rec
|=
KIRKWOOD_RECCTL_BURST_128
;
}
err
=
snd_soc_register_dai
(
&
pdev
->
dev
,
soc_dai
);
err
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
kirkwood_i2s_component
,
soc_dai
,
1
);
if
(
!
err
)
return
0
;
dev_err
(
&
pdev
->
dev
,
"snd_soc_register_
dai
failed
\n
"
);
dev_err
(
&
pdev
->
dev
,
"snd_soc_register_
component
failed
\n
"
);
if
(
!
IS_ERR
(
priv
->
extclk
))
{
clk_disable_unprepare
(
priv
->
extclk
);
...
...
@@ -542,7 +547,7 @@ static int kirkwood_i2s_dev_remove(struct platform_device *pdev)
{
struct
kirkwood_dma_data
*
priv
=
dev_get_drvdata
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
if
(
!
IS_ERR
(
priv
->
extclk
))
{
clk_disable_unprepare
(
priv
->
extclk
);
...
...
sound/soc/mid-x86/sst_platform.c
View file @
13419625
...
...
@@ -165,6 +165,10 @@ static struct snd_soc_dai_driver sst_platform_dai[] = {
},
};
static
const
struct
snd_soc_component_driver
sst_component
=
{
.
name
=
"sst"
,
};
/* helper functions */
static
inline
void
sst_set_stream_status
(
struct
sst_runtime_stream
*
stream
,
int
state
)
...
...
@@ -683,7 +687,7 @@ static int sst_platform_probe(struct platform_device *pdev)
return
ret
;
}
ret
=
snd_soc_register_
dais
(
&
pdev
->
dev
,
ret
=
snd_soc_register_
component
(
&
pdev
->
dev
,
&
sst_component
,
sst_platform_dai
,
ARRAY_SIZE
(
sst_platform_dai
));
if
(
ret
)
{
pr_err
(
"registering cpu dais failed
\n
"
);
...
...
@@ -695,7 +699,7 @@ static int sst_platform_probe(struct platform_device *pdev)
static
int
sst_platform_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
sst_platform_dai
)
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
snd_soc_unregister_platform
(
&
pdev
->
dev
);
pr_debug
(
"sst_platform_remove success
\n
"
);
return
0
;
...
...
sound/soc/mxs/mxs-saif.c
View file @
13419625
...
...
@@ -627,6 +627,10 @@ static struct snd_soc_dai_driver mxs_saif_dai = {
.
ops
=
&
mxs_saif_dai_ops
,
};
static
const
struct
snd_soc_component_driver
mxs_saif_component
=
{
.
name
=
"mxs-saif"
,
};
static
irqreturn_t
mxs_saif_irq
(
int
irq
,
void
*
dev_id
)
{
struct
mxs_saif
*
saif
=
dev_id
;
...
...
@@ -763,7 +767,8 @@ static int mxs_saif_probe(struct platform_device *pdev)
platform_set_drvdata
(
pdev
,
saif
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
mxs_saif_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
mxs_saif_component
,
&
mxs_saif_dai
,
1
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"register DAI failed
\n
"
);
return
ret
;
...
...
@@ -778,7 +783,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
return
0
;
failed_pdev_alloc:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
ret
;
}
...
...
@@ -786,7 +791,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
static
int
mxs_saif_remove
(
struct
platform_device
*
pdev
)
{
mxs_pcm_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/nuc900/nuc900-ac97.c
View file @
13419625
...
...
@@ -314,6 +314,10 @@ static struct snd_soc_dai_driver nuc900_ac97_dai = {
.
ops
=
&
nuc900_ac97_dai_ops
,
};
static
const
struct
snd_soc_component_driver
nuc900_ac97_component
=
{
.
name
=
"nuc900-ac97"
,
};
static
int
nuc900_ac97_drvprobe
(
struct
platform_device
*
pdev
)
{
struct
nuc900_audio
*
nuc900_audio
;
...
...
@@ -361,7 +365,8 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev)
nuc900_ac97_data
=
nuc900_audio
;
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
nuc900_ac97_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
nuc900_ac97_component
,
&
nuc900_ac97_dai
,
1
);
if
(
ret
)
goto
out3
;
...
...
@@ -384,7 +389,7 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev)
static
int
nuc900_ac97_drvremove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
clk_put
(
nuc900_ac97_data
->
clk
);
iounmap
(
nuc900_ac97_data
->
mmio
);
...
...
sound/soc/omap/omap-dmic.c
View file @
13419625
...
...
@@ -448,6 +448,10 @@ static struct snd_soc_dai_driver omap_dmic_dai = {
.
ops
=
&
omap_dmic_dai_ops
,
};
static
const
struct
snd_soc_component_driver
omap_dmic_component
=
{
.
name
=
"omap-dmic"
,
};
static
int
asoc_dmic_probe
(
struct
platform_device
*
pdev
)
{
struct
omap_dmic
*
dmic
;
...
...
@@ -507,7 +511,8 @@ static int asoc_dmic_probe(struct platform_device *pdev)
goto
err_put_clk
;
}
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
omap_dmic_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
omap_dmic_component
,
&
omap_dmic_dai
,
1
);
if
(
ret
)
goto
err_put_clk
;
...
...
@@ -522,7 +527,7 @@ static int asoc_dmic_remove(struct platform_device *pdev)
{
struct
omap_dmic
*
dmic
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
clk_put
(
dmic
->
fclk
);
return
0
;
...
...
sound/soc/omap/omap-hdmi.c
View file @
13419625
...
...
@@ -264,6 +264,10 @@ static struct snd_soc_dai_driver omap_hdmi_dai = {
.
ops
=
&
omap_hdmi_dai_ops
,
};
static
const
struct
snd_soc_component_driver
omap_hdmi_component
=
{
.
name
=
DRV_NAME
,
};
static
int
omap_hdmi_probe
(
struct
platform_device
*
pdev
)
{
int
ret
;
...
...
@@ -321,7 +325,8 @@ static int omap_hdmi_probe(struct platform_device *pdev)
}
dev_set_drvdata
(
&
pdev
->
dev
,
hdmi_data
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
omap_hdmi_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
omap_hdmi_component
,
&
omap_hdmi_dai
,
1
);
return
ret
;
}
...
...
@@ -330,7 +335,7 @@ static int omap_hdmi_remove(struct platform_device *pdev)
{
struct
hdmi_priv
*
hdmi_data
=
dev_get_drvdata
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
if
(
hdmi_data
==
NULL
)
{
dev_err
(
&
pdev
->
dev
,
"cannot obtain HDMi data
\n
"
);
...
...
sound/soc/omap/omap-mcbsp.c
View file @
13419625
...
...
@@ -586,6 +586,10 @@ static struct snd_soc_dai_driver omap_mcbsp_dai = {
.
ops
=
&
mcbsp_dai_ops
,
};
static
const
struct
snd_soc_component_driver
omap_mcbsp_component
=
{
.
name
=
"omap-mcbsp"
,
};
static
int
omap_mcbsp_st_info_volsw
(
struct
snd_kcontrol
*
kcontrol
,
struct
snd_ctl_elem_info
*
uinfo
)
{
...
...
@@ -793,7 +797,8 @@ static int asoc_mcbsp_probe(struct platform_device *pdev)
ret
=
omap_mcbsp_init
(
pdev
);
if
(
!
ret
)
return
snd_soc_register_dai
(
&
pdev
->
dev
,
&
omap_mcbsp_dai
);
return
snd_soc_register_component
(
&
pdev
->
dev
,
&
omap_mcbsp_component
,
&
omap_mcbsp_dai
,
1
);
return
ret
;
}
...
...
@@ -802,7 +807,7 @@ static int asoc_mcbsp_remove(struct platform_device *pdev)
{
struct
omap_mcbsp
*
mcbsp
=
platform_get_drvdata
(
pdev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
if
(
mcbsp
->
pdata
->
ops
&&
mcbsp
->
pdata
->
ops
->
free
)
mcbsp
->
pdata
->
ops
->
free
(
mcbsp
->
id
);
...
...
sound/soc/omap/omap-mcpdm.c
View file @
13419625
...
...
@@ -420,6 +420,10 @@ static struct snd_soc_dai_driver omap_mcpdm_dai = {
.
ops
=
&
omap_mcpdm_dai_ops
,
};
static
const
struct
snd_soc_component_driver
omap_mcpdm_component
=
{
.
name
=
"omap-mcpdm"
,
};
void
omap_mcpdm_configure_dn_offsets
(
struct
snd_soc_pcm_runtime
*
rtd
,
u8
rx1
,
u8
rx2
)
{
...
...
@@ -480,12 +484,13 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
mcpdm
->
dev
=
&
pdev
->
dev
;
return
snd_soc_register_dai
(
&
pdev
->
dev
,
&
omap_mcpdm_dai
);
return
snd_soc_register_component
(
&
pdev
->
dev
,
&
omap_mcpdm_component
,
&
omap_mcpdm_dai
,
1
);
}
static
int
asoc_mcpdm_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/pxa/mmp-sspa.c
View file @
13419625
...
...
@@ -405,6 +405,10 @@ struct snd_soc_dai_driver mmp_sspa_dai = {
.
ops
=
&
mmp_sspa_dai_ops
,
};
static
const
struct
snd_soc_component_driver
mmp_sspa_component
=
{
.
name
=
"mmp-sspa"
,
};
static
int
asoc_mmp_sspa_probe
(
struct
platform_device
*
pdev
)
{
struct
sspa_priv
*
priv
;
...
...
@@ -450,7 +454,8 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev)
priv
->
dai_fmt
=
(
unsigned
int
)
-
1
;
platform_set_drvdata
(
pdev
,
priv
);
return
snd_soc_register_dai
(
&
pdev
->
dev
,
&
mmp_sspa_dai
);
return
snd_soc_register_component
(
&
pdev
->
dev
,
&
mmp_sspa_component
,
&
mmp_sspa_dai
,
1
);
}
static
int
asoc_mmp_sspa_remove
(
struct
platform_device
*
pdev
)
...
...
@@ -460,7 +465,7 @@ static int asoc_mmp_sspa_remove(struct platform_device *pdev)
clk_disable
(
priv
->
audio_clk
);
clk_put
(
priv
->
audio_clk
);
clk_put
(
priv
->
sysclk
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/pxa/pxa-ssp.c
View file @
13419625
...
...
@@ -794,14 +794,19 @@ static struct snd_soc_dai_driver pxa_ssp_dai = {
.
ops
=
&
pxa_ssp_dai_ops
,
};
static
const
struct
snd_soc_component_driver
pxa_ssp_component
=
{
.
name
=
"pxa-ssp"
,
};
static
int
asoc_ssp_probe
(
struct
platform_device
*
pdev
)
{
return
snd_soc_register_dai
(
&
pdev
->
dev
,
&
pxa_ssp_dai
);
return
snd_soc_register_component
(
&
pdev
->
dev
,
&
pxa_ssp_component
,
&
pxa_ssp_dai
,
1
);
}
static
int
asoc_ssp_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/pxa/pxa2xx-ac97.c
View file @
13419625
...
...
@@ -47,6 +47,7 @@ struct snd_ac97_bus_ops soc_ac97_ops = {
.
warm_reset
=
pxa2xx_ac97_warm_reset
,
.
reset
=
pxa2xx_ac97_cold_reset
,
};
EXPORT_SYMBOL_GPL
(
soc_ac97_ops
);
static
struct
pxa2xx_pcm_dma_params
pxa2xx_ac97_pcm_stereo_out
=
{
.
name
=
"AC97 PCM Stereo out"
,
...
...
@@ -232,7 +233,9 @@ static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = {
},
};
EXPORT_SYMBOL_GPL
(
soc_ac97_ops
);
static
const
struct
snd_soc_component_driver
pxa_ac97_component
=
{
.
name
=
"pxa-ac97"
,
};
static
int
pxa2xx_ac97_dev_probe
(
struct
platform_device
*
pdev
)
{
...
...
@@ -245,13 +248,13 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
* driver to do interesting things with the clocking to get us up
* and running.
*/
return
snd_soc_register_
dais
(
&
pdev
->
dev
,
pxa_ac97_dai_driver
,
ARRAY_SIZE
(
pxa_ac97_dai_driver
));
return
snd_soc_register_
component
(
&
pdev
->
dev
,
&
pxa_ac97_component
,
pxa_ac97_dai_driver
,
ARRAY_SIZE
(
pxa_ac97_dai_driver
));
}
static
int
pxa2xx_ac97_dev_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
pxa_ac97_dai_driver
)
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/pxa/pxa2xx-i2s.c
View file @
13419625
...
...
@@ -360,14 +360,19 @@ static struct snd_soc_dai_driver pxa_i2s_dai = {
.
symmetric_rates
=
1
,
};
static
const
struct
snd_soc_component_driver
pxa_i2s_component
=
{
.
name
=
"pxa-i2s"
,
};
static
int
pxa2xx_i2s_drv_probe
(
struct
platform_device
*
pdev
)
{
return
snd_soc_register_dai
(
&
pdev
->
dev
,
&
pxa_i2s_dai
);
return
snd_soc_register_component
(
&
pdev
->
dev
,
&
pxa_i2s_component
,
&
pxa_i2s_dai
,
1
);
}
static
int
pxa2xx_i2s_drv_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/s6000/s6000-i2s.c
View file @
13419625
...
...
@@ -436,6 +436,10 @@ static struct snd_soc_dai_driver s6000_i2s_dai = {
.
ops
=
&
s6000_i2s_dai_ops
,
};
static
const
struct
snd_soc_component_driver
s6000_i2s_component
=
{
.
name
=
"s6000-i2s"
,
};
static
int
s6000_i2s_probe
(
struct
platform_device
*
pdev
)
{
struct
s6000_i2s_dev
*
dev
;
...
...
@@ -543,7 +547,8 @@ static int s6000_i2s_probe(struct platform_device *pdev)
S6_I2S_INT_UNDERRUN
|
S6_I2S_INT_OVERRUN
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
s6000_i2s_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
s6000_i2s_component
,
&
s6000_i2s_dai
,
1
);
if
(
ret
)
goto
err_release_dev
;
...
...
@@ -572,7 +577,7 @@ static void s6000_i2s_remove(struct platform_device *pdev)
struct
resource
*
region
;
void
__iomem
*
mmio
=
dev
->
scbbase
;
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
s6000_i2s_stop_channel
(
dev
,
0
);
s6000_i2s_stop_channel
(
dev
,
1
);
...
...
sound/soc/samsung/ac97.c
View file @
13419625
...
...
@@ -370,6 +370,10 @@ static struct snd_soc_dai_driver s3c_ac97_dai[] = {
},
};
static
const
struct
snd_soc_component_driver
s3c_ac97_component
=
{
.
name
=
"s3c-ac97"
,
};
static
int
s3c_ac97_probe
(
struct
platform_device
*
pdev
)
{
struct
resource
*
mem_res
,
*
dmatx_res
,
*
dmarx_res
,
*
dmamic_res
,
*
irq_res
;
...
...
@@ -457,8 +461,8 @@ static int s3c_ac97_probe(struct platform_device *pdev)
goto
err4
;
}
ret
=
snd_soc_register_
dais
(
&
pdev
->
dev
,
s3c_ac97_dai
,
ARRAY_SIZE
(
s3c_ac97_dai
));
ret
=
snd_soc_register_
component
(
&
pdev
->
dev
,
&
s3c_ac97_component
,
s3c_ac97_dai
,
ARRAY_SIZE
(
s3c_ac97_dai
));
if
(
ret
)
goto
err5
;
...
...
@@ -470,7 +474,7 @@ static int s3c_ac97_probe(struct platform_device *pdev)
return
0
;
err6:
snd_soc_unregister_
dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
s3c_ac97_dai
)
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
err5:
free_irq
(
irq_res
->
start
,
NULL
);
err4:
...
...
@@ -490,7 +494,7 @@ static int s3c_ac97_remove(struct platform_device *pdev)
struct
resource
*
mem_res
,
*
irq_res
;
asoc_dma_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
s3c_ac97_dai
)
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
irq_res
=
platform_get_resource
(
pdev
,
IORESOURCE_IRQ
,
0
);
if
(
irq_res
)
...
...
sound/soc/samsung/goni_wm8994.c
View file @
13419625
...
...
@@ -218,6 +218,10 @@ static struct snd_soc_dai_driver voice_dai = {
.
formats
=
SNDRV_PCM_FMTBIT_S16_LE
,},
};
static
const
struct
snd_soc_component_driver
voice_component
=
{
.
name
=
"goni-voice"
,
};
static
struct
snd_soc_ops
goni_voice_ops
=
{
.
hw_params
=
goni_voice_hw_params
,
};
...
...
@@ -270,7 +274,8 @@ static int __init goni_init(void)
return
-
ENOMEM
;
/* register voice DAI here */
ret
=
snd_soc_register_dai
(
&
goni_snd_device
->
dev
,
&
voice_dai
);
ret
=
snd_soc_register_component
(
&
goni_snd_device
->
dev
,
&
voice_component
,
&
voice_dai
,
1
);
if
(
ret
)
{
platform_device_put
(
goni_snd_device
);
return
ret
;
...
...
@@ -280,7 +285,7 @@ static int __init goni_init(void)
ret
=
platform_device_add
(
goni_snd_device
);
if
(
ret
)
{
snd_soc_unregister_
dai
(
&
goni_snd_device
->
dev
);
snd_soc_unregister_
component
(
&
goni_snd_device
->
dev
);
platform_device_put
(
goni_snd_device
);
}
...
...
@@ -289,7 +294,7 @@ static int __init goni_init(void)
static
void
__exit
goni_exit
(
void
)
{
snd_soc_unregister_
dai
(
&
goni_snd_device
->
dev
);
snd_soc_unregister_
component
(
&
goni_snd_device
->
dev
);
platform_device_unregister
(
goni_snd_device
);
}
...
...
sound/soc/samsung/i2s.c
View file @
13419625
...
...
@@ -963,6 +963,10 @@ static const struct snd_soc_dai_ops samsung_i2s_dai_ops = {
.
delay
=
i2s_delay
,
};
static
const
struct
snd_soc_component_driver
samsung_i2s_component
=
{
.
name
=
"samsung-i2s"
,
};
#define SAMSUNG_I2S_RATES SNDRV_PCM_RATE_8000_96000
#define SAMSUNG_I2S_FMTS (SNDRV_PCM_FMTBIT_S8 | \
...
...
@@ -1114,8 +1118,9 @@ static int samsung_i2s_probe(struct platform_device *pdev)
dev_err
(
&
pdev
->
dev
,
"Unable to get drvdata
\n
"
);
return
-
EFAULT
;
}
snd_soc_register_dai
(
&
sec_dai
->
pdev
->
dev
,
&
sec_dai
->
i2s_dai_drv
);
snd_soc_register_component
(
&
sec_dai
->
pdev
->
dev
,
&
samsung_i2s_component
,
&
sec_dai
->
i2s_dai_drv
,
1
);
asoc_dma_platform_register
(
&
pdev
->
dev
);
return
0
;
}
...
...
@@ -1244,7 +1249,8 @@ static int samsung_i2s_probe(struct platform_device *pdev)
}
}
snd_soc_register_dai
(
&
pri_dai
->
pdev
->
dev
,
&
pri_dai
->
i2s_dai_drv
);
snd_soc_register_component
(
&
pri_dai
->
pdev
->
dev
,
&
samsung_i2s_component
,
&
pri_dai
->
i2s_dai_drv
,
1
);
pm_runtime_enable
(
&
pdev
->
dev
);
...
...
@@ -1283,7 +1289,7 @@ static int samsung_i2s_remove(struct platform_device *pdev)
i2s
->
sec_dai
=
NULL
;
asoc_dma_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/samsung/pcm.c
View file @
13419625
...
...
@@ -490,6 +490,10 @@ static struct snd_soc_dai_driver s3c_pcm_dai[] = {
},
};
static
const
struct
snd_soc_component_driver
s3c_pcm_component
=
{
.
name
=
"s3c-pcm"
,
};
static
int
s3c_pcm_dev_probe
(
struct
platform_device
*
pdev
)
{
struct
s3c_pcm_info
*
pcm
;
...
...
@@ -583,7 +587,8 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
pm_runtime_enable
(
&
pdev
->
dev
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
s3c_pcm_dai
[
pdev
->
id
]);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
s3c_pcm_component
,
&
s3c_pcm_dai
[
pdev
->
id
],
1
);
if
(
ret
!=
0
)
{
dev_err
(
&
pdev
->
dev
,
"failed to get register DAI: %d
\n
"
,
ret
);
goto
err5
;
...
...
@@ -598,7 +603,7 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
return
0
;
err6:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
err5:
clk_disable_unprepare
(
pcm
->
pclk
);
clk_put
(
pcm
->
pclk
);
...
...
@@ -619,7 +624,7 @@ static int s3c_pcm_dev_remove(struct platform_device *pdev)
struct
resource
*
mem_res
;
asoc_dma_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
pm_runtime_disable
(
&
pdev
->
dev
);
...
...
sound/soc/samsung/s3c-i2s-v2.c
View file @
13419625
...
...
@@ -731,8 +731,9 @@ static int s3c2412_i2s_resume(struct snd_soc_dai *dai)
#define s3c2412_i2s_resume NULL
#endif
int
s3c_i2sv2_register_dai
(
struct
device
*
dev
,
int
id
,
struct
snd_soc_dai_driver
*
drv
)
int
s3c_i2sv2_register_component
(
struct
device
*
dev
,
int
id
,
struct
snd_soc_component_driver
*
cmp_drv
,
struct
snd_soc_dai_driver
*
dai_drv
)
{
struct
snd_soc_dai_ops
*
ops
=
drv
->
ops
;
...
...
@@ -750,8 +751,8 @@ int s3c_i2sv2_register_dai(struct device *dev, int id,
drv
->
suspend
=
s3c2412_i2s_suspend
;
drv
->
resume
=
s3c2412_i2s_resume
;
return
snd_soc_register_
dai
(
dev
,
drv
);
return
snd_soc_register_
component
(
dev
,
cmp_drv
,
dai_drv
,
1
);
}
EXPORT_SYMBOL_GPL
(
s3c_i2sv2_register_
dai
);
EXPORT_SYMBOL_GPL
(
s3c_i2sv2_register_
component
);
MODULE_LICENSE
(
"GPL"
);
sound/soc/samsung/s3c-i2s-v2.h
View file @
13419625
...
...
@@ -92,7 +92,7 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
unsigned
long
base
);
/**
* s3c_i2sv2_register_
dai - register
dai with soc core
* s3c_i2sv2_register_
component - register component and
dai with soc core
* @dev: DAI device
* @id: DAI ID
* @drv: The driver structure to register
...
...
@@ -100,7 +100,8 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
* Fill in any missing fields and then register the given dai with the
* soc core.
*/
extern
int
s3c_i2sv2_register_dai
(
struct
device
*
dev
,
int
id
,
struct
snd_soc_dai_driver
*
drv
);
extern
int
s3c_i2sv2_register_component
(
struct
device
*
dev
,
int
id
,
struct
snd_soc_component_driver
*
cmp_drv
,
struct
snd_soc_dai_driver
*
dai_drv
);
#endif
/* __SND_SOC_S3C24XX_S3C_I2SV2_I2S_H */
sound/soc/samsung/s3c2412-i2s.c
View file @
13419625
...
...
@@ -160,11 +160,17 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = {
.
ops
=
&
s3c2412_i2s_dai_ops
,
};
static
const
struct
snd_soc_component_driver
s3c2412_i2s_component
=
{
.
name
=
"s3c2412-i2s"
,
};
static
int
s3c2412_iis_dev_probe
(
struct
platform_device
*
pdev
)
{
int
ret
=
0
;
ret
=
s3c_i2sv2_register_dai
(
&
pdev
->
dev
,
-
1
,
&
s3c2412_i2s_dai
);
ret
=
s3c_i2sv2_register_component
(
&
pdev
->
dev
,
-
1
,
&
s3c2412_i2s_component
,
&
s3c2412_i2s_dai
);
if
(
ret
)
{
pr_err
(
"failed to register the dai
\n
"
);
return
ret
;
...
...
@@ -178,14 +184,14 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev)
return
0
;
err:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
ret
;
}
static
int
s3c2412_iis_dev_remove
(
struct
platform_device
*
pdev
)
{
asoc_dma_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/samsung/s3c24xx-i2s.c
View file @
13419625
...
...
@@ -465,11 +465,16 @@ static struct snd_soc_dai_driver s3c24xx_i2s_dai = {
.
ops
=
&
s3c24xx_i2s_dai_ops
,
};
static
const
struct
snd_soc_component_driver
s3c24xx_i2s_component
=
{
.
name
=
"s3c24xx-i2s"
,
};
static
int
s3c24xx_iis_dev_probe
(
struct
platform_device
*
pdev
)
{
int
ret
=
0
;
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
s3c24xx_i2s_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
s3c24xx_i2s_component
,
&
s3c24xx_i2s_dai
,
1
);
if
(
ret
)
{
pr_err
(
"failed to register the dai
\n
"
);
return
ret
;
...
...
@@ -483,14 +488,14 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev)
return
0
;
err:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
ret
;
}
static
int
s3c24xx_iis_dev_remove
(
struct
platform_device
*
pdev
)
{
asoc_dma_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/samsung/spdif.c
View file @
13419625
...
...
@@ -357,6 +357,10 @@ static struct snd_soc_dai_driver samsung_spdif_dai = {
.
resume
=
spdif_resume
,
};
static
const
struct
snd_soc_component_driver
samsung_spdif_component
=
{
.
name
=
"samsung-spdif"
,
};
static
int
spdif_probe
(
struct
platform_device
*
pdev
)
{
struct
s3c_audio_pdata
*
spdif_pdata
;
...
...
@@ -424,7 +428,8 @@ static int spdif_probe(struct platform_device *pdev)
dev_set_drvdata
(
&
pdev
->
dev
,
spdif
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
samsung_spdif_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
samsung_spdif_component
,
&
samsung_spdif_dai
,
1
);
if
(
ret
!=
0
)
{
dev_err
(
&
pdev
->
dev
,
"fail to register dai
\n
"
);
goto
err4
;
...
...
@@ -445,7 +450,7 @@ static int spdif_probe(struct platform_device *pdev)
return
0
;
err5:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
err4:
iounmap
(
spdif
->
regs
);
err3:
...
...
@@ -466,7 +471,7 @@ static int spdif_remove(struct platform_device *pdev)
struct
resource
*
mem_res
;
asoc_dma_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
iounmap
(
spdif
->
regs
);
...
...
sound/soc/sh/fsi.c
View file @
13419625
...
...
@@ -1886,6 +1886,10 @@ static struct snd_soc_platform_driver fsi_soc_platform = {
.
pcm_free
=
fsi_pcm_free
,
};
static
const
struct
snd_soc_component_driver
fsi_soc_component
=
{
.
name
=
"fsi"
,
};
/*
* platform function
*/
...
...
@@ -2046,10 +2050,10 @@ static int fsi_probe(struct platform_device *pdev)
goto
exit_fsib
;
}
ret
=
snd_soc_register_
dais
(
&
pdev
->
dev
,
fsi_soc_dai
,
ARRAY_SIZE
(
fsi_soc_dai
));
ret
=
snd_soc_register_
component
(
&
pdev
->
dev
,
&
fsi_soc_component
,
fsi_soc_dai
,
ARRAY_SIZE
(
fsi_soc_dai
));
if
(
ret
<
0
)
{
dev_err
(
&
pdev
->
dev
,
"cannot snd
dai
register
\n
"
);
dev_err
(
&
pdev
->
dev
,
"cannot snd
component
register
\n
"
);
goto
exit_snd_soc
;
}
...
...
@@ -2074,7 +2078,7 @@ static int fsi_remove(struct platform_device *pdev)
pm_runtime_disable
(
&
pdev
->
dev
);
snd_soc_unregister_
dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
fsi_soc_dai
)
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
snd_soc_unregister_platform
(
&
pdev
->
dev
);
fsi_stream_remove
(
&
master
->
fsia
);
...
...
sound/soc/sh/hac.c
View file @
13419625
...
...
@@ -310,15 +310,19 @@ static struct snd_soc_dai_driver sh4_hac_dai[] = {
#endif
};
static
const
struct
snd_soc_component_driver
sh4_hac_component
=
{
.
name
=
"sh4-hac"
,
};
static
int
hac_soc_platform_probe
(
struct
platform_device
*
pdev
)
{
return
snd_soc_register_
dais
(
&
pdev
->
dev
,
sh4_hac_dai
,
ARRAY_SIZE
(
sh4_hac_dai
));
return
snd_soc_register_
component
(
&
pdev
->
dev
,
&
sh4_hac_component
,
sh4_hac_dai
,
ARRAY_SIZE
(
sh4_hac_dai
));
}
static
int
hac_soc_platform_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
sh4_hac_dai
)
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/sh/migor.c
View file @
13419625
...
...
@@ -153,7 +153,7 @@ static int migor_dai_init(struct snd_soc_pcm_runtime *rtd)
static
struct
snd_soc_dai_link
migor_dai
=
{
.
name
=
"wm8978"
,
.
stream_name
=
"WM8978"
,
.
cpu_dai_name
=
"siu-
i2s-dai
"
,
.
cpu_dai_name
=
"siu-
pcm-audio
"
,
.
codec_dai_name
=
"wm8978-hifi"
,
.
platform_name
=
"siu-pcm-audio"
,
.
codec_name
=
"wm8978.0-001a"
,
...
...
sound/soc/sh/siu_dai.c
View file @
13419625
...
...
@@ -726,6 +726,10 @@ static struct snd_soc_dai_driver siu_i2s_dai = {
.
ops
=
&
siu_dai_ops
,
};
static
const
struct
snd_soc_component_driver
siu_i2s_component
=
{
.
name
=
"siu-i2s"
,
};
static
int
siu_probe
(
struct
platform_device
*
pdev
)
{
const
struct
firmware
*
fw_entry
;
...
...
@@ -783,7 +787,8 @@ static int siu_probe(struct platform_device *pdev)
dev_set_drvdata
(
&
pdev
->
dev
,
info
);
/* register using ARRAY version so we can keep dai name */
ret
=
snd_soc_register_dais
(
&
pdev
->
dev
,
&
siu_i2s_dai
,
1
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
siu_i2s_component
,
&
siu_i2s_dai
,
1
);
if
(
ret
<
0
)
goto
edaiinit
;
...
...
@@ -796,7 +801,7 @@ static int siu_probe(struct platform_device *pdev)
return
ret
;
esocregp:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
edaiinit:
iounmap
(
info
->
reg
);
emapreg:
...
...
@@ -823,7 +828,7 @@ static int siu_remove(struct platform_device *pdev)
pm_runtime_disable
(
&
pdev
->
dev
);
snd_soc_unregister_platform
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
iounmap
(
info
->
reg
);
iounmap
(
info
->
yram
);
...
...
sound/soc/sh/ssi.c
View file @
13419625
...
...
@@ -379,15 +379,19 @@ static struct snd_soc_dai_driver sh4_ssi_dai[] = {
#endif
};
static
const
struct
snd_soc_component_driver
sh4_ssi_component
=
{
.
name
=
"sh4-ssi"
,
};
static
int
sh4_soc_dai_probe
(
struct
platform_device
*
pdev
)
{
return
snd_soc_register_
dais
(
&
pdev
->
dev
,
sh4_ssi_dai
,
ARRAY_SIZE
(
sh4_ssi_dai
));
return
snd_soc_register_
component
(
&
pdev
->
dev
,
&
sh4_ssi_component
,
sh4_ssi_dai
,
ARRAY_SIZE
(
sh4_ssi_dai
));
}
static
int
sh4_soc_dai_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
sh4_ssi_dai
)
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/soc-core.c
View file @
13419625
...
...
@@ -58,6 +58,7 @@ static DEFINE_MUTEX(client_mutex);
static
LIST_HEAD
(
dai_list
);
static
LIST_HEAD
(
platform_list
);
static
LIST_HEAD
(
codec_list
);
static
LIST_HEAD
(
component_list
);
/*
* This is a timeout to do a DAPM powerdown after a stream is closed().
...
...
@@ -3740,7 +3741,7 @@ static inline char *fmt_multiple_name(struct device *dev,
*
* @dai: DAI to register
*/
int
snd_soc_register_dai
(
struct
device
*
dev
,
static
int
snd_soc_register_dai
(
struct
device
*
dev
,
struct
snd_soc_dai_driver
*
dai_drv
)
{
struct
snd_soc_codec
*
codec
;
...
...
@@ -3787,14 +3788,13 @@ int snd_soc_register_dai(struct device *dev,
return
0
;
}
EXPORT_SYMBOL_GPL
(
snd_soc_register_dai
);
/**
* snd_soc_unregister_dai - Unregister a DAI from the ASoC core
*
* @dai: DAI to unregister
*/
void
snd_soc_unregister_dai
(
struct
device
*
dev
)
static
void
snd_soc_unregister_dai
(
struct
device
*
dev
)
{
struct
snd_soc_dai
*
dai
;
...
...
@@ -3813,7 +3813,6 @@ void snd_soc_unregister_dai(struct device *dev)
kfree
(
dai
->
name
);
kfree
(
dai
);
}
EXPORT_SYMBOL_GPL
(
snd_soc_unregister_dai
);
/**
* snd_soc_register_dais - Register multiple DAIs with the ASoC core
...
...
@@ -3821,7 +3820,7 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_dai);
* @dai: Array of DAIs to register
* @count: Number of DAIs
*/
int
snd_soc_register_dais
(
struct
device
*
dev
,
static
int
snd_soc_register_dais
(
struct
device
*
dev
,
struct
snd_soc_dai_driver
*
dai_drv
,
size_t
count
)
{
struct
snd_soc_codec
*
codec
;
...
...
@@ -3885,7 +3884,6 @@ int snd_soc_register_dais(struct device *dev,
return
ret
;
}
EXPORT_SYMBOL_GPL
(
snd_soc_register_dais
);
/**
* snd_soc_unregister_dais - Unregister multiple DAIs from the ASoC core
...
...
@@ -3893,14 +3891,13 @@ EXPORT_SYMBOL_GPL(snd_soc_register_dais);
* @dai: Array of DAIs to unregister
* @count: Number of DAIs
*/
void
snd_soc_unregister_dais
(
struct
device
*
dev
,
size_t
count
)
static
void
snd_soc_unregister_dais
(
struct
device
*
dev
,
size_t
count
)
{
int
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
snd_soc_unregister_dai
(
dev
);
}
EXPORT_SYMBOL_GPL
(
snd_soc_unregister_dais
);
/**
* snd_soc_register_platform - Register a platform with the ASoC core
...
...
@@ -4139,6 +4136,92 @@ void snd_soc_unregister_codec(struct device *dev)
}
EXPORT_SYMBOL_GPL
(
snd_soc_unregister_codec
);
/**
* snd_soc_register_component - Register a component with the ASoC core
*
*/
int
snd_soc_register_component
(
struct
device
*
dev
,
const
struct
snd_soc_component_driver
*
cmpnt_drv
,
struct
snd_soc_dai_driver
*
dai_drv
,
int
num_dai
)
{
struct
snd_soc_component
*
cmpnt
;
int
ret
;
dev_dbg
(
dev
,
"component register %s
\n
"
,
dev_name
(
dev
));
cmpnt
=
devm_kzalloc
(
dev
,
sizeof
(
*
cmpnt
),
GFP_KERNEL
);
if
(
!
cmpnt
)
{
dev_err
(
dev
,
"ASoC: Failed to allocate memory
\n
"
);
return
-
ENOMEM
;
}
cmpnt
->
name
=
fmt_single_name
(
dev
,
&
cmpnt
->
id
);
if
(
!
cmpnt
->
name
)
{
dev_err
(
dev
,
"ASoC: Failed to simplifying name
\n
"
);
return
-
ENOMEM
;
}
cmpnt
->
dev
=
dev
;
cmpnt
->
driver
=
cmpnt_drv
;
cmpnt
->
num_dai
=
num_dai
;
/*
* snd_soc_register_dai() uses fmt_single_name(), and
* snd_soc_register_dais() uses fmt_multiple_name()
* for dai->name which is used for name based matching
*/
if
(
1
==
num_dai
)
ret
=
snd_soc_register_dai
(
dev
,
dai_drv
);
else
ret
=
snd_soc_register_dais
(
dev
,
dai_drv
,
num_dai
);
if
(
ret
<
0
)
{
dev_err
(
dev
,
"ASoC: Failed to regster DAIs: %d
\n
"
,
ret
);
goto
error_component_name
;
}
mutex_lock
(
&
client_mutex
);
list_add
(
&
cmpnt
->
list
,
&
component_list
);
mutex_unlock
(
&
client_mutex
);
dev_dbg
(
cmpnt
->
dev
,
"ASoC: Registered component '%s'
\n
"
,
cmpnt
->
name
);
return
ret
;
error_component_name:
kfree
(
cmpnt
->
name
);
return
ret
;
}
EXPORT_SYMBOL_GPL
(
snd_soc_register_component
);
/**
* snd_soc_unregister_component - Unregister a component from the ASoC core
*
*/
void
snd_soc_unregister_component
(
struct
device
*
dev
)
{
struct
snd_soc_component
*
cmpnt
;
list_for_each_entry
(
cmpnt
,
&
component_list
,
list
)
{
if
(
dev
==
cmpnt
->
dev
)
goto
found
;
}
return
;
found:
snd_soc_unregister_dais
(
dev
,
cmpnt
->
num_dai
);
mutex_lock
(
&
client_mutex
);
list_del
(
&
cmpnt
->
list
);
mutex_unlock
(
&
client_mutex
);
dev_dbg
(
dev
,
"ASoC: Unregistered component '%s'
\n
"
,
cmpnt
->
name
);
kfree
(
cmpnt
->
name
);
}
EXPORT_SYMBOL_GPL
(
snd_soc_unregister_component
);
/* Retrieve a card's name from device tree */
int
snd_soc_of_parse_card_name
(
struct
snd_soc_card
*
card
,
const
char
*
propname
)
...
...
sound/soc/spear/spdif_in.c
View file @
13419625
...
...
@@ -170,6 +170,10 @@ struct snd_soc_dai_driver spdif_in_dai = {
.
ops
=
&
spdif_in_dai_ops
,
};
static
const
struct
snd_soc_component_driver
spdif_in_component
=
{
.
name
=
"spdif-in"
,
};
static
irqreturn_t
spdif_in_irq
(
int
irq
,
void
*
arg
)
{
struct
spdif_in_dev
*
host
=
(
struct
spdif_in_dev
*
)
arg
;
...
...
@@ -258,7 +262,8 @@ static int spdif_in_probe(struct platform_device *pdev)
return
ret
;
}
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
spdif_in_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
spdif_in_component
,
&
spdif_in_dai
,
1
);
if
(
ret
!=
0
)
{
clk_put
(
host
->
clk
);
return
ret
;
...
...
@@ -271,7 +276,7 @@ static int spdif_in_remove(struct platform_device *pdev)
{
struct
spdif_in_dev
*
host
=
dev_get_drvdata
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
dev_set_drvdata
(
&
pdev
->
dev
,
NULL
);
clk_put
(
host
->
clk
);
...
...
sound/soc/spear/spdif_out.c
View file @
13419625
...
...
@@ -270,6 +270,10 @@ static struct snd_soc_dai_driver spdif_out_dai = {
.
ops
=
&
spdif_out_dai_ops
,
};
static
const
struct
snd_soc_component_driver
spdif_out_component
=
{
.
name
=
"spdif-out"
,
};
static
int
spdif_out_probe
(
struct
platform_device
*
pdev
)
{
struct
spdif_out_dev
*
host
;
...
...
@@ -314,7 +318,8 @@ static int spdif_out_probe(struct platform_device *pdev)
dev_set_drvdata
(
&
pdev
->
dev
,
host
);
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
spdif_out_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
spdif_out_component
,
&
spdif_out_dai
,
1
);
if
(
ret
!=
0
)
{
clk_put
(
host
->
clk
);
return
ret
;
...
...
@@ -327,7 +332,7 @@ static int spdif_out_remove(struct platform_device *pdev)
{
struct
spdif_out_dev
*
host
=
dev_get_drvdata
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
dev_set_drvdata
(
&
pdev
->
dev
,
NULL
);
clk_put
(
host
->
clk
);
...
...
sound/soc/tegra/tegra20_ac97.c
View file @
13419625
...
...
@@ -248,6 +248,10 @@ static struct snd_soc_dai_driver tegra20_ac97_dai = {
.
ops
=
&
tegra20_ac97_dai_ops
,
};
static
const
struct
snd_soc_component_driver
tegra20_ac97_component
=
{
.
name
=
DRV_NAME
,
};
static
bool
tegra20_ac97_wr_rd_reg
(
struct
device
*
dev
,
unsigned
int
reg
)
{
switch
(
reg
)
{
...
...
@@ -398,7 +402,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
ac97
->
playback_dma_data
.
width
=
32
;
ac97
->
playback_dma_data
.
req_sel
=
of_dma
[
1
];
ret
=
snd_soc_register_dais
(
&
pdev
->
dev
,
&
tegra20_ac97_dai
,
1
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
tegra20_ac97_component
,
&
tegra20_ac97_dai
,
1
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"Could not register DAI: %d
\n
"
,
ret
);
ret
=
-
ENOMEM
;
...
...
@@ -408,7 +413,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
ret
=
tegra_pcm_platform_register
(
&
pdev
->
dev
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"Could not register PCM: %d
\n
"
,
ret
);
goto
err_unregister_
dai
;
goto
err_unregister_
component
;
}
ret
=
tegra_asoc_utils_init
(
&
ac97
->
util_data
,
&
pdev
->
dev
);
...
...
@@ -434,8 +439,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
tegra_asoc_utils_fini
(
&
ac97
->
util_data
);
err_unregister_pcm:
tegra_pcm_platform_unregister
(
&
pdev
->
dev
);
err_unregister_
dai
:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
err_unregister_
component
:
snd_soc_unregister_
component
(
&
pdev
->
dev
);
err_clk_put:
clk_put
(
ac97
->
clk_ac97
);
err:
...
...
@@ -447,7 +452,7 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev)
struct
tegra20_ac97
*
ac97
=
dev_get_drvdata
(
&
pdev
->
dev
);
tegra_pcm_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
tegra_asoc_utils_fini
(
&
ac97
->
util_data
);
...
...
sound/soc/tegra/tegra20_i2s.c
View file @
13419625
...
...
@@ -276,6 +276,10 @@ static const struct snd_soc_dai_driver tegra20_i2s_dai_template = {
.
symmetric_rates
=
1
,
};
static
const
struct
snd_soc_component_driver
tegra20_i2s_component
=
{
.
name
=
DRV_NAME
,
};
static
bool
tegra20_i2s_wr_rd_reg
(
struct
device
*
dev
,
unsigned
int
reg
)
{
switch
(
reg
)
{
...
...
@@ -419,7 +423,8 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev)
goto
err_pm_disable
;
}
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
i2s
->
dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
tegra20_i2s_component
,
&
i2s
->
dai
,
1
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"Could not register DAI: %d
\n
"
,
ret
);
ret
=
-
ENOMEM
;
...
...
@@ -429,13 +434,13 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev)
ret
=
tegra_pcm_platform_register
(
&
pdev
->
dev
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"Could not register PCM: %d
\n
"
,
ret
);
goto
err_unregister_
dai
;
goto
err_unregister_
component
;
}
return
0
;
err_unregister_
dai
:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
err_unregister_
component
:
snd_soc_unregister_
component
(
&
pdev
->
dev
);
err_suspend:
if
(
!
pm_runtime_status_suspended
(
&
pdev
->
dev
))
tegra20_i2s_runtime_suspend
(
&
pdev
->
dev
);
...
...
@@ -456,7 +461,7 @@ static int tegra20_i2s_platform_remove(struct platform_device *pdev)
tegra20_i2s_runtime_suspend
(
&
pdev
->
dev
);
tegra_pcm_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
clk_put
(
i2s
->
clk_i2s
);
...
...
sound/soc/tegra/tegra20_spdif.c
View file @
13419625
...
...
@@ -182,6 +182,10 @@ static struct snd_soc_dai_driver tegra20_spdif_dai = {
.
ops
=
&
tegra20_spdif_dai_ops
,
};
static
const
struct
snd_soc_component_driver
tegra20_spdif_component
=
{
.
name
=
DRV_NAME
,
};
static
bool
tegra20_spdif_wr_rd_reg
(
struct
device
*
dev
,
unsigned
int
reg
)
{
switch
(
reg
)
{
...
...
@@ -329,7 +333,8 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
goto
err_pm_disable
;
}
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
tegra20_spdif_dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
tegra20_spdif_component
,
&
tegra20_spdif_dai
,
1
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"Could not register DAI: %d
\n
"
,
ret
);
ret
=
-
ENOMEM
;
...
...
@@ -339,13 +344,13 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
ret
=
tegra_pcm_platform_register
(
&
pdev
->
dev
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"Could not register PCM: %d
\n
"
,
ret
);
goto
err_unregister_
dai
;
goto
err_unregister_
component
;
}
return
0
;
err_unregister_
dai
:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
err_unregister_
component
:
snd_soc_unregister_
component
(
&
pdev
->
dev
);
err_suspend:
if
(
!
pm_runtime_status_suspended
(
&
pdev
->
dev
))
tegra20_spdif_runtime_suspend
(
&
pdev
->
dev
);
...
...
@@ -366,7 +371,7 @@ static int tegra20_spdif_platform_remove(struct platform_device *pdev)
tegra20_spdif_runtime_suspend
(
&
pdev
->
dev
);
tegra_pcm_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
clk_put
(
spdif
->
clk_spdif_out
);
...
...
sound/soc/tegra/tegra30_i2s.c
View file @
13419625
...
...
@@ -336,6 +336,10 @@ static const struct snd_soc_dai_driver tegra30_i2s_dai_template = {
.
symmetric_rates
=
1
,
};
static
const
struct
snd_soc_component_driver
tegra30_i2s_component
=
{
.
name
=
DRV_NAME
,
};
static
bool
tegra30_i2s_wr_rd_reg
(
struct
device
*
dev
,
unsigned
int
reg
)
{
switch
(
reg
)
{
...
...
@@ -464,7 +468,8 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
goto
err_pm_disable
;
}
ret
=
snd_soc_register_dai
(
&
pdev
->
dev
,
&
i2s
->
dai
);
ret
=
snd_soc_register_component
(
&
pdev
->
dev
,
&
tegra30_i2s_component
,
&
i2s
->
dai
,
1
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"Could not register DAI: %d
\n
"
,
ret
);
ret
=
-
ENOMEM
;
...
...
@@ -474,13 +479,13 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
ret
=
tegra_pcm_platform_register
(
&
pdev
->
dev
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"Could not register PCM: %d
\n
"
,
ret
);
goto
err_unregister_
dai
;
goto
err_unregister_
component
;
}
return
0
;
err_unregister_
dai
:
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
err_unregister_
component
:
snd_soc_unregister_
component
(
&
pdev
->
dev
);
err_suspend:
if
(
!
pm_runtime_status_suspended
(
&
pdev
->
dev
))
tegra30_i2s_runtime_suspend
(
&
pdev
->
dev
);
...
...
@@ -501,7 +506,7 @@ static int tegra30_i2s_platform_remove(struct platform_device *pdev)
tegra30_i2s_runtime_suspend
(
&
pdev
->
dev
);
tegra_pcm_platform_unregister
(
&
pdev
->
dev
);
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
clk_put
(
i2s
->
clk_i2s
);
...
...
sound/soc/tegra/tegra_wm9712.c
View file @
13419625
...
...
@@ -55,7 +55,7 @@ static int tegra_wm9712_init(struct snd_soc_pcm_runtime *rtd)
static
struct
snd_soc_dai_link
tegra_wm9712_dai
=
{
.
name
=
"AC97 HiFi"
,
.
stream_name
=
"AC97 HiFi"
,
.
cpu_dai_name
=
"tegra
-ac97-pcm
"
,
.
cpu_dai_name
=
"tegra
20-ac97
"
,
.
codec_dai_name
=
"wm9712-hifi"
,
.
codec_name
=
"wm9712-codec"
,
.
init
=
tegra_wm9712_init
,
...
...
sound/soc/txx9/txx9aclc-ac97.c
View file @
13419625
...
...
@@ -170,6 +170,10 @@ static struct snd_soc_dai_driver txx9aclc_ac97_dai = {
},
};
static
const
struct
snd_soc_component_driver
txx9aclc_ac97_component
=
{
.
name
=
"txx9aclc-ac97"
,
};
static
int
txx9aclc_ac97_dev_probe
(
struct
platform_device
*
pdev
)
{
struct
txx9aclc_plat_drvdata
*
drvdata
;
...
...
@@ -205,12 +209,13 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
if
(
err
<
0
)
return
err
;
return
snd_soc_register_dai
(
&
pdev
->
dev
,
&
txx9aclc_ac97_dai
);
return
snd_soc_register_component
(
&
pdev
->
dev
,
&
txx9aclc_ac97_component
,
&
txx9aclc_ac97_dai
,
1
);
}
static
int
txx9aclc_ac97_dev_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_
dai
(
&
pdev
->
dev
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
return
0
;
}
...
...
sound/soc/ux500/ux500_msp_dai.c
View file @
13419625
...
...
@@ -768,6 +768,11 @@ static struct snd_soc_dai_driver ux500_msp_dai_drv[UX500_NBR_OF_DAI] = {
},
};
static
const
struct
snd_soc_component_driver
ux500_msp_component
=
{
.
name
=
"ux500-msp"
,
};
static
int
ux500_msp_drv_probe
(
struct
platform_device
*
pdev
)
{
struct
ux500_msp_i2s_drvdata
*
drvdata
;
...
...
@@ -825,8 +830,8 @@ static int ux500_msp_drv_probe(struct platform_device *pdev)
}
dev_set_drvdata
(
&
pdev
->
dev
,
drvdata
);
ret
=
snd_soc_register_
dai
(
&
pdev
->
dev
,
&
ux500_msp_dai_drv
[
drvdata
->
msp
->
id
]
);
ret
=
snd_soc_register_
component
(
&
pdev
->
dev
,
&
ux500_msp_component
,
&
ux500_msp_dai_drv
[
drvdata
->
msp
->
id
],
1
);
if
(
ret
<
0
)
{
dev_err
(
&
pdev
->
dev
,
"Error: %s: Failed to register MSP%d!
\n
"
,
__func__
,
drvdata
->
msp
->
id
);
...
...
@@ -844,7 +849,7 @@ static int ux500_msp_drv_probe(struct platform_device *pdev)
return
0
;
err_reg_plat:
snd_soc_unregister_
dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
ux500_msp_dai_drv
)
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
err_init_msp:
clk_put
(
drvdata
->
clk
);
err_clk:
...
...
@@ -861,7 +866,7 @@ static int ux500_msp_drv_remove(struct platform_device *pdev)
ux500_pcm_unregister_platform
(
pdev
);
snd_soc_unregister_
dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
ux500_msp_dai_drv
)
);
snd_soc_unregister_
component
(
&
pdev
->
dev
);
devm_regulator_put
(
drvdata
->
reg_vape
);
prcmu_qos_remove_requirement
(
PRCMU_QOS_APE_OPP
,
"ux500_msp_i2s"
);
...
...
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