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
8b974c12
Commit
8b974c12
authored
Dec 31, 2021
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
ASoC: Merge fixes
So we can send to Linus.
parents
cc5c9788
30e693ee
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
157 additions
and
77 deletions
+157
-77
sound/soc/codecs/rt5682.c
sound/soc/codecs/rt5682.c
+4
-0
sound/soc/codecs/tas2770.c
sound/soc/codecs/tas2770.c
+2
-2
sound/soc/codecs/wcd934x.c
sound/soc/codecs/wcd934x.c
+93
-33
sound/soc/codecs/wsa881x.c
sound/soc/codecs/wsa881x.c
+12
-4
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
+1
-1
sound/soc/meson/aiu-encoder-i2s.c
sound/soc/meson/aiu-encoder-i2s.c
+0
-33
sound/soc/meson/aiu-fifo-i2s.c
sound/soc/meson/aiu-fifo-i2s.c
+19
-0
sound/soc/meson/aiu-fifo.c
sound/soc/meson/aiu-fifo.c
+6
-0
sound/soc/qcom/qdsp6/q6routing.c
sound/soc/qcom/qdsp6/q6routing.c
+5
-3
sound/soc/sof/intel/pci-tgl.c
sound/soc/sof/intel/pci-tgl.c
+4
-0
sound/soc/tegra/tegra_asoc_machine.c
sound/soc/tegra/tegra_asoc_machine.c
+10
-1
sound/soc/tegra/tegra_asoc_machine.h
sound/soc/tegra/tegra_asoc_machine.h
+1
-0
No files found.
sound/soc/codecs/rt5682.c
View file @
8b974c12
...
@@ -929,6 +929,8 @@ int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert)
...
@@ -929,6 +929,8 @@ int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert)
unsigned
int
val
,
count
;
unsigned
int
val
,
count
;
if
(
jack_insert
)
{
if
(
jack_insert
)
{
snd_soc_dapm_mutex_lock
(
dapm
);
snd_soc_component_update_bits
(
component
,
RT5682_PWR_ANLG_1
,
snd_soc_component_update_bits
(
component
,
RT5682_PWR_ANLG_1
,
RT5682_PWR_VREF2
|
RT5682_PWR_MB
,
RT5682_PWR_VREF2
|
RT5682_PWR_MB
,
RT5682_PWR_VREF2
|
RT5682_PWR_MB
);
RT5682_PWR_VREF2
|
RT5682_PWR_MB
);
...
@@ -979,6 +981,8 @@ int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert)
...
@@ -979,6 +981,8 @@ int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert)
snd_soc_component_update_bits
(
component
,
RT5682_MICBIAS_2
,
snd_soc_component_update_bits
(
component
,
RT5682_MICBIAS_2
,
RT5682_PWR_CLK25M_MASK
|
RT5682_PWR_CLK1M_MASK
,
RT5682_PWR_CLK25M_MASK
|
RT5682_PWR_CLK1M_MASK
,
RT5682_PWR_CLK25M_PU
|
RT5682_PWR_CLK1M_PU
);
RT5682_PWR_CLK25M_PU
|
RT5682_PWR_CLK1M_PU
);
snd_soc_dapm_mutex_unlock
(
dapm
);
}
else
{
}
else
{
rt5682_enable_push_button_irq
(
component
,
false
);
rt5682_enable_push_button_irq
(
component
,
false
);
snd_soc_component_update_bits
(
component
,
RT5682_CBJ_CTRL_1
,
snd_soc_component_update_bits
(
component
,
RT5682_CBJ_CTRL_1
,
...
...
sound/soc/codecs/tas2770.c
View file @
8b974c12
...
@@ -291,11 +291,11 @@ static int tas2770_set_samplerate(struct tas2770_priv *tas2770, int samplerate)
...
@@ -291,11 +291,11 @@ static int tas2770_set_samplerate(struct tas2770_priv *tas2770, int samplerate)
ramp_rate_val
=
TAS2770_TDM_CFG_REG0_SMP_44_1KHZ
|
ramp_rate_val
=
TAS2770_TDM_CFG_REG0_SMP_44_1KHZ
|
TAS2770_TDM_CFG_REG0_31_88_2_96KHZ
;
TAS2770_TDM_CFG_REG0_31_88_2_96KHZ
;
break
;
break
;
case
19200
:
case
19200
0
:
ramp_rate_val
=
TAS2770_TDM_CFG_REG0_SMP_48KHZ
|
ramp_rate_val
=
TAS2770_TDM_CFG_REG0_SMP_48KHZ
|
TAS2770_TDM_CFG_REG0_31_176_4_192KHZ
;
TAS2770_TDM_CFG_REG0_31_176_4_192KHZ
;
break
;
break
;
case
17640
:
case
17640
0
:
ramp_rate_val
=
TAS2770_TDM_CFG_REG0_SMP_44_1KHZ
|
ramp_rate_val
=
TAS2770_TDM_CFG_REG0_SMP_44_1KHZ
|
TAS2770_TDM_CFG_REG0_31_176_4_192KHZ
;
TAS2770_TDM_CFG_REG0_31_176_4_192KHZ
;
break
;
break
;
...
...
sound/soc/codecs/wcd934x.c
View file @
8b974c12
...
@@ -3256,6 +3256,9 @@ static int wcd934x_compander_set(struct snd_kcontrol *kc,
...
@@ -3256,6 +3256,9 @@ static int wcd934x_compander_set(struct snd_kcontrol *kc,
int
value
=
ucontrol
->
value
.
integer
.
value
[
0
];
int
value
=
ucontrol
->
value
.
integer
.
value
[
0
];
int
sel
;
int
sel
;
if
(
wcd
->
comp_enabled
[
comp
]
==
value
)
return
0
;
wcd
->
comp_enabled
[
comp
]
=
value
;
wcd
->
comp_enabled
[
comp
]
=
value
;
sel
=
value
?
WCD934X_HPH_GAIN_SRC_SEL_COMPANDER
:
sel
=
value
?
WCD934X_HPH_GAIN_SRC_SEL_COMPANDER
:
WCD934X_HPH_GAIN_SRC_SEL_REGISTER
;
WCD934X_HPH_GAIN_SRC_SEL_REGISTER
;
...
@@ -3279,10 +3282,10 @@ static int wcd934x_compander_set(struct snd_kcontrol *kc,
...
@@ -3279,10 +3282,10 @@ static int wcd934x_compander_set(struct snd_kcontrol *kc,
case
COMPANDER_8
:
case
COMPANDER_8
:
break
;
break
;
default:
default:
break
;
return
0
;
}
}
return
0
;
return
1
;
}
}
static
int
wcd934x_rx_hph_mode_get
(
struct
snd_kcontrol
*
kc
,
static
int
wcd934x_rx_hph_mode_get
(
struct
snd_kcontrol
*
kc
,
...
@@ -3326,6 +3329,31 @@ static int slim_rx_mux_get(struct snd_kcontrol *kc,
...
@@ -3326,6 +3329,31 @@ static int slim_rx_mux_get(struct snd_kcontrol *kc,
return
0
;
return
0
;
}
}
static
int
slim_rx_mux_to_dai_id
(
int
mux
)
{
int
aif_id
;
switch
(
mux
)
{
case
1
:
aif_id
=
AIF1_PB
;
break
;
case
2
:
aif_id
=
AIF2_PB
;
break
;
case
3
:
aif_id
=
AIF3_PB
;
break
;
case
4
:
aif_id
=
AIF4_PB
;
break
;
default:
aif_id
=
-
1
;
break
;
}
return
aif_id
;
}
static
int
slim_rx_mux_put
(
struct
snd_kcontrol
*
kc
,
static
int
slim_rx_mux_put
(
struct
snd_kcontrol
*
kc
,
struct
snd_ctl_elem_value
*
ucontrol
)
struct
snd_ctl_elem_value
*
ucontrol
)
{
{
...
@@ -3333,43 +3361,59 @@ static int slim_rx_mux_put(struct snd_kcontrol *kc,
...
@@ -3333,43 +3361,59 @@ static int slim_rx_mux_put(struct snd_kcontrol *kc,
struct
wcd934x_codec
*
wcd
=
dev_get_drvdata
(
w
->
dapm
->
dev
);
struct
wcd934x_codec
*
wcd
=
dev_get_drvdata
(
w
->
dapm
->
dev
);
struct
soc_enum
*
e
=
(
struct
soc_enum
*
)
kc
->
private_value
;
struct
soc_enum
*
e
=
(
struct
soc_enum
*
)
kc
->
private_value
;
struct
snd_soc_dapm_update
*
update
=
NULL
;
struct
snd_soc_dapm_update
*
update
=
NULL
;
struct
wcd934x_slim_ch
*
ch
,
*
c
;
u32
port_id
=
w
->
shift
;
u32
port_id
=
w
->
shift
;
bool
found
=
false
;
int
mux_idx
;
int
prev_mux_idx
=
wcd
->
rx_port_value
[
port_id
];
int
aif_id
;
if
(
wcd
->
rx_port_value
[
port_id
]
==
ucontrol
->
value
.
enumerated
.
item
[
0
])
mux_idx
=
ucontrol
->
value
.
enumerated
.
item
[
0
];
return
0
;
wcd
->
rx_port_value
[
port_id
]
=
ucontrol
->
value
.
enumerated
.
item
[
0
];
if
(
mux_idx
==
prev_mux_idx
)
return
0
;
switch
(
wcd
->
rx_port_value
[
port_id
]
)
{
switch
(
mux_idx
)
{
case
0
:
case
0
:
list_del_init
(
&
wcd
->
rx_chs
[
port_id
].
list
);
aif_id
=
slim_rx_mux_to_dai_id
(
prev_mux_idx
);
break
;
if
(
aif_id
<
0
)
case
1
:
return
0
;
list_add_tail
(
&
wcd
->
rx_chs
[
port_id
].
list
,
&
wcd
->
dai
[
AIF1_PB
].
slim_ch_list
);
list_for_each_entry_safe
(
ch
,
c
,
&
wcd
->
dai
[
aif_id
].
slim_ch_list
,
list
)
{
break
;
if
(
ch
->
port
==
port_id
+
WCD934X_RX_START
)
{
case
2
:
found
=
true
;
list_add_tail
(
&
wcd
->
rx_chs
[
port_id
].
list
,
list_del_init
(
&
ch
->
list
);
&
wcd
->
dai
[
AIF2_PB
].
slim_ch_list
);
break
;
break
;
}
case
3
:
}
list_add_tail
(
&
wcd
->
rx_chs
[
port_id
].
list
,
if
(
!
found
)
&
wcd
->
dai
[
AIF3_PB
].
slim_ch_list
);
return
0
;
break
;
break
;
case
4
:
case
1
...
4
:
list_add_tail
(
&
wcd
->
rx_chs
[
port_id
].
list
,
aif_id
=
slim_rx_mux_to_dai_id
(
mux_idx
);
&
wcd
->
dai
[
AIF4_PB
].
slim_ch_list
);
if
(
aif_id
<
0
)
return
0
;
if
(
list_empty
(
&
wcd
->
rx_chs
[
port_id
].
list
))
{
list_add_tail
(
&
wcd
->
rx_chs
[
port_id
].
list
,
&
wcd
->
dai
[
aif_id
].
slim_ch_list
);
}
else
{
dev_err
(
wcd
->
dev
,
"SLIM_RX%d PORT is busy
\n
"
,
port_id
);
return
0
;
}
break
;
break
;
default:
default:
dev_err
(
wcd
->
dev
,
"Unknown AIF %d
\n
"
,
dev_err
(
wcd
->
dev
,
"Unknown AIF %d
\n
"
,
mux_idx
);
wcd
->
rx_port_value
[
port_id
]);
goto
err
;
goto
err
;
}
}
wcd
->
rx_port_value
[
port_id
]
=
mux_idx
;
snd_soc_dapm_mux_update_power
(
w
->
dapm
,
kc
,
wcd
->
rx_port_value
[
port_id
],
snd_soc_dapm_mux_update_power
(
w
->
dapm
,
kc
,
wcd
->
rx_port_value
[
port_id
],
e
,
update
);
e
,
update
);
return
0
;
return
1
;
err:
err:
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -3813,6 +3857,7 @@ static int slim_tx_mixer_put(struct snd_kcontrol *kc,
...
@@ -3813,6 +3857,7 @@ static int slim_tx_mixer_put(struct snd_kcontrol *kc,
struct
soc_mixer_control
*
mixer
=
struct
soc_mixer_control
*
mixer
=
(
struct
soc_mixer_control
*
)
kc
->
private_value
;
(
struct
soc_mixer_control
*
)
kc
->
private_value
;
int
enable
=
ucontrol
->
value
.
integer
.
value
[
0
];
int
enable
=
ucontrol
->
value
.
integer
.
value
[
0
];
struct
wcd934x_slim_ch
*
ch
,
*
c
;
int
dai_id
=
widget
->
shift
;
int
dai_id
=
widget
->
shift
;
int
port_id
=
mixer
->
shift
;
int
port_id
=
mixer
->
shift
;
...
@@ -3820,17 +3865,32 @@ static int slim_tx_mixer_put(struct snd_kcontrol *kc,
...
@@ -3820,17 +3865,32 @@ static int slim_tx_mixer_put(struct snd_kcontrol *kc,
if
(
enable
==
wcd
->
tx_port_value
[
port_id
])
if
(
enable
==
wcd
->
tx_port_value
[
port_id
])
return
0
;
return
0
;
wcd
->
tx_port_value
[
port_id
]
=
enable
;
if
(
enable
)
{
if
(
list_empty
(
&
wcd
->
tx_chs
[
port_id
].
list
))
{
if
(
enable
)
list_add_tail
(
&
wcd
->
tx_chs
[
port_id
].
list
,
list_add_tail
(
&
wcd
->
tx_chs
[
port_id
].
list
,
&
wcd
->
dai
[
dai_id
].
slim_ch_list
);
&
wcd
->
dai
[
dai_id
].
slim_ch_list
);
}
else
{
else
dev_err
(
wcd
->
dev
,
"SLIM_TX%d PORT is busy
\n
"
,
port_id
);
list_del_init
(
&
wcd
->
tx_chs
[
port_id
].
list
);
return
0
;
}
}
else
{
bool
found
=
false
;
list_for_each_entry_safe
(
ch
,
c
,
&
wcd
->
dai
[
dai_id
].
slim_ch_list
,
list
)
{
if
(
ch
->
port
==
port_id
)
{
found
=
true
;
list_del_init
(
&
wcd
->
tx_chs
[
port_id
].
list
);
break
;
}
}
if
(
!
found
)
return
0
;
}
wcd
->
tx_port_value
[
port_id
]
=
enable
;
snd_soc_dapm_mixer_update_power
(
widget
->
dapm
,
kc
,
enable
,
update
);
snd_soc_dapm_mixer_update_power
(
widget
->
dapm
,
kc
,
enable
,
update
);
return
0
;
return
1
;
}
}
static
const
struct
snd_kcontrol_new
aif1_slim_cap_mixer
[]
=
{
static
const
struct
snd_kcontrol_new
aif1_slim_cap_mixer
[]
=
{
...
...
sound/soc/codecs/wsa881x.c
View file @
8b974c12
...
@@ -772,7 +772,8 @@ static int wsa881x_put_pa_gain(struct snd_kcontrol *kc,
...
@@ -772,7 +772,8 @@ static int wsa881x_put_pa_gain(struct snd_kcontrol *kc,
usleep_range
(
1000
,
1010
);
usleep_range
(
1000
,
1010
);
}
}
return
0
;
return
1
;
}
}
static
int
wsa881x_get_port
(
struct
snd_kcontrol
*
kcontrol
,
static
int
wsa881x_get_port
(
struct
snd_kcontrol
*
kcontrol
,
...
@@ -816,15 +817,22 @@ static int wsa881x_set_port(struct snd_kcontrol *kcontrol,
...
@@ -816,15 +817,22 @@ static int wsa881x_set_port(struct snd_kcontrol *kcontrol,
(
struct
soc_mixer_control
*
)
kcontrol
->
private_value
;
(
struct
soc_mixer_control
*
)
kcontrol
->
private_value
;
int
portidx
=
mixer
->
reg
;
int
portidx
=
mixer
->
reg
;
if
(
ucontrol
->
value
.
integer
.
value
[
0
])
if
(
ucontrol
->
value
.
integer
.
value
[
0
])
{
if
(
data
->
port_enable
[
portidx
])
return
0
;
data
->
port_enable
[
portidx
]
=
true
;
data
->
port_enable
[
portidx
]
=
true
;
else
}
else
{
if
(
!
data
->
port_enable
[
portidx
])
return
0
;
data
->
port_enable
[
portidx
]
=
false
;
data
->
port_enable
[
portidx
]
=
false
;
}
if
(
portidx
==
WSA881X_PORT_BOOST
)
/* Boost Switch */
if
(
portidx
==
WSA881X_PORT_BOOST
)
/* Boost Switch */
wsa881x_boost_ctrl
(
comp
,
data
->
port_enable
[
portidx
]);
wsa881x_boost_ctrl
(
comp
,
data
->
port_enable
[
portidx
]);
return
0
;
return
1
;
}
}
static
const
char
*
const
smart_boost_lvl_text
[]
=
{
static
const
char
*
const
smart_boost_lvl_text
[]
=
{
...
...
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
View file @
8b974c12
...
@@ -3029,7 +3029,7 @@ static const struct reg_sequence mt8195_afe_reg_defaults[] = {
...
@@ -3029,7 +3029,7 @@ static const struct reg_sequence mt8195_afe_reg_defaults[] = {
static
const
struct
reg_sequence
mt8195_cg_patch
[]
=
{
static
const
struct
reg_sequence
mt8195_cg_patch
[]
=
{
{
AUDIO_TOP_CON0
,
0xfffffffb
},
{
AUDIO_TOP_CON0
,
0xfffffffb
},
{
AUDIO_TOP_CON1
,
0xfffffff
a
},
{
AUDIO_TOP_CON1
,
0xfffffff
8
},
};
};
static
int
mt8195_afe_init_registers
(
struct
mtk_base_afe
*
afe
)
static
int
mt8195_afe_init_registers
(
struct
mtk_base_afe
*
afe
)
...
...
sound/soc/meson/aiu-encoder-i2s.c
View file @
8b974c12
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
#define AIU_RST_SOFT_I2S_FAST BIT(0)
#define AIU_RST_SOFT_I2S_FAST BIT(0)
#define AIU_I2S_DAC_CFG_MSB_FIRST BIT(2)
#define AIU_I2S_DAC_CFG_MSB_FIRST BIT(2)
#define AIU_I2S_MISC_HOLD_EN BIT(2)
#define AIU_CLK_CTRL_I2S_DIV_EN BIT(0)
#define AIU_CLK_CTRL_I2S_DIV_EN BIT(0)
#define AIU_CLK_CTRL_I2S_DIV GENMASK(3, 2)
#define AIU_CLK_CTRL_I2S_DIV GENMASK(3, 2)
#define AIU_CLK_CTRL_AOCLK_INVERT BIT(6)
#define AIU_CLK_CTRL_AOCLK_INVERT BIT(6)
...
@@ -36,37 +35,6 @@ static void aiu_encoder_i2s_divider_enable(struct snd_soc_component *component,
...
@@ -36,37 +35,6 @@ static void aiu_encoder_i2s_divider_enable(struct snd_soc_component *component,
enable
?
AIU_CLK_CTRL_I2S_DIV_EN
:
0
);
enable
?
AIU_CLK_CTRL_I2S_DIV_EN
:
0
);
}
}
static
void
aiu_encoder_i2s_hold
(
struct
snd_soc_component
*
component
,
bool
enable
)
{
snd_soc_component_update_bits
(
component
,
AIU_I2S_MISC
,
AIU_I2S_MISC_HOLD_EN
,
enable
?
AIU_I2S_MISC_HOLD_EN
:
0
);
}
static
int
aiu_encoder_i2s_trigger
(
struct
snd_pcm_substream
*
substream
,
int
cmd
,
struct
snd_soc_dai
*
dai
)
{
struct
snd_soc_component
*
component
=
dai
->
component
;
switch
(
cmd
)
{
case
SNDRV_PCM_TRIGGER_START
:
case
SNDRV_PCM_TRIGGER_RESUME
:
case
SNDRV_PCM_TRIGGER_PAUSE_RELEASE
:
aiu_encoder_i2s_hold
(
component
,
false
);
return
0
;
case
SNDRV_PCM_TRIGGER_STOP
:
case
SNDRV_PCM_TRIGGER_SUSPEND
:
case
SNDRV_PCM_TRIGGER_PAUSE_PUSH
:
aiu_encoder_i2s_hold
(
component
,
true
);
return
0
;
default:
return
-
EINVAL
;
}
}
static
int
aiu_encoder_i2s_setup_desc
(
struct
snd_soc_component
*
component
,
static
int
aiu_encoder_i2s_setup_desc
(
struct
snd_soc_component
*
component
,
struct
snd_pcm_hw_params
*
params
)
struct
snd_pcm_hw_params
*
params
)
{
{
...
@@ -353,7 +321,6 @@ static void aiu_encoder_i2s_shutdown(struct snd_pcm_substream *substream,
...
@@ -353,7 +321,6 @@ static void aiu_encoder_i2s_shutdown(struct snd_pcm_substream *substream,
}
}
const
struct
snd_soc_dai_ops
aiu_encoder_i2s_dai_ops
=
{
const
struct
snd_soc_dai_ops
aiu_encoder_i2s_dai_ops
=
{
.
trigger
=
aiu_encoder_i2s_trigger
,
.
hw_params
=
aiu_encoder_i2s_hw_params
,
.
hw_params
=
aiu_encoder_i2s_hw_params
,
.
hw_free
=
aiu_encoder_i2s_hw_free
,
.
hw_free
=
aiu_encoder_i2s_hw_free
,
.
set_fmt
=
aiu_encoder_i2s_set_fmt
,
.
set_fmt
=
aiu_encoder_i2s_set_fmt
,
...
...
sound/soc/meson/aiu-fifo-i2s.c
View file @
8b974c12
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
#define AIU_MEM_I2S_CONTROL_MODE_16BIT BIT(6)
#define AIU_MEM_I2S_CONTROL_MODE_16BIT BIT(6)
#define AIU_MEM_I2S_BUF_CNTL_INIT BIT(0)
#define AIU_MEM_I2S_BUF_CNTL_INIT BIT(0)
#define AIU_RST_SOFT_I2S_FAST BIT(0)
#define AIU_RST_SOFT_I2S_FAST BIT(0)
#define AIU_I2S_MISC_HOLD_EN BIT(2)
#define AIU_I2S_MISC_FORCE_LEFT_RIGHT BIT(4)
#define AIU_FIFO_I2S_BLOCK 256
#define AIU_FIFO_I2S_BLOCK 256
...
@@ -90,6 +92,10 @@ static int aiu_fifo_i2s_hw_params(struct snd_pcm_substream *substream,
...
@@ -90,6 +92,10 @@ static int aiu_fifo_i2s_hw_params(struct snd_pcm_substream *substream,
unsigned
int
val
;
unsigned
int
val
;
int
ret
;
int
ret
;
snd_soc_component_update_bits
(
component
,
AIU_I2S_MISC
,
AIU_I2S_MISC_HOLD_EN
,
AIU_I2S_MISC_HOLD_EN
);
ret
=
aiu_fifo_hw_params
(
substream
,
params
,
dai
);
ret
=
aiu_fifo_hw_params
(
substream
,
params
,
dai
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -117,6 +123,19 @@ static int aiu_fifo_i2s_hw_params(struct snd_pcm_substream *substream,
...
@@ -117,6 +123,19 @@ static int aiu_fifo_i2s_hw_params(struct snd_pcm_substream *substream,
snd_soc_component_update_bits
(
component
,
AIU_MEM_I2S_MASKS
,
snd_soc_component_update_bits
(
component
,
AIU_MEM_I2S_MASKS
,
AIU_MEM_I2S_MASKS_IRQ_BLOCK
,
val
);
AIU_MEM_I2S_MASKS_IRQ_BLOCK
,
val
);
/*
* Most (all?) supported SoCs have this bit set by default. The vendor
* driver however sets it manually (depending on the version either
* while un-setting AIU_I2S_MISC_HOLD_EN or right before that). Follow
* the same approach for consistency with the vendor driver.
*/
snd_soc_component_update_bits
(
component
,
AIU_I2S_MISC
,
AIU_I2S_MISC_FORCE_LEFT_RIGHT
,
AIU_I2S_MISC_FORCE_LEFT_RIGHT
);
snd_soc_component_update_bits
(
component
,
AIU_I2S_MISC
,
AIU_I2S_MISC_HOLD_EN
,
0
);
return
0
;
return
0
;
}
}
...
...
sound/soc/meson/aiu-fifo.c
View file @
8b974c12
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#include <linux/bitfield.h>
#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <sound/pcm_params.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc.h>
#include <sound/soc-dai.h>
#include <sound/soc-dai.h>
...
@@ -179,6 +180,11 @@ int aiu_fifo_pcm_new(struct snd_soc_pcm_runtime *rtd,
...
@@ -179,6 +180,11 @@ int aiu_fifo_pcm_new(struct snd_soc_pcm_runtime *rtd,
struct
snd_card
*
card
=
rtd
->
card
->
snd_card
;
struct
snd_card
*
card
=
rtd
->
card
->
snd_card
;
struct
aiu_fifo
*
fifo
=
dai
->
playback_dma_data
;
struct
aiu_fifo
*
fifo
=
dai
->
playback_dma_data
;
size_t
size
=
fifo
->
pcm
->
buffer_bytes_max
;
size_t
size
=
fifo
->
pcm
->
buffer_bytes_max
;
int
ret
;
ret
=
dma_coerce_mask_and_coherent
(
card
->
dev
,
DMA_BIT_MASK
(
32
));
if
(
ret
)
return
ret
;
snd_pcm_set_managed_buffer_all
(
rtd
->
pcm
,
SNDRV_DMA_TYPE_DEV
,
snd_pcm_set_managed_buffer_all
(
rtd
->
pcm
,
SNDRV_DMA_TYPE_DEV
,
card
->
dev
,
size
,
size
);
card
->
dev
,
size
,
size
);
...
...
sound/soc/qcom/qdsp6/q6routing.c
View file @
8b974c12
...
@@ -498,14 +498,16 @@ static int msm_routing_put_audio_mixer(struct snd_kcontrol *kcontrol,
...
@@ -498,14 +498,16 @@ static int msm_routing_put_audio_mixer(struct snd_kcontrol *kcontrol,
struct
session_data
*
session
=
&
data
->
sessions
[
session_id
];
struct
session_data
*
session
=
&
data
->
sessions
[
session_id
];
if
(
ucontrol
->
value
.
integer
.
value
[
0
])
{
if
(
ucontrol
->
value
.
integer
.
value
[
0
])
{
if
(
session
->
port_id
==
be_id
)
return
0
;
session
->
port_id
=
be_id
;
session
->
port_id
=
be_id
;
snd_soc_dapm_mixer_update_power
(
dapm
,
kcontrol
,
1
,
update
);
snd_soc_dapm_mixer_update_power
(
dapm
,
kcontrol
,
1
,
update
);
}
else
{
}
else
{
if
(
session
->
port_id
==
be_id
)
{
if
(
session
->
port_id
==
-
1
||
session
->
port_id
!=
be_id
)
session
->
port_id
=
-
1
;
return
0
;
return
0
;
}
session
->
port_id
=
-
1
;
snd_soc_dapm_mixer_update_power
(
dapm
,
kcontrol
,
0
,
update
);
snd_soc_dapm_mixer_update_power
(
dapm
,
kcontrol
,
0
,
update
);
}
}
...
...
sound/soc/sof/intel/pci-tgl.c
View file @
8b974c12
...
@@ -112,8 +112,12 @@ static const struct pci_device_id sof_pci_ids[] = {
...
@@ -112,8 +112,12 @@ static const struct pci_device_id sof_pci_ids[] = {
.
driver_data
=
(
unsigned
long
)
&
adls_desc
},
.
driver_data
=
(
unsigned
long
)
&
adls_desc
},
{
PCI_DEVICE
(
0x8086
,
0x51c8
),
/* ADL-P */
{
PCI_DEVICE
(
0x8086
,
0x51c8
),
/* ADL-P */
.
driver_data
=
(
unsigned
long
)
&
adl_desc
},
.
driver_data
=
(
unsigned
long
)
&
adl_desc
},
{
PCI_DEVICE
(
0x8086
,
0x51cd
),
/* ADL-P */
.
driver_data
=
(
unsigned
long
)
&
adl_desc
},
{
PCI_DEVICE
(
0x8086
,
0x51cc
),
/* ADL-M */
{
PCI_DEVICE
(
0x8086
,
0x51cc
),
/* ADL-M */
.
driver_data
=
(
unsigned
long
)
&
adl_desc
},
.
driver_data
=
(
unsigned
long
)
&
adl_desc
},
{
PCI_DEVICE
(
0x8086
,
0x54c8
),
/* ADL-N */
.
driver_data
=
(
unsigned
long
)
&
adl_desc
},
{
0
,
}
{
0
,
}
};
};
MODULE_DEVICE_TABLE
(
pci
,
sof_pci_ids
);
MODULE_DEVICE_TABLE
(
pci
,
sof_pci_ids
);
...
...
sound/soc/tegra/tegra_asoc_machine.c
View file @
8b974c12
...
@@ -116,16 +116,24 @@ static const struct snd_kcontrol_new tegra_machine_controls[] = {
...
@@ -116,16 +116,24 @@ static const struct snd_kcontrol_new tegra_machine_controls[] = {
SOC_DAPM_PIN_SWITCH
(
"Headset Mic"
),
SOC_DAPM_PIN_SWITCH
(
"Headset Mic"
),
SOC_DAPM_PIN_SWITCH
(
"Internal Mic 1"
),
SOC_DAPM_PIN_SWITCH
(
"Internal Mic 1"
),
SOC_DAPM_PIN_SWITCH
(
"Internal Mic 2"
),
SOC_DAPM_PIN_SWITCH
(
"Internal Mic 2"
),
SOC_DAPM_PIN_SWITCH
(
"Headphones"
),
SOC_DAPM_PIN_SWITCH
(
"Mic Jack"
),
};
};
int
tegra_asoc_machine_init
(
struct
snd_soc_pcm_runtime
*
rtd
)
int
tegra_asoc_machine_init
(
struct
snd_soc_pcm_runtime
*
rtd
)
{
{
struct
snd_soc_card
*
card
=
rtd
->
card
;
struct
snd_soc_card
*
card
=
rtd
->
card
;
struct
tegra_machine
*
machine
=
snd_soc_card_get_drvdata
(
card
);
struct
tegra_machine
*
machine
=
snd_soc_card_get_drvdata
(
card
);
const
char
*
jack_name
;
int
err
;
int
err
;
if
(
machine
->
gpiod_hp_det
&&
machine
->
asoc
->
add_hp_jack
)
{
if
(
machine
->
gpiod_hp_det
&&
machine
->
asoc
->
add_hp_jack
)
{
err
=
snd_soc_card_jack_new
(
card
,
"Headphones Jack"
,
if
(
machine
->
asoc
->
hp_jack_name
)
jack_name
=
machine
->
asoc
->
hp_jack_name
;
else
jack_name
=
"Headphones Jack"
;
err
=
snd_soc_card_jack_new
(
card
,
jack_name
,
SND_JACK_HEADPHONE
,
SND_JACK_HEADPHONE
,
&
tegra_machine_hp_jack
,
&
tegra_machine_hp_jack
,
tegra_machine_hp_jack_pins
,
tegra_machine_hp_jack_pins
,
...
@@ -658,6 +666,7 @@ static struct snd_soc_card snd_soc_tegra_max98090 = {
...
@@ -658,6 +666,7 @@ static struct snd_soc_card snd_soc_tegra_max98090 = {
static
const
struct
tegra_asoc_data
tegra_max98090_data
=
{
static
const
struct
tegra_asoc_data
tegra_max98090_data
=
{
.
mclk_rate
=
tegra_machine_mclk_rate_12mhz
,
.
mclk_rate
=
tegra_machine_mclk_rate_12mhz
,
.
card
=
&
snd_soc_tegra_max98090
,
.
card
=
&
snd_soc_tegra_max98090
,
.
hp_jack_name
=
"Headphones"
,
.
add_common_dapm_widgets
=
true
,
.
add_common_dapm_widgets
=
true
,
.
add_common_controls
=
true
,
.
add_common_controls
=
true
,
.
add_common_snd_ops
=
true
,
.
add_common_snd_ops
=
true
,
...
...
sound/soc/tegra/tegra_asoc_machine.h
View file @
8b974c12
...
@@ -14,6 +14,7 @@ struct snd_soc_pcm_runtime;
...
@@ -14,6 +14,7 @@ struct snd_soc_pcm_runtime;
struct
tegra_asoc_data
{
struct
tegra_asoc_data
{
unsigned
int
(
*
mclk_rate
)(
unsigned
int
srate
);
unsigned
int
(
*
mclk_rate
)(
unsigned
int
srate
);
const
char
*
codec_dev_name
;
const
char
*
codec_dev_name
;
const
char
*
hp_jack_name
;
struct
snd_soc_card
*
card
;
struct
snd_soc_card
*
card
;
unsigned
int
mclk_id
;
unsigned
int
mclk_id
;
bool
hp_jack_gpio_active_low
;
bool
hp_jack_gpio_active_low
;
...
...
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