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
999abd7a
Commit
999abd7a
authored
Jul 11, 2021
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge existing fixes from asoc/for-5.14
parents
e73f0f0e
9cf76a72
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
38 deletions
+60
-38
sound/soc/codecs/Kconfig
sound/soc/codecs/Kconfig
+1
-6
sound/soc/codecs/tlv320aic31xx.h
sound/soc/codecs/tlv320aic31xx.h
+2
-2
sound/soc/codecs/wm_adsp.c
sound/soc/codecs/wm_adsp.c
+4
-2
sound/soc/intel/boards/sof_sdw_max98373.c
sound/soc/intel/boards/sof_sdw_max98373.c
+53
-28
No files found.
sound/soc/codecs/Kconfig
View file @
999abd7a
...
...
@@ -1325,7 +1325,7 @@ config SND_SOC_SSM2305
high-efficiency mono Class-D audio power amplifiers.
config SND_SOC_SSM2518
tristate
tristate
"Analog Devices SSM2518 Class-D Amplifier"
depends on I2C
config SND_SOC_SSM2602
...
...
@@ -1813,11 +1813,6 @@ config SND_SOC_ZL38060
which consists of a Digital Signal Processor (DSP), several Digital
Audio Interfaces (DAIs), analog outputs, and a block of 14 GPIOs.
config SND_SOC_ZX_AUD96P22
tristate "ZTE ZX AUD96P22 CODEC"
depends on I2C
select REGMAP_I2C
# Amp
config SND_SOC_LM4857
tristate
...
...
sound/soc/codecs/tlv320aic31xx.h
View file @
999abd7a
...
...
@@ -151,8 +151,8 @@ struct aic31xx_pdata {
#define AIC31XX_WORD_LEN_24BITS 0x02
#define AIC31XX_WORD_LEN_32BITS 0x03
#define AIC31XX_IFACE1_MASTER_MASK GENMASK(3, 2)
#define AIC31XX_BCLK_MASTER BIT(
2
)
#define AIC31XX_WCLK_MASTER BIT(
3
)
#define AIC31XX_BCLK_MASTER BIT(
3
)
#define AIC31XX_WCLK_MASTER BIT(
2
)
/* AIC31XX_DATA_OFFSET */
#define AIC31XX_DATA_OFFSET_MASK GENMASK(7, 0)
...
...
sound/soc/codecs/wm_adsp.c
View file @
999abd7a
...
...
@@ -282,6 +282,7 @@
/*
* HALO_CCM_CORE_CONTROL
*/
#define HALO_CORE_RESET 0x00000200
#define HALO_CORE_EN 0x00000001
/*
...
...
@@ -1213,7 +1214,7 @@ static int wm_coeff_tlv_get(struct snd_kcontrol *kctl,
mutex_lock
(
&
ctl
->
dsp
->
pwr_lock
);
ret
=
wm_coeff_read_ctrl
_raw
(
ctl
,
ctl
->
cache
,
size
);
ret
=
wm_coeff_read_ctrl
(
ctl
,
ctl
->
cache
,
size
);
if
(
!
ret
&&
copy_to_user
(
bytes
,
ctl
->
cache
,
size
))
ret
=
-
EFAULT
;
...
...
@@ -3333,7 +3334,8 @@ static int wm_halo_start_core(struct wm_adsp *dsp)
{
return
regmap_update_bits
(
dsp
->
regmap
,
dsp
->
base
+
HALO_CCM_CORE_CONTROL
,
HALO_CORE_EN
,
HALO_CORE_EN
);
HALO_CORE_RESET
|
HALO_CORE_EN
,
HALO_CORE_RESET
|
HALO_CORE_EN
);
}
static
void
wm_halo_stop_core
(
struct
wm_adsp
*
dsp
)
...
...
sound/soc/intel/boards/sof_sdw_max98373.c
View file @
999abd7a
...
...
@@ -55,43 +55,68 @@ static int spk_init(struct snd_soc_pcm_runtime *rtd)
return
ret
;
}
static
int
m
ax98373_sdw_trigger
(
struct
snd_pcm_substream
*
substream
,
int
cmd
)
static
int
m
x8373_enable_spk_pin
(
struct
snd_pcm_substream
*
substream
,
bool
enable
)
{
struct
snd_soc_pcm_runtime
*
rtd
=
asoc_substream_to_rtd
(
substream
);
struct
snd_soc_dai
*
codec_dai
;
struct
snd_soc_dai
*
cpu_dai
;
int
ret
;
int
j
;
switch
(
cmd
)
{
case
SNDRV_PCM_TRIGGER_START
:
case
SNDRV_PCM_TRIGGER_RESUME
:
case
SNDRV_PCM_TRIGGER_PAUSE_RELEASE
:
/* enable max98373 first */
ret
=
max_98373_trigger
(
substream
,
cmd
);
if
(
ret
<
0
)
break
;
ret
=
sdw_trigger
(
substream
,
cmd
);
break
;
case
SNDRV_PCM_TRIGGER_STOP
:
case
SNDRV_PCM_TRIGGER_SUSPEND
:
case
SNDRV_PCM_TRIGGER_PAUSE_PUSH
:
ret
=
sdw_trigger
(
substream
,
cmd
);
if
(
ret
<
0
)
break
;
ret
=
max_98373_trigger
(
substream
,
cmd
);
break
;
default:
ret
=
-
EINVAL
;
break
;
/* set spk pin by playback only */
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_CAPTURE
)
return
0
;
cpu_dai
=
asoc_rtd_to_cpu
(
rtd
,
0
);
for_each_rtd_codec_dais
(
rtd
,
j
,
codec_dai
)
{
struct
snd_soc_dapm_context
*
dapm
=
snd_soc_component_get_dapm
(
cpu_dai
->
component
);
char
pin_name
[
16
];
snprintf
(
pin_name
,
ARRAY_SIZE
(
pin_name
),
"%s Spk"
,
codec_dai
->
component
->
name_prefix
);
if
(
enable
)
ret
=
snd_soc_dapm_enable_pin
(
dapm
,
pin_name
);
else
ret
=
snd_soc_dapm_disable_pin
(
dapm
,
pin_name
);
if
(
!
ret
)
snd_soc_dapm_sync
(
dapm
);
}
return
ret
;
return
0
;
}
static
int
mx8373_sdw_prepare
(
struct
snd_pcm_substream
*
substream
)
{
int
ret
=
0
;
/* according to soc_pcm_prepare dai link prepare is called first */
ret
=
sdw_prepare
(
substream
);
if
(
ret
<
0
)
return
ret
;
return
mx8373_enable_spk_pin
(
substream
,
true
);
}
static
int
mx8373_sdw_hw_free
(
struct
snd_pcm_substream
*
substream
)
{
int
ret
=
0
;
/* according to soc_pcm_hw_free dai link free is called first */
ret
=
sdw_hw_free
(
substream
);
if
(
ret
<
0
)
return
ret
;
return
mx8373_enable_spk_pin
(
substream
,
false
);
}
static
const
struct
snd_soc_ops
max_98373_sdw_ops
=
{
.
startup
=
sdw_startup
,
.
prepare
=
sdw_prepare
,
.
trigger
=
max98373_
sdw_trigger
,
.
hw_free
=
sdw_hw_free
,
.
prepare
=
mx8373_
sdw_prepare
,
.
trigger
=
sdw_trigger
,
.
hw_free
=
mx8373_
sdw_hw_free
,
.
shutdown
=
sdw_shutdown
,
};
...
...
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