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
c496ccd5
Commit
c496ccd5
authored
Mar 01, 2011
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-2.6.38' into for-2.6.39
parents
e1412e63
04d28681
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
9 deletions
+47
-9
sound/soc/codecs/wm8994.c
sound/soc/codecs/wm8994.c
+42
-9
sound/soc/codecs/wm9081.c
sound/soc/codecs/wm9081.c
+5
-0
No files found.
sound/soc/codecs/wm8994.c
View file @
c496ccd5
...
@@ -109,6 +109,9 @@ struct wm8994_priv {
...
@@ -109,6 +109,9 @@ struct wm8994_priv {
unsigned
int
aif1clk_enable
:
1
;
unsigned
int
aif1clk_enable
:
1
;
unsigned
int
aif2clk_enable
:
1
;
unsigned
int
aif2clk_enable
:
1
;
unsigned
int
aif1clk_disable
:
1
;
unsigned
int
aif2clk_disable
:
1
;
};
};
static
int
wm8994_readable
(
struct
snd_soc_codec
*
codec
,
unsigned
int
reg
)
static
int
wm8994_readable
(
struct
snd_soc_codec
*
codec
,
unsigned
int
reg
)
...
@@ -1014,14 +1017,18 @@ static int late_enable_ev(struct snd_soc_dapm_widget *w,
...
@@ -1014,14 +1017,18 @@ static int late_enable_ev(struct snd_soc_dapm_widget *w,
switch
(
event
)
{
switch
(
event
)
{
case
SND_SOC_DAPM_PRE_PMU
:
case
SND_SOC_DAPM_PRE_PMU
:
if
(
wm8994
->
aif1clk_enable
)
if
(
wm8994
->
aif1clk_enable
)
{
snd_soc_update_bits
(
codec
,
WM8994_AIF1_CLOCKING_1
,
snd_soc_update_bits
(
codec
,
WM8994_AIF1_CLOCKING_1
,
WM8994_AIF1CLK_ENA_MASK
,
WM8994_AIF1CLK_ENA_MASK
,
WM8994_AIF1CLK_ENA
);
WM8994_AIF1CLK_ENA
);
if
(
wm8994
->
aif2clk_enable
)
wm8994
->
aif1clk_enable
=
0
;
}
if
(
wm8994
->
aif2clk_enable
)
{
snd_soc_update_bits
(
codec
,
WM8994_AIF2_CLOCKING_1
,
snd_soc_update_bits
(
codec
,
WM8994_AIF2_CLOCKING_1
,
WM8994_AIF2CLK_ENA_MASK
,
WM8994_AIF2CLK_ENA_MASK
,
WM8994_AIF2CLK_ENA
);
WM8994_AIF2CLK_ENA
);
wm8994
->
aif2clk_enable
=
0
;
}
break
;
break
;
}
}
...
@@ -1036,15 +1043,15 @@ static int late_disable_ev(struct snd_soc_dapm_widget *w,
...
@@ -1036,15 +1043,15 @@ static int late_disable_ev(struct snd_soc_dapm_widget *w,
switch
(
event
)
{
switch
(
event
)
{
case
SND_SOC_DAPM_POST_PMD
:
case
SND_SOC_DAPM_POST_PMD
:
if
(
wm8994
->
aif1clk_
en
able
)
{
if
(
wm8994
->
aif1clk_
dis
able
)
{
snd_soc_update_bits
(
codec
,
WM8994_AIF1_CLOCKING_1
,
snd_soc_update_bits
(
codec
,
WM8994_AIF1_CLOCKING_1
,
WM8994_AIF1CLK_ENA_MASK
,
0
);
WM8994_AIF1CLK_ENA_MASK
,
0
);
wm8994
->
aif1clk_
en
able
=
0
;
wm8994
->
aif1clk_
dis
able
=
0
;
}
}
if
(
wm8994
->
aif2clk_
en
able
)
{
if
(
wm8994
->
aif2clk_
dis
able
)
{
snd_soc_update_bits
(
codec
,
WM8994_AIF2_CLOCKING_1
,
snd_soc_update_bits
(
codec
,
WM8994_AIF2_CLOCKING_1
,
WM8994_AIF2CLK_ENA_MASK
,
0
);
WM8994_AIF2CLK_ENA_MASK
,
0
);
wm8994
->
aif2clk_
en
able
=
0
;
wm8994
->
aif2clk_
dis
able
=
0
;
}
}
break
;
break
;
}
}
...
@@ -1062,6 +1069,9 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w,
...
@@ -1062,6 +1069,9 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w,
case
SND_SOC_DAPM_PRE_PMU
:
case
SND_SOC_DAPM_PRE_PMU
:
wm8994
->
aif1clk_enable
=
1
;
wm8994
->
aif1clk_enable
=
1
;
break
;
break
;
case
SND_SOC_DAPM_POST_PMD
:
wm8994
->
aif1clk_disable
=
1
;
break
;
}
}
return
0
;
return
0
;
...
@@ -1077,11 +1087,21 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w,
...
@@ -1077,11 +1087,21 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w,
case
SND_SOC_DAPM_PRE_PMU
:
case
SND_SOC_DAPM_PRE_PMU
:
wm8994
->
aif2clk_enable
=
1
;
wm8994
->
aif2clk_enable
=
1
;
break
;
break
;
case
SND_SOC_DAPM_POST_PMD
:
wm8994
->
aif2clk_disable
=
1
;
break
;
}
}
return
0
;
return
0
;
}
}
static
int
adc_mux_ev
(
struct
snd_soc_dapm_widget
*
w
,
struct
snd_kcontrol
*
kcontrol
,
int
event
)
{
late_enable_ev
(
w
,
kcontrol
,
event
);
return
0
;
}
static
int
dac_ev
(
struct
snd_soc_dapm_widget
*
w
,
static
int
dac_ev
(
struct
snd_soc_dapm_widget
*
w
,
struct
snd_kcontrol
*
kcontrol
,
int
event
)
struct
snd_kcontrol
*
kcontrol
,
int
event
)
{
{
...
@@ -1402,6 +1422,18 @@ SND_SOC_DAPM_DAC("DAC1L", NULL, WM8994_POWER_MANAGEMENT_5, 1, 0),
...
@@ -1402,6 +1422,18 @@ SND_SOC_DAPM_DAC("DAC1L", NULL, WM8994_POWER_MANAGEMENT_5, 1, 0),
SND_SOC_DAPM_DAC
(
"DAC1R"
,
NULL
,
WM8994_POWER_MANAGEMENT_5
,
0
,
0
),
SND_SOC_DAPM_DAC
(
"DAC1R"
,
NULL
,
WM8994_POWER_MANAGEMENT_5
,
0
,
0
),
};
};
static
const
struct
snd_soc_dapm_widget
wm8994_adc_revd_widgets
[]
=
{
SND_SOC_DAPM_MUX_E
(
"ADCL Mux"
,
WM8994_POWER_MANAGEMENT_4
,
1
,
0
,
&
adcl_mux
,
adc_mux_ev
,
SND_SOC_DAPM_PRE_PMU
),
SND_SOC_DAPM_MUX_E
(
"ADCR Mux"
,
WM8994_POWER_MANAGEMENT_4
,
0
,
0
,
&
adcr_mux
,
adc_mux_ev
,
SND_SOC_DAPM_PRE_PMU
),
};
static
const
struct
snd_soc_dapm_widget
wm8994_adc_widgets
[]
=
{
SND_SOC_DAPM_MUX
(
"ADCL Mux"
,
WM8994_POWER_MANAGEMENT_4
,
1
,
0
,
&
adcl_mux
),
SND_SOC_DAPM_MUX
(
"ADCR Mux"
,
WM8994_POWER_MANAGEMENT_4
,
0
,
0
,
&
adcr_mux
),
};
static
const
struct
snd_soc_dapm_widget
wm8994_dapm_widgets
[]
=
{
static
const
struct
snd_soc_dapm_widget
wm8994_dapm_widgets
[]
=
{
SND_SOC_DAPM_INPUT
(
"DMIC1DAT"
),
SND_SOC_DAPM_INPUT
(
"DMIC1DAT"
),
SND_SOC_DAPM_INPUT
(
"DMIC2DAT"
),
SND_SOC_DAPM_INPUT
(
"DMIC2DAT"
),
...
@@ -1496,9 +1528,6 @@ SND_SOC_DAPM_ADC("DMIC1R", NULL, WM8994_POWER_MANAGEMENT_4, 2, 0),
...
@@ -1496,9 +1528,6 @@ SND_SOC_DAPM_ADC("DMIC1R", NULL, WM8994_POWER_MANAGEMENT_4, 2, 0),
SND_SOC_DAPM_ADC
(
"ADCL"
,
NULL
,
SND_SOC_NOPM
,
1
,
0
),
SND_SOC_DAPM_ADC
(
"ADCL"
,
NULL
,
SND_SOC_NOPM
,
1
,
0
),
SND_SOC_DAPM_ADC
(
"ADCR"
,
NULL
,
SND_SOC_NOPM
,
0
,
0
),
SND_SOC_DAPM_ADC
(
"ADCR"
,
NULL
,
SND_SOC_NOPM
,
0
,
0
),
SND_SOC_DAPM_MUX
(
"ADCL Mux"
,
WM8994_POWER_MANAGEMENT_4
,
1
,
0
,
&
adcl_mux
),
SND_SOC_DAPM_MUX
(
"ADCR Mux"
,
WM8994_POWER_MANAGEMENT_4
,
0
,
0
,
&
adcr_mux
),
SND_SOC_DAPM_MUX
(
"Left Headphone Mux"
,
SND_SOC_NOPM
,
0
,
0
,
&
hpl_mux
),
SND_SOC_DAPM_MUX
(
"Left Headphone Mux"
,
SND_SOC_NOPM
,
0
,
0
,
&
hpl_mux
),
SND_SOC_DAPM_MUX
(
"Right Headphone Mux"
,
SND_SOC_NOPM
,
0
,
0
,
&
hpr_mux
),
SND_SOC_DAPM_MUX
(
"Right Headphone Mux"
,
SND_SOC_NOPM
,
0
,
0
,
&
hpr_mux
),
...
@@ -3269,11 +3298,15 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
...
@@ -3269,11 +3298,15 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
if
(
wm8994
->
revision
<
4
)
{
if
(
wm8994
->
revision
<
4
)
{
snd_soc_dapm_new_controls
(
dapm
,
wm8994_lateclk_revd_widgets
,
snd_soc_dapm_new_controls
(
dapm
,
wm8994_lateclk_revd_widgets
,
ARRAY_SIZE
(
wm8994_lateclk_revd_widgets
));
ARRAY_SIZE
(
wm8994_lateclk_revd_widgets
));
snd_soc_dapm_new_controls
(
dapm
,
wm8994_adc_revd_widgets
,
ARRAY_SIZE
(
wm8994_adc_revd_widgets
));
snd_soc_dapm_new_controls
(
dapm
,
wm8994_dac_revd_widgets
,
snd_soc_dapm_new_controls
(
dapm
,
wm8994_dac_revd_widgets
,
ARRAY_SIZE
(
wm8994_dac_revd_widgets
));
ARRAY_SIZE
(
wm8994_dac_revd_widgets
));
}
else
{
}
else
{
snd_soc_dapm_new_controls
(
dapm
,
wm8994_lateclk_widgets
,
snd_soc_dapm_new_controls
(
dapm
,
wm8994_lateclk_widgets
,
ARRAY_SIZE
(
wm8994_lateclk_widgets
));
ARRAY_SIZE
(
wm8994_lateclk_widgets
));
snd_soc_dapm_new_controls
(
dapm
,
wm8994_adc_widgets
,
ARRAY_SIZE
(
wm8994_adc_widgets
));
snd_soc_dapm_new_controls
(
dapm
,
wm8994_dac_widgets
,
snd_soc_dapm_new_controls
(
dapm
,
wm8994_dac_widgets
,
ARRAY_SIZE
(
wm8994_dac_widgets
));
ARRAY_SIZE
(
wm8994_dac_widgets
));
}
}
...
...
sound/soc/codecs/wm9081.c
View file @
c496ccd5
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include <linux/moduleparam.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/pm.h>
#include <linux/pm.h>
#include <linux/i2c.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
...
@@ -1341,6 +1342,10 @@ static __devinit int wm9081_i2c_probe(struct i2c_client *i2c,
...
@@ -1341,6 +1342,10 @@ static __devinit int wm9081_i2c_probe(struct i2c_client *i2c,
wm9081
->
control_type
=
SND_SOC_I2C
;
wm9081
->
control_type
=
SND_SOC_I2C
;
wm9081
->
control_data
=
i2c
;
wm9081
->
control_data
=
i2c
;
if
(
dev_get_platdata
(
&
i2c
->
dev
))
memcpy
(
&
wm9081
->
retune
,
dev_get_platdata
(
&
i2c
->
dev
),
sizeof
(
wm9081
->
retune
));
ret
=
snd_soc_register_codec
(
&
i2c
->
dev
,
ret
=
snd_soc_register_codec
(
&
i2c
->
dev
,
&
soc_codec_dev_wm9081
,
&
wm9081_dai
,
1
);
&
soc_codec_dev_wm9081
,
&
wm9081_dai
,
1
);
if
(
ret
<
0
)
if
(
ret
<
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