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
5d5940d4
Commit
5d5940d4
authored
Apr 18, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
parents
41ef2d56
60b6f1a1
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
26 deletions
+46
-26
include/sound/soc-dapm.h
include/sound/soc-dapm.h
+0
-1
include/sound/soc.h
include/sound/soc.h
+4
-5
sound/soc/codecs/Kconfig
sound/soc/codecs/Kconfig
+1
-1
sound/soc/soc-core.c
sound/soc/soc-core.c
+15
-14
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+0
-1
sound/soc/soc-io.c
sound/soc/soc-io.c
+1
-4
sound/soc/soc-utils.c
sound/soc/soc-utils.c
+25
-0
No files found.
include/sound/soc-dapm.h
View file @
5d5940d4
...
@@ -566,7 +566,6 @@ struct snd_soc_dapm_update {
...
@@ -566,7 +566,6 @@ struct snd_soc_dapm_update {
/* DAPM context */
/* DAPM context */
struct
snd_soc_dapm_context
{
struct
snd_soc_dapm_context
{
int
n_widgets
;
/* number of widgets in this context */
enum
snd_soc_bias_level
bias_level
;
enum
snd_soc_bias_level
bias_level
;
enum
snd_soc_bias_level
suspend_bias_level
;
enum
snd_soc_bias_level
suspend_bias_level
;
struct
delayed_work
delayed_work
;
struct
delayed_work
delayed_work
;
...
...
include/sound/soc.h
View file @
5d5940d4
...
@@ -371,7 +371,7 @@ int snd_soc_suspend(struct device *dev);
...
@@ -371,7 +371,7 @@ int snd_soc_suspend(struct device *dev);
int
snd_soc_resume
(
struct
device
*
dev
);
int
snd_soc_resume
(
struct
device
*
dev
);
int
snd_soc_poweroff
(
struct
device
*
dev
);
int
snd_soc_poweroff
(
struct
device
*
dev
);
int
snd_soc_register_platform
(
struct
device
*
dev
,
int
snd_soc_register_platform
(
struct
device
*
dev
,
struct
snd_soc_platform_driver
*
platform_drv
);
const
struct
snd_soc_platform_driver
*
platform_drv
);
void
snd_soc_unregister_platform
(
struct
device
*
dev
);
void
snd_soc_unregister_platform
(
struct
device
*
dev
);
int
snd_soc_register_codec
(
struct
device
*
dev
,
int
snd_soc_register_codec
(
struct
device
*
dev
,
const
struct
snd_soc_codec_driver
*
codec_drv
,
const
struct
snd_soc_codec_driver
*
codec_drv
,
...
@@ -801,10 +801,10 @@ struct snd_soc_platform_driver {
...
@@ -801,10 +801,10 @@ struct snd_soc_platform_driver {
struct
snd_soc_dai
*
);
struct
snd_soc_dai
*
);
/* platform stream pcm ops */
/* platform stream pcm ops */
struct
snd_pcm_ops
*
ops
;
const
struct
snd_pcm_ops
*
ops
;
/* platform stream compress ops */
/* platform stream compress ops */
struct
snd_compr_ops
*
compr_ops
;
const
struct
snd_compr_ops
*
compr_ops
;
/* platform stream completion event */
/* platform stream completion event */
int
(
*
stream_event
)(
struct
snd_soc_dapm_context
*
dapm
,
int
event
);
int
(
*
stream_event
)(
struct
snd_soc_dapm_context
*
dapm
,
int
event
);
...
@@ -823,7 +823,7 @@ struct snd_soc_platform {
...
@@ -823,7 +823,7 @@ struct snd_soc_platform {
const
char
*
name
;
const
char
*
name
;
int
id
;
int
id
;
struct
device
*
dev
;
struct
device
*
dev
;
struct
snd_soc_platform_driver
*
driver
;
const
struct
snd_soc_platform_driver
*
driver
;
struct
mutex
mutex
;
struct
mutex
mutex
;
unsigned
int
suspended
:
1
;
/* platform is suspended */
unsigned
int
suspended
:
1
;
/* platform is suspended */
...
@@ -1086,7 +1086,6 @@ struct soc_enum {
...
@@ -1086,7 +1086,6 @@ struct soc_enum {
unsigned
int
mask
;
unsigned
int
mask
;
const
char
*
const
*
texts
;
const
char
*
const
*
texts
;
const
unsigned
int
*
values
;
const
unsigned
int
*
values
;
void
*
dapm
;
};
};
/* codec IO */
/* codec IO */
...
...
sound/soc/codecs/Kconfig
View file @
5d5940d4
...
@@ -324,7 +324,7 @@ config SND_SOC_TLV320AIC23
...
@@ -324,7 +324,7 @@ config SND_SOC_TLV320AIC23
tristate
tristate
config SND_SOC_TLV320AIC26
config SND_SOC_TLV320AIC26
tristate
"TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE
tristate
depends on SPI
depends on SPI
config SND_SOC_TLV320AIC32X4
config SND_SOC_TLV320AIC32X4
...
...
sound/soc/soc-core.c
View file @
5d5940d4
...
@@ -3908,7 +3908,7 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_dais);
...
@@ -3908,7 +3908,7 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_dais);
* @platform: platform to register
* @platform: platform to register
*/
*/
int
snd_soc_register_platform
(
struct
device
*
dev
,
int
snd_soc_register_platform
(
struct
device
*
dev
,
struct
snd_soc_platform_driver
*
platform_drv
)
const
struct
snd_soc_platform_driver
*
platform_drv
)
{
{
struct
snd_soc_platform
*
platform
;
struct
snd_soc_platform
*
platform
;
...
@@ -4024,8 +4024,8 @@ int snd_soc_register_codec(struct device *dev,
...
@@ -4024,8 +4024,8 @@ int snd_soc_register_codec(struct device *dev,
/* create CODEC component name */
/* create CODEC component name */
codec
->
name
=
fmt_single_name
(
dev
,
&
codec
->
id
);
codec
->
name
=
fmt_single_name
(
dev
,
&
codec
->
id
);
if
(
codec
->
name
==
NULL
)
{
if
(
codec
->
name
==
NULL
)
{
kfree
(
codec
)
;
ret
=
-
ENOMEM
;
return
-
ENOMEM
;
goto
fail_codec
;
}
}
if
(
codec_drv
->
compress_type
)
if
(
codec_drv
->
compress_type
)
...
@@ -4064,7 +4064,7 @@ int snd_soc_register_codec(struct device *dev,
...
@@ -4064,7 +4064,7 @@ int snd_soc_register_codec(struct device *dev,
reg_size
,
GFP_KERNEL
);
reg_size
,
GFP_KERNEL
);
if
(
!
codec
->
reg_def_copy
)
{
if
(
!
codec
->
reg_def_copy
)
{
ret
=
-
ENOMEM
;
ret
=
-
ENOMEM
;
goto
fail
;
goto
fail
_codec_name
;
}
}
}
}
}
}
...
@@ -4088,18 +4088,22 @@ int snd_soc_register_codec(struct device *dev,
...
@@ -4088,18 +4088,22 @@ int snd_soc_register_codec(struct device *dev,
mutex_unlock
(
&
client_mutex
);
mutex_unlock
(
&
client_mutex
);
/* register any DAIs */
/* register any DAIs */
if
(
num_dai
)
{
ret
=
snd_soc_register_dais
(
dev
,
dai_drv
,
num_dai
);
ret
=
snd_soc_register_dais
(
dev
,
dai_drv
,
num_dai
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
dev_err
(
codec
->
dev
,
"ASoC: Failed to regster"
dev_err
(
codec
->
dev
,
"ASoC: Failed to regster DAIs: %d
\n
"
,
ret
);
" DAIs: %d
\n
"
,
ret
)
;
goto
fail_codec_name
;
}
}
dev_dbg
(
codec
->
dev
,
"ASoC: Registered codec '%s'
\n
"
,
codec
->
name
);
dev_dbg
(
codec
->
dev
,
"ASoC: Registered codec '%s'
\n
"
,
codec
->
name
);
return
0
;
return
0
;
fail:
fail_codec_name:
mutex_lock
(
&
client_mutex
);
list_del
(
&
codec
->
list
);
mutex_unlock
(
&
client_mutex
);
kfree
(
codec
->
name
);
kfree
(
codec
->
name
);
fail_codec:
kfree
(
codec
);
kfree
(
codec
);
return
ret
;
return
ret
;
}
}
...
@@ -4113,7 +4117,6 @@ EXPORT_SYMBOL_GPL(snd_soc_register_codec);
...
@@ -4113,7 +4117,6 @@ EXPORT_SYMBOL_GPL(snd_soc_register_codec);
void
snd_soc_unregister_codec
(
struct
device
*
dev
)
void
snd_soc_unregister_codec
(
struct
device
*
dev
)
{
{
struct
snd_soc_codec
*
codec
;
struct
snd_soc_codec
*
codec
;
int
i
;
list_for_each_entry
(
codec
,
&
codec_list
,
list
)
{
list_for_each_entry
(
codec
,
&
codec_list
,
list
)
{
if
(
dev
==
codec
->
dev
)
if
(
dev
==
codec
->
dev
)
...
@@ -4122,9 +4125,7 @@ void snd_soc_unregister_codec(struct device *dev)
...
@@ -4122,9 +4125,7 @@ void snd_soc_unregister_codec(struct device *dev)
return
;
return
;
found:
found:
if
(
codec
->
num_dai
)
snd_soc_unregister_dais
(
dev
,
codec
->
num_dai
);
for
(
i
=
0
;
i
<
codec
->
num_dai
;
i
++
)
snd_soc_unregister_dai
(
dev
);
mutex_lock
(
&
client_mutex
);
mutex_lock
(
&
client_mutex
);
list_del
(
&
codec
->
list
);
list_del
(
&
codec
->
list
);
...
...
sound/soc/soc-dapm.c
View file @
5d5940d4
...
@@ -3137,7 +3137,6 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
...
@@ -3137,7 +3137,6 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
break
;
break
;
}
}
dapm
->
n_widgets
++
;
w
->
dapm
=
dapm
;
w
->
dapm
=
dapm
;
w
->
codec
=
dapm
->
codec
;
w
->
codec
=
dapm
->
codec
;
w
->
platform
=
dapm
->
platform
;
w
->
platform
=
dapm
->
platform
;
...
...
sound/soc/soc-io.c
View file @
5d5940d4
...
@@ -158,10 +158,7 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
...
@@ -158,10 +158,7 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
IS_ERR
(
codec
->
control_data
))
return
PTR_RET
(
codec
->
control_data
);
return
PTR_ERR
(
codec
->
control_data
);
return
0
;
}
}
EXPORT_SYMBOL_GPL
(
snd_soc_codec_set_cache_io
);
EXPORT_SYMBOL_GPL
(
snd_soc_codec_set_cache_io
);
#else
#else
...
...
sound/soc/soc-utils.c
View file @
5d5940d4
...
@@ -90,8 +90,33 @@ static struct snd_soc_platform_driver dummy_platform = {
...
@@ -90,8 +90,33 @@ static struct snd_soc_platform_driver dummy_platform = {
};
};
static
struct
snd_soc_codec_driver
dummy_codec
;
static
struct
snd_soc_codec_driver
dummy_codec
;
#define STUB_RATES SNDRV_PCM_RATE_8000_192000
#define STUB_FORMATS (SNDRV_PCM_FMTBIT_S8 | \
SNDRV_PCM_FMTBIT_U8 | \
SNDRV_PCM_FMTBIT_S16_LE | \
SNDRV_PCM_FMTBIT_U16_LE | \
SNDRV_PCM_FMTBIT_S24_LE | \
SNDRV_PCM_FMTBIT_U24_LE | \
SNDRV_PCM_FMTBIT_S32_LE | \
SNDRV_PCM_FMTBIT_U32_LE | \
SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE)
static
struct
snd_soc_dai_driver
dummy_dai
=
{
static
struct
snd_soc_dai_driver
dummy_dai
=
{
.
name
=
"snd-soc-dummy-dai"
,
.
name
=
"snd-soc-dummy-dai"
,
.
playback
=
{
.
stream_name
=
"Playback"
,
.
channels_min
=
1
,
.
channels_max
=
384
,
.
rates
=
STUB_RATES
,
.
formats
=
STUB_FORMATS
,
},
.
capture
=
{
.
stream_name
=
"Capture"
,
.
channels_min
=
1
,
.
channels_max
=
384
,
.
rates
=
STUB_RATES
,
.
formats
=
STUB_FORMATS
,
},
};
};
static
int
snd_soc_dummy_probe
(
struct
platform_device
*
pdev
)
static
int
snd_soc_dummy_probe
(
struct
platform_device
*
pdev
)
...
...
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