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
a6f849f7
Commit
a6f849f7
authored
Oct 24, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/rt5640' into asoc-next
parents
5b2ad46d
ebce3114
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
sound/soc/codecs/rt5640.c
sound/soc/codecs/rt5640.c
+21
-3
No files found.
sound/soc/codecs/rt5640.c
View file @
a6f849f7
...
...
@@ -21,6 +21,7 @@
#include <linux/of_gpio.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/acpi.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
...
...
@@ -926,7 +927,7 @@ static int rt5640_set_dmic2_event(struct snd_soc_dapm_widget *w,
return
0
;
}
void
hp_amp_power_on
(
struct
snd_soc_codec
*
codec
)
static
void
hp_amp_power_on
(
struct
snd_soc_codec
*
codec
)
{
struct
rt5640_priv
*
rt5640
=
snd_soc_codec_get_drvdata
(
codec
);
...
...
@@ -1609,7 +1610,8 @@ static int rt5640_hw_params(struct snd_pcm_substream *substream,
rt5640
->
lrck
[
dai
->
id
]
=
params_rate
(
params
);
pre_div
=
get_clk_info
(
rt5640
->
sysclk
,
rt5640
->
lrck
[
dai
->
id
]);
if
(
pre_div
<
0
)
{
dev_err
(
codec
->
dev
,
"Unsupported clock setting
\n
"
);
dev_err
(
codec
->
dev
,
"Unsupported clock setting %d for DAI %d
\n
"
,
rt5640
->
lrck
[
dai
->
id
],
dai
->
id
);
return
-
EINVAL
;
}
frame_size
=
snd_soc_params_to_frame_size
(
params
);
...
...
@@ -1977,13 +1979,20 @@ static int rt5640_suspend(struct snd_soc_codec *codec)
rt5640_reset
(
codec
);
regcache_cache_only
(
rt5640
->
regmap
,
true
);
regcache_mark_dirty
(
rt5640
->
regmap
);
if
(
gpio_is_valid
(
rt5640
->
pdata
.
ldo1_en
))
gpio_set_value_cansleep
(
rt5640
->
pdata
.
ldo1_en
,
0
);
return
0
;
}
static
int
rt5640_resume
(
struct
snd_soc_codec
*
codec
)
{
rt5640_set_bias_level
(
codec
,
SND_SOC_BIAS_STANDBY
);
struct
rt5640_priv
*
rt5640
=
snd_soc_codec_get_drvdata
(
codec
);
if
(
gpio_is_valid
(
rt5640
->
pdata
.
ldo1_en
))
{
gpio_set_value_cansleep
(
rt5640
->
pdata
.
ldo1_en
,
1
);
msleep
(
400
);
}
return
0
;
}
...
...
@@ -2080,6 +2089,14 @@ static const struct i2c_device_id rt5640_i2c_id[] = {
};
MODULE_DEVICE_TABLE
(
i2c
,
rt5640_i2c_id
);
#ifdef CONFIG_ACPI
static
struct
acpi_device_id
rt5640_acpi_match
[]
=
{
{
"INT33CA"
,
0
},
{
},
};
MODULE_DEVICE_TABLE
(
acpi
,
rt5640_acpi_match
);
#endif
static
int
rt5640_parse_dt
(
struct
rt5640_priv
*
rt5640
,
struct
device_node
*
np
)
{
rt5640
->
pdata
.
in1_diff
=
of_property_read_bool
(
np
,
...
...
@@ -2199,6 +2216,7 @@ static struct i2c_driver rt5640_i2c_driver = {
.
driver
=
{
.
name
=
"rt5640"
,
.
owner
=
THIS_MODULE
,
.
acpi_match_table
=
ACPI_PTR
(
rt5640_acpi_match
),
},
.
probe
=
rt5640_i2c_probe
,
.
remove
=
rt5640_i2c_remove
,
...
...
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