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
be1a63da
Commit
be1a63da
authored
Jun 06, 2022
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge existing fixes from asoc/for-5.19 into new branch
parents
f2906aa8
07551992
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
20 deletions
+62
-20
sound/soc/codecs/cs35l36.c
sound/soc/codecs/cs35l36.c
+2
-1
sound/soc/codecs/cs42l51.c
sound/soc/codecs/cs42l51.c
+1
-1
sound/soc/codecs/cs42l52.c
sound/soc/codecs/cs42l52.c
+5
-3
sound/soc/codecs/cs42l56.c
sound/soc/codecs/cs42l56.c
+2
-2
sound/soc/codecs/cs53l30.c
sound/soc/codecs/cs53l30.c
+8
-8
sound/soc/codecs/nau8822.c
sound/soc/codecs/nau8822.c
+4
-0
sound/soc/codecs/nau8822.h
sound/soc/codecs/nau8822.h
+3
-0
sound/soc/intel/boards/sof_cirrus_common.c
sound/soc/intel/boards/sof_cirrus_common.c
+36
-4
sound/soc/qcom/lpass-platform.c
sound/soc/qcom/lpass-platform.c
+1
-1
No files found.
sound/soc/codecs/cs35l36.c
View file @
be1a63da
...
@@ -444,7 +444,8 @@ static bool cs35l36_volatile_reg(struct device *dev, unsigned int reg)
...
@@ -444,7 +444,8 @@ static bool cs35l36_volatile_reg(struct device *dev, unsigned int reg)
}
}
}
}
static
DECLARE_TLV_DB_SCALE
(
dig_vol_tlv
,
-
10200
,
25
,
0
);
static
const
DECLARE_TLV_DB_RANGE
(
dig_vol_tlv
,
0
,
912
,
TLV_DB_MINMAX_ITEM
(
-
10200
,
1200
));
static
DECLARE_TLV_DB_SCALE
(
amp_gain_tlv
,
0
,
1
,
1
);
static
DECLARE_TLV_DB_SCALE
(
amp_gain_tlv
,
0
,
1
,
1
);
static
const
char
*
const
cs35l36_pcm_sftramp_text
[]
=
{
static
const
char
*
const
cs35l36_pcm_sftramp_text
[]
=
{
...
...
sound/soc/codecs/cs42l51.c
View file @
be1a63da
...
@@ -143,7 +143,7 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
...
@@ -143,7 +143,7 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
0
,
0xA0
,
96
,
adc_att_tlv
),
0
,
0xA0
,
96
,
adc_att_tlv
),
SOC_DOUBLE_R_SX_TLV
(
"PGA Volume"
,
SOC_DOUBLE_R_SX_TLV
(
"PGA Volume"
,
CS42L51_ALC_PGA_CTL
,
CS42L51_ALC_PGB_CTL
,
CS42L51_ALC_PGA_CTL
,
CS42L51_ALC_PGB_CTL
,
0
,
0x1
A
,
30
,
pga_tlv
),
0
,
0x1
9
,
30
,
pga_tlv
),
SOC_SINGLE
(
"Playback Deemphasis Switch"
,
CS42L51_DAC_CTL
,
3
,
1
,
0
),
SOC_SINGLE
(
"Playback Deemphasis Switch"
,
CS42L51_DAC_CTL
,
3
,
1
,
0
),
SOC_SINGLE
(
"Auto-Mute Switch"
,
CS42L51_DAC_CTL
,
2
,
1
,
0
),
SOC_SINGLE
(
"Auto-Mute Switch"
,
CS42L51_DAC_CTL
,
2
,
1
,
0
),
SOC_SINGLE
(
"Soft Ramp Switch"
,
CS42L51_DAC_CTL
,
1
,
1
,
0
),
SOC_SINGLE
(
"Soft Ramp Switch"
,
CS42L51_DAC_CTL
,
1
,
1
,
0
),
...
...
sound/soc/codecs/cs42l52.c
View file @
be1a63da
...
@@ -137,7 +137,9 @@ static DECLARE_TLV_DB_SCALE(mic_tlv, 1600, 100, 0);
...
@@ -137,7 +137,9 @@ static DECLARE_TLV_DB_SCALE(mic_tlv, 1600, 100, 0);
static
DECLARE_TLV_DB_SCALE
(
pga_tlv
,
-
600
,
50
,
0
);
static
DECLARE_TLV_DB_SCALE
(
pga_tlv
,
-
600
,
50
,
0
);
static
DECLARE_TLV_DB_SCALE
(
mix_tlv
,
-
50
,
50
,
0
);
static
DECLARE_TLV_DB_SCALE
(
pass_tlv
,
-
6000
,
50
,
0
);
static
DECLARE_TLV_DB_SCALE
(
mix_tlv
,
-
5150
,
50
,
0
);
static
DECLARE_TLV_DB_SCALE
(
beep_tlv
,
-
56
,
200
,
0
);
static
DECLARE_TLV_DB_SCALE
(
beep_tlv
,
-
56
,
200
,
0
);
...
@@ -351,7 +353,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
...
@@ -351,7 +353,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
CS42L52_SPKB_VOL
,
0
,
0x40
,
0xC0
,
hl_tlv
),
CS42L52_SPKB_VOL
,
0
,
0x40
,
0xC0
,
hl_tlv
),
SOC_DOUBLE_R_SX_TLV
(
"Bypass Volume"
,
CS42L52_PASSTHRUA_VOL
,
SOC_DOUBLE_R_SX_TLV
(
"Bypass Volume"
,
CS42L52_PASSTHRUA_VOL
,
CS42L52_PASSTHRUB_VOL
,
0
,
0x88
,
0x90
,
p
ga
_tlv
),
CS42L52_PASSTHRUB_VOL
,
0
,
0x88
,
0x90
,
p
ass
_tlv
),
SOC_DOUBLE
(
"Bypass Mute"
,
CS42L52_MISC_CTL
,
4
,
5
,
1
,
0
),
SOC_DOUBLE
(
"Bypass Mute"
,
CS42L52_MISC_CTL
,
4
,
5
,
1
,
0
),
...
@@ -364,7 +366,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
...
@@ -364,7 +366,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
CS42L52_ADCB_VOL
,
0
,
0xA0
,
0x78
,
ipd_tlv
),
CS42L52_ADCB_VOL
,
0
,
0xA0
,
0x78
,
ipd_tlv
),
SOC_DOUBLE_R_SX_TLV
(
"ADC Mixer Volume"
,
SOC_DOUBLE_R_SX_TLV
(
"ADC Mixer Volume"
,
CS42L52_ADCA_MIXER_VOL
,
CS42L52_ADCB_MIXER_VOL
,
CS42L52_ADCA_MIXER_VOL
,
CS42L52_ADCB_MIXER_VOL
,
0
,
0x19
,
0x7F
,
ipd
_tlv
),
0
,
0x19
,
0x7F
,
mix
_tlv
),
SOC_DOUBLE
(
"ADC Switch"
,
CS42L52_ADC_MISC_CTL
,
0
,
1
,
1
,
0
),
SOC_DOUBLE
(
"ADC Switch"
,
CS42L52_ADC_MISC_CTL
,
0
,
1
,
1
,
0
),
...
...
sound/soc/codecs/cs42l56.c
View file @
be1a63da
...
@@ -391,9 +391,9 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = {
...
@@ -391,9 +391,9 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = {
SOC_DOUBLE
(
"ADC Boost Switch"
,
CS42L56_GAIN_BIAS_CTL
,
3
,
2
,
1
,
1
),
SOC_DOUBLE
(
"ADC Boost Switch"
,
CS42L56_GAIN_BIAS_CTL
,
3
,
2
,
1
,
1
),
SOC_DOUBLE_R_SX_TLV
(
"Headphone Volume"
,
CS42L56_HPA_VOLUME
,
SOC_DOUBLE_R_SX_TLV
(
"Headphone Volume"
,
CS42L56_HPA_VOLUME
,
CS42L56_HPB_VOLUME
,
0
,
0x
8
4
,
0x48
,
hl_tlv
),
CS42L56_HPB_VOLUME
,
0
,
0x
4
4
,
0x48
,
hl_tlv
),
SOC_DOUBLE_R_SX_TLV
(
"LineOut Volume"
,
CS42L56_LOA_VOLUME
,
SOC_DOUBLE_R_SX_TLV
(
"LineOut Volume"
,
CS42L56_LOA_VOLUME
,
CS42L56_LOB_VOLUME
,
0
,
0x
8
4
,
0x48
,
hl_tlv
),
CS42L56_LOB_VOLUME
,
0
,
0x
4
4
,
0x48
,
hl_tlv
),
SOC_SINGLE_TLV
(
"Bass Shelving Volume"
,
CS42L56_TONE_CTL
,
SOC_SINGLE_TLV
(
"Bass Shelving Volume"
,
CS42L56_TONE_CTL
,
0
,
0x00
,
1
,
tone_tlv
),
0
,
0x00
,
1
,
tone_tlv
),
...
...
sound/soc/codecs/cs53l30.c
View file @
be1a63da
...
@@ -348,22 +348,22 @@ static const struct snd_kcontrol_new cs53l30_snd_controls[] = {
...
@@ -348,22 +348,22 @@ static const struct snd_kcontrol_new cs53l30_snd_controls[] = {
SOC_ENUM
(
"ADC2 NG Delay"
,
adc2_ng_delay_enum
),
SOC_ENUM
(
"ADC2 NG Delay"
,
adc2_ng_delay_enum
),
SOC_SINGLE_SX_TLV
(
"ADC1A PGA Volume"
,
SOC_SINGLE_SX_TLV
(
"ADC1A PGA Volume"
,
CS53L30_ADC1A_AFE_CTL
,
0
,
0x34
,
0x
18
,
pga_tlv
),
CS53L30_ADC1A_AFE_CTL
,
0
,
0x34
,
0x
24
,
pga_tlv
),
SOC_SINGLE_SX_TLV
(
"ADC1B PGA Volume"
,
SOC_SINGLE_SX_TLV
(
"ADC1B PGA Volume"
,
CS53L30_ADC1B_AFE_CTL
,
0
,
0x34
,
0x
18
,
pga_tlv
),
CS53L30_ADC1B_AFE_CTL
,
0
,
0x34
,
0x
24
,
pga_tlv
),
SOC_SINGLE_SX_TLV
(
"ADC2A PGA Volume"
,
SOC_SINGLE_SX_TLV
(
"ADC2A PGA Volume"
,
CS53L30_ADC2A_AFE_CTL
,
0
,
0x34
,
0x
18
,
pga_tlv
),
CS53L30_ADC2A_AFE_CTL
,
0
,
0x34
,
0x
24
,
pga_tlv
),
SOC_SINGLE_SX_TLV
(
"ADC2B PGA Volume"
,
SOC_SINGLE_SX_TLV
(
"ADC2B PGA Volume"
,
CS53L30_ADC2B_AFE_CTL
,
0
,
0x34
,
0x
18
,
pga_tlv
),
CS53L30_ADC2B_AFE_CTL
,
0
,
0x34
,
0x
24
,
pga_tlv
),
SOC_SINGLE_SX_TLV
(
"ADC1A Digital Volume"
,
SOC_SINGLE_SX_TLV
(
"ADC1A Digital Volume"
,
CS53L30_ADC1A_DIG_VOL
,
0
,
0xA0
,
0x
0
C
,
dig_tlv
),
CS53L30_ADC1A_DIG_VOL
,
0
,
0xA0
,
0x
6
C
,
dig_tlv
),
SOC_SINGLE_SX_TLV
(
"ADC1B Digital Volume"
,
SOC_SINGLE_SX_TLV
(
"ADC1B Digital Volume"
,
CS53L30_ADC1B_DIG_VOL
,
0
,
0xA0
,
0x
0
C
,
dig_tlv
),
CS53L30_ADC1B_DIG_VOL
,
0
,
0xA0
,
0x
6
C
,
dig_tlv
),
SOC_SINGLE_SX_TLV
(
"ADC2A Digital Volume"
,
SOC_SINGLE_SX_TLV
(
"ADC2A Digital Volume"
,
CS53L30_ADC2A_DIG_VOL
,
0
,
0xA0
,
0x
0
C
,
dig_tlv
),
CS53L30_ADC2A_DIG_VOL
,
0
,
0xA0
,
0x
6
C
,
dig_tlv
),
SOC_SINGLE_SX_TLV
(
"ADC2B Digital Volume"
,
SOC_SINGLE_SX_TLV
(
"ADC2B Digital Volume"
,
CS53L30_ADC2B_DIG_VOL
,
0
,
0xA0
,
0x
0
C
,
dig_tlv
),
CS53L30_ADC2B_DIG_VOL
,
0
,
0xA0
,
0x
6
C
,
dig_tlv
),
};
};
static
const
struct
snd_soc_dapm_widget
cs53l30_dapm_widgets
[]
=
{
static
const
struct
snd_soc_dapm_widget
cs53l30_dapm_widgets
[]
=
{
...
...
sound/soc/codecs/nau8822.c
View file @
be1a63da
...
@@ -740,6 +740,8 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
...
@@ -740,6 +740,8 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
pll_param
->
pll_int
,
pll_param
->
pll_frac
,
pll_param
->
pll_int
,
pll_param
->
pll_frac
,
pll_param
->
mclk_scaler
,
pll_param
->
pre_factor
);
pll_param
->
mclk_scaler
,
pll_param
->
pre_factor
);
snd_soc_component_update_bits
(
component
,
NAU8822_REG_POWER_MANAGEMENT_1
,
NAU8822_PLL_EN_MASK
,
NAU8822_PLL_OFF
);
snd_soc_component_update_bits
(
component
,
snd_soc_component_update_bits
(
component
,
NAU8822_REG_PLL_N
,
NAU8822_PLLMCLK_DIV2
|
NAU8822_PLLN_MASK
,
NAU8822_REG_PLL_N
,
NAU8822_PLLMCLK_DIV2
|
NAU8822_PLLN_MASK
,
(
pll_param
->
pre_factor
?
NAU8822_PLLMCLK_DIV2
:
0
)
|
(
pll_param
->
pre_factor
?
NAU8822_PLLMCLK_DIV2
:
0
)
|
...
@@ -757,6 +759,8 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
...
@@ -757,6 +759,8 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
pll_param
->
mclk_scaler
<<
NAU8822_MCLKSEL_SFT
);
pll_param
->
mclk_scaler
<<
NAU8822_MCLKSEL_SFT
);
snd_soc_component_update_bits
(
component
,
snd_soc_component_update_bits
(
component
,
NAU8822_REG_CLOCKING
,
NAU8822_CLKM_MASK
,
NAU8822_CLKM_PLL
);
NAU8822_REG_CLOCKING
,
NAU8822_CLKM_MASK
,
NAU8822_CLKM_PLL
);
snd_soc_component_update_bits
(
component
,
NAU8822_REG_POWER_MANAGEMENT_1
,
NAU8822_PLL_EN_MASK
,
NAU8822_PLL_ON
);
return
0
;
return
0
;
}
}
...
...
sound/soc/codecs/nau8822.h
View file @
be1a63da
...
@@ -90,6 +90,9 @@
...
@@ -90,6 +90,9 @@
#define NAU8822_REFIMP_3K 0x3
#define NAU8822_REFIMP_3K 0x3
#define NAU8822_IOBUF_EN (0x1 << 2)
#define NAU8822_IOBUF_EN (0x1 << 2)
#define NAU8822_ABIAS_EN (0x1 << 3)
#define NAU8822_ABIAS_EN (0x1 << 3)
#define NAU8822_PLL_EN_MASK (0x1 << 5)
#define NAU8822_PLL_ON (0x1 << 5)
#define NAU8822_PLL_OFF (0x0 << 5)
/* NAU8822_REG_AUDIO_INTERFACE (0x4) */
/* NAU8822_REG_AUDIO_INTERFACE (0x4) */
#define NAU8822_AIFMT_MASK (0x3 << 3)
#define NAU8822_AIFMT_MASK (0x3 << 3)
...
...
sound/soc/intel/boards/sof_cirrus_common.c
View file @
be1a63da
...
@@ -54,22 +54,29 @@ static struct snd_soc_dai_link_component cs35l41_components[] = {
...
@@ -54,22 +54,29 @@ static struct snd_soc_dai_link_component cs35l41_components[] = {
},
},
};
};
/*
* Mapping between ACPI instance id and speaker position.
*
* Four speakers:
* 0: Tweeter left, 1: Woofer left
* 2: Tweeter right, 3: Woofer right
*/
static
struct
snd_soc_codec_conf
cs35l41_codec_conf
[]
=
{
static
struct
snd_soc_codec_conf
cs35l41_codec_conf
[]
=
{
{
{
.
dlc
=
COMP_CODEC_CONF
(
CS35L41_DEV0_NAME
),
.
dlc
=
COMP_CODEC_CONF
(
CS35L41_DEV0_NAME
),
.
name_prefix
=
"
W
L"
,
.
name_prefix
=
"
T
L"
,
},
},
{
{
.
dlc
=
COMP_CODEC_CONF
(
CS35L41_DEV1_NAME
),
.
dlc
=
COMP_CODEC_CONF
(
CS35L41_DEV1_NAME
),
.
name_prefix
=
"W
R
"
,
.
name_prefix
=
"W
L
"
,
},
},
{
{
.
dlc
=
COMP_CODEC_CONF
(
CS35L41_DEV2_NAME
),
.
dlc
=
COMP_CODEC_CONF
(
CS35L41_DEV2_NAME
),
.
name_prefix
=
"T
L
"
,
.
name_prefix
=
"T
R
"
,
},
},
{
{
.
dlc
=
COMP_CODEC_CONF
(
CS35L41_DEV3_NAME
),
.
dlc
=
COMP_CODEC_CONF
(
CS35L41_DEV3_NAME
),
.
name_prefix
=
"
T
R"
,
.
name_prefix
=
"
W
R"
,
},
},
};
};
...
@@ -101,6 +108,21 @@ static int cs35l41_init(struct snd_soc_pcm_runtime *rtd)
...
@@ -101,6 +108,21 @@ static int cs35l41_init(struct snd_soc_pcm_runtime *rtd)
return
ret
;
return
ret
;
}
}
/*
* Channel map:
*
* TL/WL: ASPRX1 on slot 0, ASPRX2 on slot 1 (default)
* TR/WR: ASPRX1 on slot 1, ASPRX2 on slot 0
*/
static
const
struct
{
unsigned
int
rx
[
2
];
}
cs35l41_channel_map
[]
=
{
{.
rx
=
{
0
,
1
}},
/* TL */
{.
rx
=
{
0
,
1
}},
/* WL */
{.
rx
=
{
1
,
0
}},
/* TR */
{.
rx
=
{
1
,
0
}},
/* WR */
};
static
int
cs35l41_hw_params
(
struct
snd_pcm_substream
*
substream
,
static
int
cs35l41_hw_params
(
struct
snd_pcm_substream
*
substream
,
struct
snd_pcm_hw_params
*
params
)
struct
snd_pcm_hw_params
*
params
)
{
{
...
@@ -134,6 +156,16 @@ static int cs35l41_hw_params(struct snd_pcm_substream *substream,
...
@@ -134,6 +156,16 @@ static int cs35l41_hw_params(struct snd_pcm_substream *substream,
ret
);
ret
);
return
ret
;
return
ret
;
}
}
/* setup channel map */
ret
=
snd_soc_dai_set_channel_map
(
codec_dai
,
0
,
NULL
,
ARRAY_SIZE
(
cs35l41_channel_map
[
i
].
rx
),
(
unsigned
int
*
)
cs35l41_channel_map
[
i
].
rx
);
if
(
ret
<
0
)
{
dev_err
(
codec_dai
->
dev
,
"fail to set channel map, ret %d
\n
"
,
ret
);
return
ret
;
}
}
}
return
0
;
return
0
;
...
...
sound/soc/qcom/lpass-platform.c
View file @
be1a63da
...
@@ -898,7 +898,7 @@ static int lpass_platform_cdc_dma_mmap(struct snd_pcm_substream *substream,
...
@@ -898,7 +898,7 @@ static int lpass_platform_cdc_dma_mmap(struct snd_pcm_substream *substream,
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
unsigned
long
size
,
offset
;
unsigned
long
size
,
offset
;
vma
->
vm_page_prot
=
pgprot_
noncached
(
vma
->
vm_page_prot
);
vma
->
vm_page_prot
=
pgprot_
writecombine
(
vma
->
vm_page_prot
);
size
=
vma
->
vm_end
-
vma
->
vm_start
;
size
=
vma
->
vm_end
-
vma
->
vm_start
;
offset
=
vma
->
vm_pgoff
<<
PAGE_SHIFT
;
offset
=
vma
->
vm_pgoff
<<
PAGE_SHIFT
;
return
io_remap_pfn_range
(
vma
,
vma
->
vm_start
,
return
io_remap_pfn_range
(
vma
,
vma
->
vm_start
,
...
...
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