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
1a4f7965
Commit
1a4f7965
authored
Aug 08, 2024
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
ASoC: Merge fixes
So we can apply AMD patches that rely on them.
parents
7d2fb381
a44b7b57
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
255 additions
and
61 deletions
+255
-61
include/sound/cs35l56.h
include/sound/cs35l56.h
+5
-0
include/sound/soc-component.h
include/sound/soc-component.h
+5
-0
sound/soc/amd/yc/acp6x-mach.c
sound/soc/amd/yc/acp6x-mach.c
+7
-0
sound/soc/codecs/cs-amp-lib.c
sound/soc/codecs/cs-amp-lib.c
+1
-1
sound/soc/codecs/cs35l45.c
sound/soc/codecs/cs35l45.c
+2
-9
sound/soc/codecs/cs35l56-sdw.c
sound/soc/codecs/cs35l56-sdw.c
+77
-0
sound/soc/codecs/cs35l56.c
sound/soc/codecs/cs35l56.c
+11
-0
sound/soc/codecs/cs42l43.c
sound/soc/codecs/cs42l43.c
+57
-18
sound/soc/codecs/cs42l43.h
sound/soc/codecs/cs42l43.h
+2
-0
sound/soc/codecs/cs530x.c
sound/soc/codecs/cs530x.c
+4
-4
sound/soc/codecs/lpass-va-macro.c
sound/soc/codecs/lpass-va-macro.c
+2
-0
sound/soc/codecs/nau8822.c
sound/soc/codecs/nau8822.c
+1
-1
sound/soc/codecs/wcd937x-sdw.c
sound/soc/codecs/wcd937x-sdw.c
+2
-2
sound/soc/codecs/wcd938x-sdw.c
sound/soc/codecs/wcd938x-sdw.c
+2
-2
sound/soc/codecs/wcd939x-sdw.c
sound/soc/codecs/wcd939x-sdw.c
+2
-2
sound/soc/codecs/wm_adsp.c
sound/soc/codecs/wm_adsp.c
+14
-3
sound/soc/codecs/wm_adsp.h
sound/soc/codecs/wm_adsp.h
+3
-0
sound/soc/codecs/wsa881x.c
sound/soc/codecs/wsa881x.c
+1
-1
sound/soc/codecs/wsa883x.c
sound/soc/codecs/wsa883x.c
+1
-1
sound/soc/codecs/wsa884x.c
sound/soc/codecs/wsa884x.c
+1
-1
sound/soc/fsl/fsl_micfil.c
sound/soc/fsl/fsl_micfil.c
+15
-5
sound/soc/fsl/fsl_micfil.h
sound/soc/fsl/fsl_micfil.h
+1
-1
sound/soc/soc-component.c
sound/soc/soc-component.c
+34
-8
sound/soc/sof/mediatek/mt8195/mt8195.c
sound/soc/sof/mediatek/mt8195/mt8195.c
+1
-1
sound/soc/sti/sti_uniperif.c
sound/soc/sti/sti_uniperif.c
+1
-1
sound/soc/sti/uniperif.h
sound/soc/sti/uniperif.h
+1
-0
sound/soc/sti/uniperif_player.c
sound/soc/sti/uniperif_player.c
+1
-0
sound/soc/sti/uniperif_reader.c
sound/soc/sti/uniperif_reader.c
+1
-0
No files found.
include/sound/cs35l56.h
View file @
1a4f7965
...
...
@@ -277,6 +277,11 @@ static inline int cs35l56_force_sync_asp1_registers_from_cache(struct cs35l56_ba
return
0
;
}
static
inline
bool
cs35l56_is_otp_register
(
unsigned
int
reg
)
{
return
(
reg
>>
16
)
==
3
;
}
extern
struct
regmap_config
cs35l56_regmap_i2c
;
extern
struct
regmap_config
cs35l56_regmap_spi
;
extern
struct
regmap_config
cs35l56_regmap_sdw
;
...
...
include/sound/soc-component.h
View file @
1a4f7965
...
...
@@ -462,6 +462,11 @@ int snd_soc_component_force_enable_pin_unlocked(
const
char
*
pin
);
/* component controls */
struct
snd_kcontrol
*
snd_soc_component_get_kcontrol
(
struct
snd_soc_component
*
component
,
const
char
*
const
ctl
);
struct
snd_kcontrol
*
snd_soc_component_get_kcontrol_locked
(
struct
snd_soc_component
*
component
,
const
char
*
const
ctl
);
int
snd_soc_component_notify_control
(
struct
snd_soc_component
*
component
,
const
char
*
const
ctl
);
...
...
sound/soc/amd/yc/acp6x-mach.c
View file @
1a4f7965
...
...
@@ -423,6 +423,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH
(
DMI_BOARD_NAME
,
"8A3E"
),
}
},
{
.
driver_data
=
&
acp6x_card
,
.
matches
=
{
DMI_MATCH
(
DMI_BOARD_VENDOR
,
"HP"
),
DMI_MATCH
(
DMI_BOARD_NAME
,
"8B27"
),
}
},
{
.
driver_data
=
&
acp6x_card
,
.
matches
=
{
...
...
sound/soc/codecs/cs-amp-lib.c
View file @
1a4f7965
...
...
@@ -108,7 +108,7 @@ static efi_status_t cs_amp_get_efi_variable(efi_char16_t *name,
KUNIT_STATIC_STUB_REDIRECT
(
cs_amp_get_efi_variable
,
name
,
guid
,
size
,
buf
);
if
(
IS_ENABLED
(
CONFIG_EFI
))
if
(
efi_rt_services_supported
(
EFI_RT_SUPPORTED_GET_VARIABLE
))
return
efi
.
get_variable
(
name
,
guid
,
&
attr
,
size
,
buf
);
return
EFI_NOT_FOUND
;
...
...
sound/soc/codecs/cs35l45.c
View file @
1a4f7965
...
...
@@ -176,17 +176,10 @@ static int cs35l45_activate_ctl(struct snd_soc_component *component,
struct
snd_kcontrol
*
kcontrol
;
struct
snd_kcontrol_volatile
*
vd
;
unsigned
int
index_offset
;
char
name
[
SNDRV_CTL_ELEM_ID_NAME_MAXLEN
];
if
(
component
->
name_prefix
)
snprintf
(
name
,
SNDRV_CTL_ELEM_ID_NAME_MAXLEN
,
"%s %s"
,
component
->
name_prefix
,
ctl_name
);
else
snprintf
(
name
,
SNDRV_CTL_ELEM_ID_NAME_MAXLEN
,
"%s"
,
ctl_name
);
kcontrol
=
snd_soc_card_get_kcontrol_locked
(
component
->
card
,
name
);
kcontrol
=
snd_soc_component_get_kcontrol_locked
(
component
,
ctl_name
);
if
(
!
kcontrol
)
{
dev_err
(
component
->
dev
,
"Can't find kcontrol %s
\n
"
,
name
);
dev_err
(
component
->
dev
,
"Can't find kcontrol %s
\n
"
,
ctl_
name
);
return
-
EINVAL
;
}
...
...
sound/soc/codecs/cs35l56-sdw.c
View file @
1a4f7965
...
...
@@ -23,6 +23,79 @@
/* Register addresses are offset when sent over SoundWire */
#define CS35L56_SDW_ADDR_OFFSET 0x8000
/* Cirrus bus bridge registers */
#define CS35L56_SDW_MEM_ACCESS_STATUS 0xd0
#define CS35L56_SDW_MEM_READ_DATA 0xd8
#define CS35L56_SDW_LAST_LATE BIT(3)
#define CS35L56_SDW_CMD_IN_PROGRESS BIT(2)
#define CS35L56_SDW_RDATA_RDY BIT(0)
#define CS35L56_LATE_READ_POLL_US 10
#define CS35L56_LATE_READ_TIMEOUT_US 1000
static
int
cs35l56_sdw_poll_mem_status
(
struct
sdw_slave
*
peripheral
,
unsigned
int
mask
,
unsigned
int
match
)
{
int
ret
,
val
;
ret
=
read_poll_timeout
(
sdw_read_no_pm
,
val
,
(
val
<
0
)
||
((
val
&
mask
)
==
match
),
CS35L56_LATE_READ_POLL_US
,
CS35L56_LATE_READ_TIMEOUT_US
,
false
,
peripheral
,
CS35L56_SDW_MEM_ACCESS_STATUS
);
if
(
ret
<
0
)
return
ret
;
if
(
val
<
0
)
return
val
;
return
0
;
}
static
int
cs35l56_sdw_slow_read
(
struct
sdw_slave
*
peripheral
,
unsigned
int
reg
,
u8
*
buf
,
size_t
val_size
)
{
int
ret
,
i
;
reg
+=
CS35L56_SDW_ADDR_OFFSET
;
for
(
i
=
0
;
i
<
val_size
;
i
+=
sizeof
(
u32
))
{
/* Poll for bus bridge idle */
ret
=
cs35l56_sdw_poll_mem_status
(
peripheral
,
CS35L56_SDW_CMD_IN_PROGRESS
,
0
);
if
(
ret
<
0
)
{
dev_err
(
&
peripheral
->
dev
,
"!CMD_IN_PROGRESS fail: %d
\n
"
,
ret
);
return
ret
;
}
/* Reading LSByte triggers read of register to holding buffer */
sdw_read_no_pm
(
peripheral
,
reg
+
i
);
/* Wait for data available */
ret
=
cs35l56_sdw_poll_mem_status
(
peripheral
,
CS35L56_SDW_RDATA_RDY
,
CS35L56_SDW_RDATA_RDY
);
if
(
ret
<
0
)
{
dev_err
(
&
peripheral
->
dev
,
"RDATA_RDY fail: %d
\n
"
,
ret
);
return
ret
;
}
/* Read data from buffer */
ret
=
sdw_nread_no_pm
(
peripheral
,
CS35L56_SDW_MEM_READ_DATA
,
sizeof
(
u32
),
&
buf
[
i
]);
if
(
ret
)
{
dev_err
(
&
peripheral
->
dev
,
"Late read @%#x failed: %d
\n
"
,
reg
+
i
,
ret
);
return
ret
;
}
swab32s
((
u32
*
)
&
buf
[
i
]);
}
return
0
;
}
static
int
cs35l56_sdw_read_one
(
struct
sdw_slave
*
peripheral
,
unsigned
int
reg
,
void
*
buf
)
{
int
ret
;
...
...
@@ -48,6 +121,10 @@ static int cs35l56_sdw_read(void *context, const void *reg_buf,
int
ret
;
reg
=
le32_to_cpu
(
*
(
const
__le32
*
)
reg_buf
);
if
(
cs35l56_is_otp_register
(
reg
))
return
cs35l56_sdw_slow_read
(
peripheral
,
reg
,
buf8
,
val_size
);
reg
+=
CS35L56_SDW_ADDR_OFFSET
;
if
(
val_size
==
4
)
...
...
sound/soc/codecs/cs35l56.c
View file @
1a4f7965
...
...
@@ -1095,6 +1095,11 @@ int cs35l56_system_resume(struct device *dev)
}
EXPORT_SYMBOL_GPL
(
cs35l56_system_resume
);
static
int
cs35l56_control_add_nop
(
struct
wm_adsp
*
dsp
,
struct
cs_dsp_coeff_ctl
*
cs_ctl
)
{
return
0
;
}
static
int
cs35l56_dsp_init
(
struct
cs35l56_private
*
cs35l56
)
{
struct
wm_adsp
*
dsp
;
...
...
@@ -1117,6 +1122,12 @@ static int cs35l56_dsp_init(struct cs35l56_private *cs35l56)
dsp
->
fw
=
12
;
dsp
->
wmfw_optional
=
true
;
/*
* None of the firmware controls need to be exported so add a no-op
* callback that suppresses creating an ALSA control.
*/
dsp
->
control_add
=
&
cs35l56_control_add_nop
;
dev_dbg
(
cs35l56
->
base
.
dev
,
"DSP system name: '%s'
\n
"
,
dsp
->
system_name
);
ret
=
wm_halo_init
(
dsp
);
...
...
sound/soc/codecs/cs42l43.c
View file @
1a4f7965
...
...
@@ -7,6 +7,7 @@
#include <linux/bitops.h>
#include <linux/bits.h>
#include <linux/build_bug.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/err.h>
...
...
@@ -252,24 +253,20 @@ CS42L43_IRQ_COMPLETE(load_detect)
static
irqreturn_t
cs42l43_mic_shutter
(
int
irq
,
void
*
data
)
{
struct
cs42l43_codec
*
priv
=
data
;
static
const
char
*
const
controls
[]
=
{
"Decimator 1 Switch"
,
"Decimator 2 Switch"
,
"Decimator 3 Switch"
,
"Decimator 4 Switch"
,
};
int
i
,
ret
;
struct
snd_soc_component
*
component
=
priv
->
component
;
int
i
;
dev_dbg
(
priv
->
dev
,
"Microphone shutter changed
\n
"
);
if
(
!
priv
->
component
)
if
(
!
component
)
return
IRQ_NONE
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
controls
);
i
++
)
{
ret
=
snd_soc_component_notify_control
(
priv
->
component
,
controls
[
i
]);
if
(
ret
)
for
(
i
=
1
;
i
<
ARRAY_SIZE
(
priv
->
kctl
);
i
++
)
{
if
(
!
priv
->
kctl
[
i
])
return
IRQ_NONE
;
snd_ctl_notify
(
component
->
card
->
snd_card
,
SNDRV_CTL_EVENT_MASK_VALUE
,
&
priv
->
kctl
[
i
]
->
id
);
}
return
IRQ_HANDLED
;
...
...
@@ -278,18 +275,19 @@ static irqreturn_t cs42l43_mic_shutter(int irq, void *data)
static
irqreturn_t
cs42l43_spk_shutter
(
int
irq
,
void
*
data
)
{
struct
cs42l43_codec
*
priv
=
data
;
int
re
t
;
struct
snd_soc_component
*
component
=
priv
->
componen
t
;
dev_dbg
(
priv
->
dev
,
"Speaker shutter changed
\n
"
);
if
(
!
priv
->
component
)
if
(
!
component
)
return
IRQ_NONE
;
ret
=
snd_soc_component_notify_control
(
priv
->
component
,
"Speaker Digital Switch"
);
if
(
ret
)
if
(
!
priv
->
kctl
[
0
])
return
IRQ_NONE
;
snd_ctl_notify
(
component
->
card
->
snd_card
,
SNDRV_CTL_EVENT_MASK_VALUE
,
&
priv
->
kctl
[
0
]
->
id
);
return
IRQ_HANDLED
;
}
...
...
@@ -590,7 +588,46 @@ static int cs42l43_asp_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mas
return
0
;
}
static
int
cs42l43_dai_probe
(
struct
snd_soc_dai
*
dai
)
{
struct
snd_soc_component
*
component
=
dai
->
component
;
struct
cs42l43_codec
*
priv
=
snd_soc_component_get_drvdata
(
component
);
static
const
char
*
const
controls
[]
=
{
"Speaker Digital Switch"
,
"Decimator 1 Switch"
,
"Decimator 2 Switch"
,
"Decimator 3 Switch"
,
"Decimator 4 Switch"
,
};
int
i
;
static_assert
(
ARRAY_SIZE
(
controls
)
==
ARRAY_SIZE
(
priv
->
kctl
));
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
controls
);
i
++
)
{
if
(
priv
->
kctl
[
i
])
continue
;
priv
->
kctl
[
i
]
=
snd_soc_component_get_kcontrol
(
component
,
controls
[
i
]);
}
return
0
;
}
static
int
cs42l43_dai_remove
(
struct
snd_soc_dai
*
dai
)
{
struct
snd_soc_component
*
component
=
dai
->
component
;
struct
cs42l43_codec
*
priv
=
snd_soc_component_get_drvdata
(
component
);
int
i
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
priv
->
kctl
);
i
++
)
priv
->
kctl
[
i
]
=
NULL
;
return
0
;
}
static
const
struct
snd_soc_dai_ops
cs42l43_asp_ops
=
{
.
probe
=
cs42l43_dai_probe
,
.
remove
=
cs42l43_dai_remove
,
.
startup
=
cs42l43_startup
,
.
hw_params
=
cs42l43_asp_hw_params
,
.
set_fmt
=
cs42l43_asp_set_fmt
,
...
...
@@ -608,9 +645,11 @@ static int cs42l43_sdw_hw_params(struct snd_pcm_substream *substream,
return
ret
;
return
cs42l43_set_sample_rate
(
substream
,
params
,
dai
);
}
;
}
static
const
struct
snd_soc_dai_ops
cs42l43_sdw_ops
=
{
.
probe
=
cs42l43_dai_probe
,
.
remove
=
cs42l43_dai_remove
,
.
startup
=
cs42l43_startup
,
.
set_stream
=
cs42l43_sdw_set_stream
,
.
hw_params
=
cs42l43_sdw_hw_params
,
...
...
sound/soc/codecs/cs42l43.h
View file @
1a4f7965
...
...
@@ -100,6 +100,8 @@ struct cs42l43_codec {
struct
delayed_work
hp_ilimit_clear_work
;
bool
hp_ilimited
;
int
hp_ilimit_count
;
struct
snd_kcontrol
*
kctl
[
5
];
};
#if IS_REACHABLE(CONFIG_SND_SOC_CS42L43_SDW)
...
...
sound/soc/codecs/cs530x.c
View file @
1a4f7965
...
...
@@ -129,16 +129,16 @@ static int cs530x_put_volsw_vu(struct snd_kcontrol *kcontrol,
static
const
DECLARE_TLV_DB_SCALE
(
in_vol_tlv
,
-
1270
,
50
,
0
);
static
const
char
*
const
cs530x_in_
hpf
_text
[]
=
{
static
const
char
*
const
cs530x_in_
filter
_text
[]
=
{
"Min Phase Slow Roll-off"
,
"Min Phase Fast Roll-off"
,
"Linear Phase Slow Roll-off"
,
"Linear Phase Fast Roll-off"
,
};
static
SOC_ENUM_SINGLE_DECL
(
cs530x_in_
hpf
_enum
,
CS530X_IN_FILTER
,
static
SOC_ENUM_SINGLE_DECL
(
cs530x_in_
filter
_enum
,
CS530X_IN_FILTER
,
CS530X_IN_FILTER_SHIFT
,
cs530x_in_
hpf
_text
);
cs530x_in_
filter
_text
);
static
const
char
*
const
cs530x_in_4ch_sum_text
[]
=
{
"None"
,
...
...
@@ -189,7 +189,7 @@ SOC_SINGLE_EXT_TLV("IN1 Volume", CS530X_IN_VOL_CTRL1_0, 0, 255, 1,
SOC_SINGLE_EXT_TLV
(
"IN2 Volume"
,
CS530X_IN_VOL_CTRL1_1
,
0
,
255
,
1
,
snd_soc_get_volsw
,
cs530x_put_volsw_vu
,
in_vol_tlv
),
SOC_ENUM
(
"IN
HPF Select"
,
cs530x_in_hpf
_enum
),
SOC_ENUM
(
"IN
DEC Filter Select"
,
cs530x_in_filter
_enum
),
SOC_ENUM
(
"Input Ramp Up"
,
cs530x_ramp_inc_enum
),
SOC_ENUM
(
"Input Ramp Down"
,
cs530x_ramp_dec_enum
),
...
...
sound/soc/codecs/lpass-va-macro.c
View file @
1a4f7965
...
...
@@ -1472,6 +1472,8 @@ static void va_macro_set_lpass_codec_version(struct va_macro *va)
if
((
core_id_0
==
0x01
)
&&
(
core_id_1
==
0x0F
))
version
=
LPASS_CODEC_VERSION_2_0
;
if
((
core_id_0
==
0x02
)
&&
(
core_id_1
==
0x0F
)
&&
core_id_2
==
0x01
)
version
=
LPASS_CODEC_VERSION_2_0
;
if
((
core_id_0
==
0x02
)
&&
(
core_id_1
==
0x0E
))
version
=
LPASS_CODEC_VERSION_2_1
;
if
((
core_id_0
==
0x02
)
&&
(
core_id_1
==
0x0F
)
&&
(
core_id_2
==
0x50
||
core_id_2
==
0x51
))
...
...
sound/soc/codecs/nau8822.c
View file @
1a4f7965
...
...
@@ -736,7 +736,7 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
return
ret
;
}
dev_
info
(
component
->
dev
,
dev_
dbg
(
component
->
dev
,
"pll_int=%x pll_frac=%x mclk_scaler=%x pre_factor=%x
\n
"
,
pll_param
->
pll_int
,
pll_param
->
pll_frac
,
pll_param
->
mclk_scaler
,
pll_param
->
pre_factor
);
...
...
sound/soc/codecs/wcd937x-sdw.c
View file @
1a4f7965
...
...
@@ -1049,7 +1049,7 @@ static int wcd9370_probe(struct sdw_slave *pdev,
pdev
->
prop
.
lane_control_support
=
true
;
pdev
->
prop
.
simple_clk_stop_capable
=
true
;
if
(
wcd
->
is_tx
)
{
pdev
->
prop
.
source_ports
=
GENMASK
(
WCD937X_MAX_TX_SWR_PORTS
,
0
);
pdev
->
prop
.
source_ports
=
GENMASK
(
WCD937X_MAX_TX_SWR_PORTS
-
1
,
0
);
pdev
->
prop
.
src_dpn_prop
=
wcd937x_dpn_prop
;
wcd
->
ch_info
=
&
wcd937x_sdw_tx_ch_info
[
0
];
pdev
->
prop
.
wake_capable
=
true
;
...
...
@@ -1062,7 +1062,7 @@ static int wcd9370_probe(struct sdw_slave *pdev,
/* Start in cache-only until device is enumerated */
regcache_cache_only
(
wcd
->
regmap
,
true
);
}
else
{
pdev
->
prop
.
sink_ports
=
GENMASK
(
WCD937X_MAX_SWR_PORTS
,
0
);
pdev
->
prop
.
sink_ports
=
GENMASK
(
WCD937X_MAX_SWR_PORTS
-
1
,
0
);
pdev
->
prop
.
sink_dpn_prop
=
wcd937x_dpn_prop
;
wcd
->
ch_info
=
&
wcd937x_sdw_rx_ch_info
[
0
];
}
...
...
sound/soc/codecs/wcd938x-sdw.c
View file @
1a4f7965
...
...
@@ -1252,12 +1252,12 @@ static int wcd9380_probe(struct sdw_slave *pdev,
pdev
->
prop
.
lane_control_support
=
true
;
pdev
->
prop
.
simple_clk_stop_capable
=
true
;
if
(
wcd
->
is_tx
)
{
pdev
->
prop
.
source_ports
=
GENMASK
(
WCD938X_MAX_SWR_PORTS
,
0
);
pdev
->
prop
.
source_ports
=
GENMASK
(
WCD938X_MAX_SWR_PORTS
-
1
,
0
);
pdev
->
prop
.
src_dpn_prop
=
wcd938x_dpn_prop
;
wcd
->
ch_info
=
&
wcd938x_sdw_tx_ch_info
[
0
];
pdev
->
prop
.
wake_capable
=
true
;
}
else
{
pdev
->
prop
.
sink_ports
=
GENMASK
(
WCD938X_MAX_SWR_PORTS
,
0
);
pdev
->
prop
.
sink_ports
=
GENMASK
(
WCD938X_MAX_SWR_PORTS
-
1
,
0
);
pdev
->
prop
.
sink_dpn_prop
=
wcd938x_dpn_prop
;
wcd
->
ch_info
=
&
wcd938x_sdw_rx_ch_info
[
0
];
}
...
...
sound/soc/codecs/wcd939x-sdw.c
View file @
1a4f7965
...
...
@@ -1453,12 +1453,12 @@ static int wcd9390_probe(struct sdw_slave *pdev, const struct sdw_device_id *id)
pdev
->
prop
.
lane_control_support
=
true
;
pdev
->
prop
.
simple_clk_stop_capable
=
true
;
if
(
wcd
->
is_tx
)
{
pdev
->
prop
.
source_ports
=
GENMASK
(
WCD939X_MAX_TX_SWR_PORTS
,
0
);
pdev
->
prop
.
source_ports
=
GENMASK
(
WCD939X_MAX_TX_SWR_PORTS
-
1
,
0
);
pdev
->
prop
.
src_dpn_prop
=
wcd939x_tx_dpn_prop
;
wcd
->
ch_info
=
&
wcd939x_sdw_tx_ch_info
[
0
];
pdev
->
prop
.
wake_capable
=
true
;
}
else
{
pdev
->
prop
.
sink_ports
=
GENMASK
(
WCD939X_MAX_RX_SWR_PORTS
,
0
);
pdev
->
prop
.
sink_ports
=
GENMASK
(
WCD939X_MAX_RX_SWR_PORTS
-
1
,
0
);
pdev
->
prop
.
sink_dpn_prop
=
wcd939x_rx_dpn_prop
;
wcd
->
ch_info
=
&
wcd939x_sdw_rx_ch_info
[
0
];
}
...
...
sound/soc/codecs/wm_adsp.c
View file @
1a4f7965
...
...
@@ -583,7 +583,7 @@ static void wm_adsp_ctl_work(struct work_struct *work)
kfree
(
kcontrol
);
}
static
int
wm_adsp_control_add
(
struct
cs_dsp_coeff_ctl
*
cs_ctl
)
int
wm_adsp_control_add
(
struct
cs_dsp_coeff_ctl
*
cs_ctl
)
{
struct
wm_adsp
*
dsp
=
container_of
(
cs_ctl
->
dsp
,
struct
wm_adsp
,
cs_dsp
);
struct
cs_dsp
*
cs_dsp
=
&
dsp
->
cs_dsp
;
...
...
@@ -658,6 +658,17 @@ static int wm_adsp_control_add(struct cs_dsp_coeff_ctl *cs_ctl)
return
ret
;
}
EXPORT_SYMBOL_GPL
(
wm_adsp_control_add
);
static
int
wm_adsp_control_add_cb
(
struct
cs_dsp_coeff_ctl
*
cs_ctl
)
{
struct
wm_adsp
*
dsp
=
container_of
(
cs_ctl
->
dsp
,
struct
wm_adsp
,
cs_dsp
);
if
(
dsp
->
control_add
)
return
(
dsp
->
control_add
)(
dsp
,
cs_ctl
);
else
return
wm_adsp_control_add
(
cs_ctl
);
}
static
void
wm_adsp_control_remove
(
struct
cs_dsp_coeff_ctl
*
cs_ctl
)
{
...
...
@@ -2072,12 +2083,12 @@ irqreturn_t wm_halo_wdt_expire(int irq, void *data)
EXPORT_SYMBOL_GPL
(
wm_halo_wdt_expire
);
static
const
struct
cs_dsp_client_ops
wm_adsp1_client_ops
=
{
.
control_add
=
wm_adsp_control_add
,
.
control_add
=
wm_adsp_control_add
_cb
,
.
control_remove
=
wm_adsp_control_remove
,
};
static
const
struct
cs_dsp_client_ops
wm_adsp2_client_ops
=
{
.
control_add
=
wm_adsp_control_add
,
.
control_add
=
wm_adsp_control_add
_cb
,
.
control_remove
=
wm_adsp_control_remove
,
.
pre_run
=
wm_adsp_pre_run
,
.
post_run
=
wm_adsp_event_post_run
,
...
...
sound/soc/codecs/wm_adsp.h
View file @
1a4f7965
...
...
@@ -37,6 +37,7 @@ struct wm_adsp {
bool
wmfw_optional
;
struct
work_struct
boot_work
;
int
(
*
control_add
)(
struct
wm_adsp
*
dsp
,
struct
cs_dsp_coeff_ctl
*
cs_ctl
);
int
(
*
pre_run
)(
struct
wm_adsp
*
dsp
);
bool
preloaded
;
...
...
@@ -132,6 +133,8 @@ int wm_adsp_compr_pointer(struct snd_soc_component *component,
int
wm_adsp_compr_copy
(
struct
snd_soc_component
*
component
,
struct
snd_compr_stream
*
stream
,
char
__user
*
buf
,
size_t
count
);
int
wm_adsp_control_add
(
struct
cs_dsp_coeff_ctl
*
cs_ctl
);
int
wm_adsp_write_ctl
(
struct
wm_adsp
*
dsp
,
const
char
*
name
,
int
type
,
unsigned
int
alg
,
void
*
buf
,
size_t
len
);
int
wm_adsp_read_ctl
(
struct
wm_adsp
*
dsp
,
const
char
*
name
,
int
type
,
...
...
sound/soc/codecs/wsa881x.c
View file @
1a4f7965
...
...
@@ -1152,7 +1152,7 @@ static int wsa881x_probe(struct sdw_slave *pdev,
wsa881x
->
sconfig
.
frame_rate
=
48000
;
wsa881x
->
sconfig
.
direction
=
SDW_DATA_DIR_RX
;
wsa881x
->
sconfig
.
type
=
SDW_STREAM_PDM
;
pdev
->
prop
.
sink_ports
=
GENMASK
(
WSA881X_MAX_SWR_PORTS
,
0
);
pdev
->
prop
.
sink_ports
=
GENMASK
(
WSA881X_MAX_SWR_PORTS
-
1
,
0
);
pdev
->
prop
.
sink_dpn_prop
=
wsa_sink_dpn_prop
;
pdev
->
prop
.
scp_int1_mask
=
SDW_SCP_INT1_BUS_CLASH
|
SDW_SCP_INT1_PARITY
;
pdev
->
prop
.
clk_stop_mode1
=
true
;
...
...
sound/soc/codecs/wsa883x.c
View file @
1a4f7965
...
...
@@ -1411,7 +1411,7 @@ static int wsa883x_probe(struct sdw_slave *pdev,
WSA883X_MAX_SWR_PORTS
))
dev_dbg
(
dev
,
"Static Port mapping not specified
\n
"
);
pdev
->
prop
.
sink_ports
=
GENMASK
(
WSA883X_MAX_SWR_PORTS
,
0
);
pdev
->
prop
.
sink_ports
=
GENMASK
(
WSA883X_MAX_SWR_PORTS
-
1
,
0
);
pdev
->
prop
.
simple_clk_stop_capable
=
true
;
pdev
->
prop
.
sink_dpn_prop
=
wsa_sink_dpn_prop
;
pdev
->
prop
.
scp_int1_mask
=
SDW_SCP_INT1_BUS_CLASH
|
SDW_SCP_INT1_PARITY
;
...
...
sound/soc/codecs/wsa884x.c
View file @
1a4f7965
...
...
@@ -1904,7 +1904,7 @@ static int wsa884x_probe(struct sdw_slave *pdev,
WSA884X_MAX_SWR_PORTS
))
dev_dbg
(
dev
,
"Static Port mapping not specified
\n
"
);
pdev
->
prop
.
sink_ports
=
GENMASK
(
WSA884X_MAX_SWR_PORTS
,
0
);
pdev
->
prop
.
sink_ports
=
GENMASK
(
WSA884X_MAX_SWR_PORTS
-
1
,
0
);
pdev
->
prop
.
simple_clk_stop_capable
=
true
;
pdev
->
prop
.
sink_dpn_prop
=
wsa884x_sink_dpn_prop
;
pdev
->
prop
.
scp_int1_mask
=
SDW_SCP_INT1_BUS_CLASH
|
SDW_SCP_INT1_PARITY
;
...
...
sound/soc/fsl/fsl_micfil.c
View file @
1a4f7965
...
...
@@ -831,7 +831,7 @@ static const struct reg_default fsl_micfil_reg_defaults[] = {
{
REG_MICFIL_CTRL1
,
0x00000000
},
{
REG_MICFIL_CTRL2
,
0x00000000
},
{
REG_MICFIL_STAT
,
0x00000000
},
{
REG_MICFIL_FIFO_CTRL
,
0x000000
07
},
{
REG_MICFIL_FIFO_CTRL
,
0x000000
1F
},
{
REG_MICFIL_FIFO_STAT
,
0x00000000
},
{
REG_MICFIL_DATACH0
,
0x00000000
},
{
REG_MICFIL_DATACH1
,
0x00000000
},
...
...
@@ -855,6 +855,8 @@ static const struct reg_default fsl_micfil_reg_defaults[] = {
static
bool
fsl_micfil_readable_reg
(
struct
device
*
dev
,
unsigned
int
reg
)
{
struct
fsl_micfil
*
micfil
=
dev_get_drvdata
(
dev
);
switch
(
reg
)
{
case
REG_MICFIL_CTRL1
:
case
REG_MICFIL_CTRL2
:
...
...
@@ -872,9 +874,6 @@ static bool fsl_micfil_readable_reg(struct device *dev, unsigned int reg)
case
REG_MICFIL_DC_CTRL
:
case
REG_MICFIL_OUT_CTRL
:
case
REG_MICFIL_OUT_STAT
:
case
REG_MICFIL_FSYNC_CTRL
:
case
REG_MICFIL_VERID
:
case
REG_MICFIL_PARAM
:
case
REG_MICFIL_VAD0_CTRL1
:
case
REG_MICFIL_VAD0_CTRL2
:
case
REG_MICFIL_VAD0_STAT
:
...
...
@@ -883,6 +882,12 @@ static bool fsl_micfil_readable_reg(struct device *dev, unsigned int reg)
case
REG_MICFIL_VAD0_NDATA
:
case
REG_MICFIL_VAD0_ZCD
:
return
true
;
case
REG_MICFIL_FSYNC_CTRL
:
case
REG_MICFIL_VERID
:
case
REG_MICFIL_PARAM
:
if
(
micfil
->
soc
->
use_verid
)
return
true
;
fallthrough
;
default:
return
false
;
}
...
...
@@ -890,6 +895,8 @@ static bool fsl_micfil_readable_reg(struct device *dev, unsigned int reg)
static
bool
fsl_micfil_writeable_reg
(
struct
device
*
dev
,
unsigned
int
reg
)
{
struct
fsl_micfil
*
micfil
=
dev_get_drvdata
(
dev
);
switch
(
reg
)
{
case
REG_MICFIL_CTRL1
:
case
REG_MICFIL_CTRL2
:
...
...
@@ -899,7 +906,6 @@ static bool fsl_micfil_writeable_reg(struct device *dev, unsigned int reg)
case
REG_MICFIL_DC_CTRL
:
case
REG_MICFIL_OUT_CTRL
:
case
REG_MICFIL_OUT_STAT
:
/* Write 1 to Clear */
case
REG_MICFIL_FSYNC_CTRL
:
case
REG_MICFIL_VAD0_CTRL1
:
case
REG_MICFIL_VAD0_CTRL2
:
case
REG_MICFIL_VAD0_STAT
:
/* Write 1 to Clear */
...
...
@@ -907,6 +913,10 @@ static bool fsl_micfil_writeable_reg(struct device *dev, unsigned int reg)
case
REG_MICFIL_VAD0_NCONFIG
:
case
REG_MICFIL_VAD0_ZCD
:
return
true
;
case
REG_MICFIL_FSYNC_CTRL
:
if
(
micfil
->
soc
->
use_verid
)
return
true
;
fallthrough
;
default:
return
false
;
}
...
...
sound/soc/fsl/fsl_micfil.h
View file @
1a4f7965
...
...
@@ -72,7 +72,7 @@
#define MICFIL_STAT_CHXF(ch) BIT(ch)
/* MICFIL FIFO Control Register -- REG_MICFIL_FIFO_CTRL 0x10 */
#define MICFIL_FIFO_CTRL_FIFOWMK GENMASK(
2
, 0)
#define MICFIL_FIFO_CTRL_FIFOWMK GENMASK(
4
, 0)
/* MICFIL FIFO Status Register -- REG_MICFIL_FIFO_STAT 0x14 */
#define MICFIL_FIFO_STAT_FIFOX_OVER(ch) BIT(ch)
...
...
sound/soc/soc-component.c
View file @
1a4f7965
...
...
@@ -236,19 +236,45 @@ int snd_soc_component_force_enable_pin_unlocked(
}
EXPORT_SYMBOL_GPL
(
snd_soc_component_force_enable_pin_unlocked
);
int
snd_soc_component_notify_control
(
struct
snd_soc_component
*
component
,
const
char
*
const
ctl
)
static
void
soc_get_kcontrol_name
(
struct
snd_soc_component
*
component
,
char
*
buf
,
int
size
,
const
char
*
const
ctl
)
{
char
name
[
SNDRV_CTL_ELEM_ID_NAME_MAXLEN
];
struct
snd_kcontrol
*
kctl
;
/* When updating, change also snd_soc_dapm_widget_name_cmp() */
if
(
component
->
name_prefix
)
snprintf
(
name
,
ARRAY_SIZE
(
name
)
,
"%s %s"
,
component
->
name_prefix
,
ctl
);
snprintf
(
buf
,
size
,
"%s %s"
,
component
->
name_prefix
,
ctl
);
else
snprintf
(
name
,
ARRAY_SIZE
(
name
),
"%s"
,
ctl
);
snprintf
(
buf
,
size
,
"%s"
,
ctl
);
}
struct
snd_kcontrol
*
snd_soc_component_get_kcontrol
(
struct
snd_soc_component
*
component
,
const
char
*
const
ctl
)
{
char
name
[
SNDRV_CTL_ELEM_ID_NAME_MAXLEN
];
soc_get_kcontrol_name
(
component
,
name
,
ARRAY_SIZE
(
name
),
ctl
);
return
snd_soc_card_get_kcontrol
(
component
->
card
,
name
);
}
EXPORT_SYMBOL_GPL
(
snd_soc_component_get_kcontrol
);
struct
snd_kcontrol
*
snd_soc_component_get_kcontrol_locked
(
struct
snd_soc_component
*
component
,
const
char
*
const
ctl
)
{
char
name
[
SNDRV_CTL_ELEM_ID_NAME_MAXLEN
];
soc_get_kcontrol_name
(
component
,
name
,
ARRAY_SIZE
(
name
),
ctl
);
return
snd_soc_card_get_kcontrol_locked
(
component
->
card
,
name
);
}
EXPORT_SYMBOL_GPL
(
snd_soc_component_get_kcontrol_locked
);
int
snd_soc_component_notify_control
(
struct
snd_soc_component
*
component
,
const
char
*
const
ctl
)
{
struct
snd_kcontrol
*
kctl
;
kctl
=
snd_soc_c
ard_get_kcontrol
(
component
->
card
,
name
);
kctl
=
snd_soc_c
omponent_get_kcontrol
(
component
,
ctl
);
if
(
!
kctl
)
return
soc_component_ret
(
component
,
-
EINVAL
);
...
...
sound/soc/sof/mediatek/mt8195/mt8195.c
View file @
1a4f7965
...
...
@@ -573,7 +573,7 @@ static const struct snd_sof_dsp_ops sof_mt8195_ops = {
static
struct
snd_sof_of_mach
sof_mt8195_machs
[]
=
{
{
.
compatible
=
"google,tomato"
,
.
sof_tplg_filename
=
"sof-mt8195-mt6359-rt1019-rt5682
-dts
.tplg"
.
sof_tplg_filename
=
"sof-mt8195-mt6359-rt1019-rt5682.tplg"
},
{
.
compatible
=
"mediatek,mt8195"
,
.
sof_tplg_filename
=
"sof-mt8195.tplg"
...
...
sound/soc/sti/sti_uniperif.c
View file @
1a4f7965
...
...
@@ -352,7 +352,7 @@ static int sti_uniperiph_resume(struct snd_soc_component *component)
return
ret
;
}
static
int
sti_uniperiph_dai_probe
(
struct
snd_soc_dai
*
dai
)
int
sti_uniperiph_dai_probe
(
struct
snd_soc_dai
*
dai
)
{
struct
sti_uniperiph_data
*
priv
=
snd_soc_dai_get_drvdata
(
dai
);
struct
sti_uniperiph_dai
*
dai_data
=
&
priv
->
dai_data
;
...
...
sound/soc/sti/uniperif.h
View file @
1a4f7965
...
...
@@ -1380,6 +1380,7 @@ int uni_reader_init(struct platform_device *pdev,
struct
uniperif
*
reader
);
/* common */
int
sti_uniperiph_dai_probe
(
struct
snd_soc_dai
*
dai
);
int
sti_uniperiph_dai_set_fmt
(
struct
snd_soc_dai
*
dai
,
unsigned
int
fmt
);
...
...
sound/soc/sti/uniperif_player.c
View file @
1a4f7965
...
...
@@ -1038,6 +1038,7 @@ static const struct snd_soc_dai_ops uni_player_dai_ops = {
.
startup
=
uni_player_startup
,
.
shutdown
=
uni_player_shutdown
,
.
prepare
=
uni_player_prepare
,
.
probe
=
sti_uniperiph_dai_probe
,
.
trigger
=
uni_player_trigger
,
.
hw_params
=
sti_uniperiph_dai_hw_params
,
.
set_fmt
=
sti_uniperiph_dai_set_fmt
,
...
...
sound/soc/sti/uniperif_reader.c
View file @
1a4f7965
...
...
@@ -401,6 +401,7 @@ static const struct snd_soc_dai_ops uni_reader_dai_ops = {
.
startup
=
uni_reader_startup
,
.
shutdown
=
uni_reader_shutdown
,
.
prepare
=
uni_reader_prepare
,
.
probe
=
sti_uniperiph_dai_probe
,
.
trigger
=
uni_reader_trigger
,
.
hw_params
=
sti_uniperiph_dai_hw_params
,
.
set_fmt
=
sti_uniperiph_dai_set_fmt
,
...
...
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