Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ath
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
qsdk
kvalo
ath
Commits
445bb423
Unverified
Commit
445bb423
authored
6 years ago
by
Mark Brown
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'asoc/topic/zx_aud96p22' into asoc-next
parents
38a72a9f
755d440b
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sound/soc/codecs/zx_aud96p22.c
+18
-17
18 additions, 17 deletions
sound/soc/codecs/zx_aud96p22.c
with
18 additions
and
17 deletions
sound/soc/codecs/zx_aud96p22.c
+
18
−
17
View file @
445bb423
...
...
@@ -57,8 +57,8 @@ struct aud96p22_priv {
static
int
aud96p22_adc_event
(
struct
snd_soc_dapm_widget
*
w
,
struct
snd_kcontrol
*
kcontrol
,
int
event
)
{
struct
snd_soc_co
dec
*
codec
=
snd_soc_dapm_to_co
dec
(
w
->
dapm
);
struct
aud96p22_priv
*
priv
=
snd_soc_co
dec
_get_drvdata
(
co
dec
);
struct
snd_soc_co
mponent
*
component
=
snd_soc_dapm_to_co
mponent
(
w
->
dapm
);
struct
aud96p22_priv
*
priv
=
snd_soc_co
mponent
_get_drvdata
(
co
mponent
);
struct
regmap
*
regmap
=
priv
->
regmap
;
if
(
event
!=
SND_SOC_DAPM_POST_PMU
)
...
...
@@ -74,8 +74,8 @@ static int aud96p22_adc_event(struct snd_soc_dapm_widget *w,
static
int
aud96p22_dac_event
(
struct
snd_soc_dapm_widget
*
w
,
struct
snd_kcontrol
*
kcontrol
,
int
event
)
{
struct
snd_soc_co
dec
*
codec
=
snd_soc_dapm_to_co
dec
(
w
->
dapm
);
struct
aud96p22_priv
*
priv
=
snd_soc_co
dec
_get_drvdata
(
co
dec
);
struct
snd_soc_co
mponent
*
component
=
snd_soc_dapm_to_co
mponent
(
w
->
dapm
);
struct
aud96p22_priv
*
priv
=
snd_soc_co
mponent
_get_drvdata
(
co
mponent
);
struct
regmap
*
regmap
=
priv
->
regmap
;
if
(
event
!=
SND_SOC_DAPM_POST_PMU
)
...
...
@@ -261,20 +261,22 @@ static const struct snd_soc_dapm_route aud96p22_dapm_routes[] = {
{
"LINEOUTMN"
,
NULL
,
"LD2"
},
};
static
const
struct
snd_soc_codec_driver
aud96p22_driver
=
{
.
component_driver
=
{
.
controls
=
aud96p22_snd_controls
,
.
num_controls
=
ARRAY_SIZE
(
aud96p22_snd_controls
),
.
dapm_widgets
=
aud96p22_dapm_widgets
,
.
num_dapm_widgets
=
ARRAY_SIZE
(
aud96p22_dapm_widgets
),
.
dapm_routes
=
aud96p22_dapm_routes
,
.
num_dapm_routes
=
ARRAY_SIZE
(
aud96p22_dapm_routes
),
},
static
const
struct
snd_soc_component_driver
aud96p22_driver
=
{
.
controls
=
aud96p22_snd_controls
,
.
num_controls
=
ARRAY_SIZE
(
aud96p22_snd_controls
),
.
dapm_widgets
=
aud96p22_dapm_widgets
,
.
num_dapm_widgets
=
ARRAY_SIZE
(
aud96p22_dapm_widgets
),
.
dapm_routes
=
aud96p22_dapm_routes
,
.
num_dapm_routes
=
ARRAY_SIZE
(
aud96p22_dapm_routes
),
.
idle_bias_on
=
1
,
.
use_pmdown_time
=
1
,
.
endianness
=
1
,
.
non_legacy_dai_naming
=
1
,
};
static
int
aud96p22_set_fmt
(
struct
snd_soc_dai
*
dai
,
unsigned
int
fmt
)
{
struct
aud96p22_priv
*
priv
=
snd_soc_co
dec
_get_drvdata
(
dai
->
co
dec
);
struct
aud96p22_priv
*
priv
=
snd_soc_co
mponent
_get_drvdata
(
dai
->
co
mponent
);
struct
regmap
*
regmap
=
priv
->
regmap
;
unsigned
int
val
;
...
...
@@ -367,9 +369,9 @@ static int aud96p22_i2c_probe(struct i2c_client *i2c,
i2c_set_clientdata
(
i2c
,
priv
);
ret
=
snd_soc_register_co
dec
(
dev
,
&
aud96p22_driver
,
&
aud96p22_dai
,
1
);
ret
=
devm_
snd_soc_register_co
mponent
(
dev
,
&
aud96p22_driver
,
&
aud96p22_dai
,
1
);
if
(
ret
)
{
dev_err
(
dev
,
"failed to register co
dec
: %d
\n
"
,
ret
);
dev_err
(
dev
,
"failed to register co
mponent
: %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -378,7 +380,6 @@ static int aud96p22_i2c_probe(struct i2c_client *i2c,
static
int
aud96p22_i2c_remove
(
struct
i2c_client
*
i2c
)
{
snd_soc_unregister_codec
(
&
i2c
->
dev
);
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment