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
aeb2e9c4
Commit
aeb2e9c4
authored
Nov 29, 2022
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
ASoC: Merge up fixes
Merge the fixes branch up so we can apply further AMD work.
parents
863b9179
3d1bb6cc
Changes
35
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
223 additions
and
108 deletions
+223
-108
.mailmap
.mailmap
+1
-0
Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
...ation/devicetree/bindings/sound/google,cros-ec-codec.yaml
+1
-1
Documentation/devicetree/bindings/sound/realtek,rt1015p.yaml
Documentation/devicetree/bindings/sound/realtek,rt1015p.yaml
+1
-1
MAINTAINERS
MAINTAINERS
+1
-1
include/sound/sof/dai.h
include/sound/sof/dai.h
+1
-1
include/sound/sof/info.h
include/sound/sof/info.h
+4
-0
sound/hda/intel-dsp-config.c
sound/hda/intel-dsp-config.c
+5
-0
sound/soc/amd/yc/acp6x-mach.c
sound/soc/amd/yc/acp6x-mach.c
+7
-0
sound/soc/codecs/cs42l51.c
sound/soc/codecs/cs42l51.c
+1
-1
sound/soc/codecs/hdac_hda.h
sound/soc/codecs/hdac_hda.h
+2
-2
sound/soc/codecs/max98373-i2c.c
sound/soc/codecs/max98373-i2c.c
+4
-0
sound/soc/codecs/rt5514-spi.c
sound/soc/codecs/rt5514-spi.c
+8
-7
sound/soc/codecs/rt5677-spi.c
sound/soc/codecs/rt5677-spi.c
+10
-9
sound/soc/codecs/rt711-sdca-sdw.c
sound/soc/codecs/rt711-sdca-sdw.c
+1
-1
sound/soc/codecs/sgtl5000.c
sound/soc/codecs/sgtl5000.c
+1
-0
sound/soc/codecs/tas2764.c
sound/soc/codecs/tas2764.c
+6
-13
sound/soc/codecs/tas2770.c
sound/soc/codecs/tas2770.c
+6
-14
sound/soc/codecs/tas2780.c
sound/soc/codecs/tas2780.c
+6
-13
sound/soc/codecs/tlv320adc3xxx.c
sound/soc/codecs/tlv320adc3xxx.c
+3
-0
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8962.c
+8
-0
sound/soc/fsl/fsl_asrc.c
sound/soc/fsl/fsl_asrc.c
+1
-1
sound/soc/fsl/fsl_esai.c
sound/soc/fsl/fsl_esai.c
+1
-1
sound/soc/fsl/fsl_micfil.c
sound/soc/fsl/fsl_micfil.c
+19
-0
sound/soc/fsl/fsl_sai.c
sound/soc/fsl/fsl_sai.c
+1
-1
sound/soc/intel/boards/bytcht_es8316.c
sound/soc/intel/boards/bytcht_es8316.c
+7
-0
sound/soc/intel/boards/sof_es8336.c
sound/soc/intel/boards/sof_es8336.c
+46
-14
sound/soc/intel/common/soc-acpi-intel-icl-match.c
sound/soc/intel/common/soc-acpi-intel-icl-match.c
+13
-0
sound/soc/soc-core.c
sound/soc/soc-core.c
+15
-2
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+1
-1
sound/soc/soc-ops.c
sound/soc/soc-ops.c
+8
-3
sound/soc/soc-pcm.c
sound/soc/soc-pcm.c
+2
-5
sound/soc/sof/ipc3-topology.c
sound/soc/sof/ipc3-topology.c
+10
-5
sound/soc/sof/topology.c
sound/soc/sof/topology.c
+10
-10
sound/soc/stm/stm32_adfsdm.c
sound/soc/stm/stm32_adfsdm.c
+11
-0
sound/soc/stm/stm32_i2s.c
sound/soc/stm/stm32_i2s.c
+1
-1
No files found.
.mailmap
View file @
aeb2e9c4
...
...
@@ -416,6 +416,7 @@ TripleX Chung <xxx.phy@gmail.com> <triplex@zh-kernel.org>
TripleX Chung <xxx.phy@gmail.com> <zhongyu@18mail.cn>
Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com>
Tycho Andersen <tycho@tycho.pizza> <tycho@tycho.ws>
Tzung-Bi Shih <tzungbi@kernel.org> <tzungbi@google.com>
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Uwe Kleine-König <ukleinek@strlen.de>
...
...
Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
View file @
aeb2e9c4
...
...
@@ -8,7 +8,7 @@ title: Audio codec controlled by ChromeOS EC
maintainers
:
-
Cheng-Yi Chiang <cychiang@chromium.org>
-
Tzung-Bi Shih <tzungbi@
google.com
>
-
Tzung-Bi Shih <tzungbi@
kernel.org
>
description
:
|
Google's ChromeOS EC codec is a digital mic codec provided by the
...
...
Documentation/devicetree/bindings/sound/realtek,rt1015p.yaml
View file @
aeb2e9c4
...
...
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title
:
Realtek rt1015p codec devicetree bindings
maintainers
:
-
Tzung-Bi Shih <tzungbi@
google.com
>
-
Tzung-Bi Shih <tzungbi@
kernel.org
>
description
:
|
Rt1015p is a rt1015 variant which does not support I2C and
...
...
MAINTAINERS
View file @
aeb2e9c4
...
...
@@ -4911,7 +4911,7 @@ F: drivers/platform/chrome/
CHROMEOS EC CODEC DRIVER
M: Cheng-Yi Chiang <cychiang@chromium.org>
M: Tzung-Bi Shih <tzungbi@
google.com
>
M: Tzung-Bi Shih <tzungbi@
kernel.org
>
R: Guenter Roeck <groeck@chromium.org>
L: chrome-platform@lists.linux.dev
S: Maintained
...
...
include/sound/sof/dai.h
View file @
aeb2e9c4
...
...
@@ -84,8 +84,8 @@ enum sof_ipc_dai_type {
SOF_DAI_AMD_BT
,
/**< AMD ACP BT*/
SOF_DAI_AMD_SP
,
/**< AMD ACP SP */
SOF_DAI_AMD_DMIC
,
/**< AMD ACP DMIC */
SOF_DAI_AMD_HS
,
/**< Amd HS */
SOF_DAI_MEDIATEK_AFE
,
/**< Mediatek AFE */
SOF_DAI_AMD_HS
,
/**< Amd HS */
};
/* general purpose DAI configuration */
...
...
include/sound/sof/info.h
View file @
aeb2e9c4
...
...
@@ -36,6 +36,10 @@ enum sof_ipc_ext_data {
SOF_IPC_EXT_USER_ABI_INFO
=
4
,
};
/* Build u32 number in format MMmmmppp */
#define SOF_FW_VER(MAJOR, MINOR, PATCH) ((uint32_t)( \
((MAJOR) << 24) | ((MINOR) << 12) | (PATCH)))
/* FW version - SOF_IPC_GLB_VERSION */
struct
sof_ipc_fw_version
{
struct
sof_ipc_hdr
hdr
;
...
...
sound/hda/intel-dsp-config.c
View file @
aeb2e9c4
...
...
@@ -320,6 +320,11 @@ static const struct config_entry config_table[] = {
{}
}
},
{
.
flags
=
FLAG_SOF
,
.
device
=
0x34c8
,
.
codec_hid
=
&
essx_83x6
,
},
{
.
flags
=
FLAG_SOF
|
FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE
,
.
device
=
0x34c8
,
...
...
sound/soc/amd/yc/acp6x-mach.c
View file @
aeb2e9c4
...
...
@@ -206,6 +206,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"UM5302TA"
),
}
},
{
.
driver_data
=
&
acp6x_card
,
.
matches
=
{
DMI_MATCH
(
DMI_BOARD_VENDOR
,
"Alienware"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Alienware m17 R5 AMD"
),
}
},
{}
};
...
...
sound/soc/codecs/cs42l51.c
View file @
aeb2e9c4
...
...
@@ -143,7 +143,7 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
0
,
0xA0
,
96
,
adc_att_tlv
),
SOC_DOUBLE_R_SX_TLV
(
"PGA Volume"
,
CS42L51_ALC_PGA_CTL
,
CS42L51_ALC_PGB_CTL
,
0
,
0x1
9
,
30
,
pga_tlv
),
0
,
0x1
A
,
30
,
pga_tlv
),
SOC_SINGLE
(
"Playback Deemphasis Switch"
,
CS42L51_DAC_CTL
,
3
,
1
,
0
),
SOC_SINGLE
(
"Auto-Mute Switch"
,
CS42L51_DAC_CTL
,
2
,
1
,
0
),
SOC_SINGLE
(
"Soft Ramp Switch"
,
CS42L51_DAC_CTL
,
1
,
1
,
0
),
...
...
sound/soc/codecs/hdac_hda.h
View file @
aeb2e9c4
...
...
@@ -14,7 +14,7 @@ enum {
HDAC_HDMI_1_DAI_ID
,
HDAC_HDMI_2_DAI_ID
,
HDAC_HDMI_3_DAI_ID
,
HDAC_
LAST_DAI_ID
=
HDAC_HDMI_3_DAI_ID
,
HDAC_
DAI_ID_NUM
};
struct
hdac_hda_pcm
{
...
...
@@ -24,7 +24,7 @@ struct hdac_hda_pcm {
struct
hdac_hda_priv
{
struct
hda_codec
*
codec
;
struct
hdac_hda_pcm
pcm
[
HDAC_
LAST_DAI_ID
];
struct
hdac_hda_pcm
pcm
[
HDAC_
DAI_ID_NUM
];
bool
need_display_power
;
};
...
...
sound/soc/codecs/max98373-i2c.c
View file @
aeb2e9c4
...
...
@@ -549,6 +549,10 @@ static int max98373_i2c_probe(struct i2c_client *i2c)
max98373
->
cache
=
devm_kcalloc
(
&
i2c
->
dev
,
max98373
->
cache_num
,
sizeof
(
*
max98373
->
cache
),
GFP_KERNEL
);
if
(
!
max98373
->
cache
)
{
ret
=
-
ENOMEM
;
return
ret
;
}
for
(
i
=
0
;
i
<
max98373
->
cache_num
;
i
++
)
max98373
->
cache
[
i
].
reg
=
max98373_i2c_cache_reg
[
i
];
...
...
sound/soc/codecs/rt5514-spi.c
View file @
aeb2e9c4
...
...
@@ -298,13 +298,14 @@ static int rt5514_spi_pcm_new(struct snd_soc_component *component,
}
static
const
struct
snd_soc_component_driver
rt5514_spi_component
=
{
.
name
=
DRV_NAME
,
.
probe
=
rt5514_spi_pcm_probe
,
.
open
=
rt5514_spi_pcm_open
,
.
hw_params
=
rt5514_spi_hw_params
,
.
hw_free
=
rt5514_spi_hw_free
,
.
pointer
=
rt5514_spi_pcm_pointer
,
.
pcm_construct
=
rt5514_spi_pcm_new
,
.
name
=
DRV_NAME
,
.
probe
=
rt5514_spi_pcm_probe
,
.
open
=
rt5514_spi_pcm_open
,
.
hw_params
=
rt5514_spi_hw_params
,
.
hw_free
=
rt5514_spi_hw_free
,
.
pointer
=
rt5514_spi_pcm_pointer
,
.
pcm_construct
=
rt5514_spi_pcm_new
,
.
legacy_dai_naming
=
1
,
};
/**
...
...
sound/soc/codecs/rt5677-spi.c
View file @
aeb2e9c4
...
...
@@ -396,15 +396,16 @@ static int rt5677_spi_pcm_probe(struct snd_soc_component *component)
}
static
const
struct
snd_soc_component_driver
rt5677_spi_dai_component
=
{
.
name
=
DRV_NAME
,
.
probe
=
rt5677_spi_pcm_probe
,
.
open
=
rt5677_spi_pcm_open
,
.
close
=
rt5677_spi_pcm_close
,
.
hw_params
=
rt5677_spi_hw_params
,
.
hw_free
=
rt5677_spi_hw_free
,
.
prepare
=
rt5677_spi_prepare
,
.
pointer
=
rt5677_spi_pcm_pointer
,
.
pcm_construct
=
rt5677_spi_pcm_new
,
.
name
=
DRV_NAME
,
.
probe
=
rt5677_spi_pcm_probe
,
.
open
=
rt5677_spi_pcm_open
,
.
close
=
rt5677_spi_pcm_close
,
.
hw_params
=
rt5677_spi_hw_params
,
.
hw_free
=
rt5677_spi_hw_free
,
.
prepare
=
rt5677_spi_prepare
,
.
pointer
=
rt5677_spi_pcm_pointer
,
.
pcm_construct
=
rt5677_spi_pcm_new
,
.
legacy_dai_naming
=
1
,
};
/* Select a suitable transfer command for the next transfer to ensure
...
...
sound/soc/codecs/rt711-sdca-sdw.c
View file @
aeb2e9c4
...
...
@@ -230,7 +230,7 @@ static int rt711_sdca_read_prop(struct sdw_slave *slave)
}
/* set the timeout values */
prop
->
clk_stop_timeout
=
2
0
;
prop
->
clk_stop_timeout
=
70
0
;
/* wake-up event */
prop
->
wake_capable
=
1
;
...
...
sound/soc/codecs/sgtl5000.c
View file @
aeb2e9c4
...
...
@@ -1794,6 +1794,7 @@ static void sgtl5000_i2c_remove(struct i2c_client *client)
{
struct
sgtl5000_priv
*
sgtl5000
=
i2c_get_clientdata
(
client
);
regmap_write
(
sgtl5000
->
regmap
,
SGTL5000_CHIP_CLK_CTRL
,
SGTL5000_CHIP_CLK_CTRL_DEFAULT
);
regmap_write
(
sgtl5000
->
regmap
,
SGTL5000_CHIP_DIG_POWER
,
SGTL5000_DIG_POWER_DEFAULT
);
regmap_write
(
sgtl5000
->
regmap
,
SGTL5000_CHIP_ANA_POWER
,
SGTL5000_ANA_POWER_DEFAULT
);
...
...
sound/soc/codecs/tas2764.c
View file @
aeb2e9c4
...
...
@@ -438,20 +438,13 @@ static int tas2764_set_dai_tdm_slot(struct snd_soc_dai *dai,
if
(
tx_mask
==
0
||
rx_mask
!=
0
)
return
-
EINVAL
;
if
(
slots
==
1
)
{
if
(
tx_mask
!=
1
)
return
-
EINVAL
;
left_slot
=
0
;
right_slot
=
0
;
left_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
left_slot
);
if
(
tx_mask
==
0
)
{
right_slot
=
left_slot
;
}
else
{
left_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
left_slot
);
if
(
tx_mask
==
0
)
{
right_slot
=
left_slot
;
}
else
{
right_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
right_slot
);
}
right_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
right_slot
);
}
if
(
tx_mask
!=
0
||
left_slot
>=
slots
||
right_slot
>=
slots
)
...
...
sound/soc/codecs/tas2770.c
View file @
aeb2e9c4
...
...
@@ -395,21 +395,13 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai,
if
(
tx_mask
==
0
||
rx_mask
!=
0
)
return
-
EINVAL
;
if
(
slots
==
1
)
{
if
(
tx_mask
!=
1
)
return
-
EINVAL
;
left_slot
=
0
;
right_slot
=
0
;
left_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
left_slot
);
if
(
tx_mask
==
0
)
{
right_slot
=
left_slot
;
}
else
{
left_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
left_slot
);
if
(
tx_mask
==
0
)
{
right_slot
=
left_slot
;
}
else
{
right_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
right_slot
);
}
right_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
right_slot
);
}
if
(
tx_mask
!=
0
||
left_slot
>=
slots
||
right_slot
>=
slots
)
...
...
sound/soc/codecs/tas2780.c
View file @
aeb2e9c4
...
...
@@ -380,20 +380,13 @@ static int tas2780_set_dai_tdm_slot(struct snd_soc_dai *dai,
if
(
tx_mask
==
0
||
rx_mask
!=
0
)
return
-
EINVAL
;
if
(
slots
==
1
)
{
if
(
tx_mask
!=
1
)
return
-
EINVAL
;
left_slot
=
0
;
right_slot
=
0
;
left_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
left_slot
);
if
(
tx_mask
==
0
)
{
right_slot
=
left_slot
;
}
else
{
left_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
left_slot
);
if
(
tx_mask
==
0
)
{
right_slot
=
left_slot
;
}
else
{
right_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
right_slot
);
}
right_slot
=
__ffs
(
tx_mask
);
tx_mask
&=
~
(
1
<<
right_slot
);
}
if
(
tx_mask
!=
0
||
left_slot
>=
slots
||
right_slot
>=
slots
)
...
...
sound/soc/codecs/tlv320adc3xxx.c
View file @
aeb2e9c4
...
...
@@ -14,6 +14,7 @@
#include <dt-bindings/sound/tlv320adc3xxx.h>
#include <linux/clk.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/io.h>
...
...
@@ -1025,7 +1026,9 @@ static const struct gpio_chip adc3xxx_gpio_chip = {
static
void
adc3xxx_free_gpio
(
struct
adc3xxx
*
adc3xxx
)
{
#ifdef CONFIG_GPIOLIB
gpiochip_remove
(
&
adc3xxx
->
gpio_chip
);
#endif
}
static
void
adc3xxx_init_gpio
(
struct
adc3xxx
*
adc3xxx
)
...
...
sound/soc/codecs/wm8962.c
View file @
aeb2e9c4
...
...
@@ -2503,6 +2503,14 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
snd_soc_component_update_bits
(
component
,
WM8962_CLOCKING2
,
WM8962_SYSCLK_ENA_MASK
,
WM8962_SYSCLK_ENA
);
/* DSPCLK_DIV field in WM8962_CLOCKING1 register is used to generate
* correct frequency of LRCLK and BCLK. Sometimes the read-only value
* can't be updated timely after enabling SYSCLK. This results in wrong
* calculation values. Delay is introduced here to wait for newest
* value from register. The time of the delay should be at least
* 500~1000us according to test.
*/
usleep_range
(
500
,
1000
);
dspclk
=
snd_soc_component_read
(
component
,
WM8962_CLOCKING1
);
if
(
snd_soc_component_get_bias_level
(
component
)
!=
SND_SOC_BIAS_ON
)
...
...
sound/soc/fsl/fsl_asrc.c
View file @
aeb2e9c4
...
...
@@ -1232,7 +1232,7 @@ static int fsl_asrc_probe(struct platform_device *pdev)
}
ret
=
pm_runtime_put_sync
(
&
pdev
->
dev
);
if
(
ret
<
0
)
if
(
ret
<
0
&&
ret
!=
-
ENOSYS
)
goto
err_pm_get_sync
;
ret
=
devm_snd_soc_register_component
(
&
pdev
->
dev
,
&
fsl_asrc_component
,
...
...
sound/soc/fsl/fsl_esai.c
View file @
aeb2e9c4
...
...
@@ -1069,7 +1069,7 @@ static int fsl_esai_probe(struct platform_device *pdev)
regmap_write
(
esai_priv
->
regmap
,
REG_ESAI_RSMB
,
0
);
ret
=
pm_runtime_put_sync
(
&
pdev
->
dev
);
if
(
ret
<
0
)
if
(
ret
<
0
&&
ret
!=
-
ENOSYS
)
goto
err_pm_get_sync
;
/*
...
...
sound/soc/fsl/fsl_micfil.c
View file @
aeb2e9c4
...
...
@@ -376,6 +376,25 @@ static int fsl_micfil_reset(struct device *dev)
if
(
ret
)
return
ret
;
/*
* SRES is self-cleared bit, but REG_MICFIL_CTRL1 is defined
* as non-volatile register, so SRES still remain in regmap
* cache after set, that every update of REG_MICFIL_CTRL1,
* software reset happens. so clear it explicitly.
*/
ret
=
regmap_clear_bits
(
micfil
->
regmap
,
REG_MICFIL_CTRL1
,
MICFIL_CTRL1_SRES
);
if
(
ret
)
return
ret
;
/*
* Set SRES should clear CHnF flags, But even add delay here
* the CHnF may not be cleared sometimes, so clear CHnF explicitly.
*/
ret
=
regmap_write_bits
(
micfil
->
regmap
,
REG_MICFIL_STAT
,
0xFF
,
0xFF
);
if
(
ret
)
return
ret
;
return
0
;
}
...
...
sound/soc/fsl/fsl_sai.c
View file @
aeb2e9c4
...
...
@@ -1448,7 +1448,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
}
ret
=
pm_runtime_put_sync
(
dev
);
if
(
ret
<
0
)
if
(
ret
<
0
&&
ret
!=
-
ENOSYS
)
goto
err_pm_get_sync
;
/*
...
...
sound/soc/intel/boards/bytcht_es8316.c
View file @
aeb2e9c4
...
...
@@ -443,6 +443,13 @@ static const struct dmi_system_id byt_cht_es8316_quirk_table[] = {
|
BYT_CHT_ES8316_INTMIC_IN2_MAP
|
BYT_CHT_ES8316_JD_INVERTED
),
},
{
/* Nanote UMPC-01 */
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"RWC CO.,LTD"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"UMPC-01"
),
},
.
driver_data
=
(
void
*
)
BYT_CHT_ES8316_INTMIC_IN1_MAP
,
},
{
/* Teclast X98 Plus II */
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"TECLAST"
),
...
...
sound/soc/intel/boards/sof_es8336.c
View file @
aeb2e9c4
...
...
@@ -63,6 +63,7 @@ struct sof_es8336_private {
struct
snd_soc_jack
jack
;
struct
list_head
hdmi_pcm_list
;
bool
speaker_en
;
struct
delayed_work
pcm_pop_work
;
};
struct
sof_hdmi_pcm
{
...
...
@@ -111,6 +112,46 @@ static void log_quirks(struct device *dev)
dev_info
(
dev
,
"quirk headset at mic1 port enabled
\n
"
);
}
static
void
pcm_pop_work_events
(
struct
work_struct
*
work
)
{
struct
sof_es8336_private
*
priv
=
container_of
(
work
,
struct
sof_es8336_private
,
pcm_pop_work
.
work
);
gpiod_set_value_cansleep
(
priv
->
gpio_speakers
,
priv
->
speaker_en
);
if
(
quirk
&
SOF_ES8336_HEADPHONE_GPIO
)
gpiod_set_value_cansleep
(
priv
->
gpio_headphone
,
priv
->
speaker_en
);
}
static
int
sof_8336_trigger
(
struct
snd_pcm_substream
*
substream
,
int
cmd
)
{
struct
snd_soc_pcm_runtime
*
rtd
=
asoc_substream_to_rtd
(
substream
);
struct
snd_soc_card
*
card
=
rtd
->
card
;
struct
sof_es8336_private
*
priv
=
snd_soc_card_get_drvdata
(
card
);
switch
(
cmd
)
{
case
SNDRV_PCM_TRIGGER_START
:
case
SNDRV_PCM_TRIGGER_PAUSE_RELEASE
:
case
SNDRV_PCM_TRIGGER_RESUME
:
break
;
case
SNDRV_PCM_TRIGGER_PAUSE_PUSH
:
case
SNDRV_PCM_TRIGGER_SUSPEND
:
case
SNDRV_PCM_TRIGGER_STOP
:
if
(
priv
->
speaker_en
==
false
)
if
(
substream
->
stream
==
0
)
{
cancel_delayed_work
(
&
priv
->
pcm_pop_work
);
gpiod_set_value_cansleep
(
priv
->
gpio_speakers
,
true
);
}
break
;
default:
return
-
EINVAL
;
}
return
0
;
}
static
int
sof_es8316_speaker_power_event
(
struct
snd_soc_dapm_widget
*
w
,
struct
snd_kcontrol
*
kcontrol
,
int
event
)
{
...
...
@@ -122,19 +163,7 @@ static int sof_es8316_speaker_power_event(struct snd_soc_dapm_widget *w,
priv
->
speaker_en
=
!
SND_SOC_DAPM_EVENT_ON
(
event
);
if
(
SND_SOC_DAPM_EVENT_ON
(
event
))
msleep
(
70
);
gpiod_set_value_cansleep
(
priv
->
gpio_speakers
,
priv
->
speaker_en
);
if
(
!
(
quirk
&
SOF_ES8336_HEADPHONE_GPIO
))
return
0
;
if
(
SND_SOC_DAPM_EVENT_ON
(
event
))
msleep
(
70
);
gpiod_set_value_cansleep
(
priv
->
gpio_headphone
,
priv
->
speaker_en
);
queue_delayed_work
(
system_wq
,
&
priv
->
pcm_pop_work
,
msecs_to_jiffies
(
70
));
return
0
;
}
...
...
@@ -344,6 +373,7 @@ static int sof_es8336_hw_params(struct snd_pcm_substream *substream,
/* machine stream operations */
static
struct
snd_soc_ops
sof_es8336_ops
=
{
.
hw_params
=
sof_es8336_hw_params
,
.
trigger
=
sof_8336_trigger
,
};
static
struct
snd_soc_dai_link_component
platform_component
[]
=
{
...
...
@@ -723,7 +753,8 @@ static int sof_es8336_probe(struct platform_device *pdev)
}
INIT_LIST_HEAD
(
&
priv
->
hdmi_pcm_list
);
INIT_DELAYED_WORK
(
&
priv
->
pcm_pop_work
,
pcm_pop_work_events
);
snd_soc_card_set_drvdata
(
card
,
priv
);
if
(
mach
->
mach_params
.
dmic_num
>
0
)
{
...
...
@@ -752,6 +783,7 @@ static int sof_es8336_remove(struct platform_device *pdev)
struct
snd_soc_card
*
card
=
platform_get_drvdata
(
pdev
);
struct
sof_es8336_private
*
priv
=
snd_soc_card_get_drvdata
(
card
);
cancel_delayed_work
(
&
priv
->
pcm_pop_work
);
gpiod_put
(
priv
->
gpio_speakers
);
device_remove_software_node
(
priv
->
codec_dev
);
put_device
(
priv
->
codec_dev
);
...
...
sound/soc/intel/common/soc-acpi-intel-icl-match.c
View file @
aeb2e9c4
...
...
@@ -10,6 +10,11 @@
#include <sound/soc-acpi-intel-match.h>
#include "../skylake/skl.h"
static
const
struct
snd_soc_acpi_codecs
essx_83x6
=
{
.
num_codecs
=
3
,
.
codecs
=
{
"ESSX8316"
,
"ESSX8326"
,
"ESSX8336"
},
};
static
struct
skl_machine_pdata
icl_pdata
=
{
.
use_tplg_pcm
=
true
,
};
...
...
@@ -27,6 +32,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
.
drv_name
=
"sof_rt5682"
,
.
sof_tplg_filename
=
"sof-icl-rt5682.tplg"
,
},
{
.
comp_ids
=
&
essx_83x6
,
.
drv_name
=
"sof-essx8336"
,
.
sof_tplg_filename
=
"sof-icl-es8336"
,
/* the tplg suffix is added at run time */
.
tplg_quirk_mask
=
SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER
|
SND_SOC_ACPI_TPLG_INTEL_SSP_MSB
|
SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER
,
},
{},
};
EXPORT_SYMBOL_GPL
(
snd_soc_acpi_intel_icl_machines
);
...
...
sound/soc/soc-core.c
View file @
aeb2e9c4
...
...
@@ -3477,10 +3477,23 @@ EXPORT_SYMBOL_GPL(snd_soc_of_get_dai_link_cpus);
static
int
__init
snd_soc_init
(
void
)
{
int
ret
;
snd_soc_debugfs_init
();
snd_soc_util_init
();
ret
=
snd_soc_util_init
();
if
(
ret
)
goto
err_util_init
;
return
platform_driver_register
(
&
soc_driver
);
ret
=
platform_driver_register
(
&
soc_driver
);
if
(
ret
)
goto
err_register
;
return
0
;
err_register:
snd_soc_util_exit
();
err_util_init:
snd_soc_debugfs_exit
();
return
ret
;
}
module_init
(
snd_soc_init
);
...
...
sound/soc/soc-dapm.c
View file @
aeb2e9c4
...
...
@@ -3620,7 +3620,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
switch
(
w
->
id
)
{
case
snd_soc_dapm_regulator_supply
:
w
->
regulator
=
devm_regulator_get
(
dapm
->
dev
,
w
->
name
);
w
->
regulator
=
devm_regulator_get
(
dapm
->
dev
,
w
idget
->
name
);
if
(
IS_ERR
(
w
->
regulator
))
{
ret
=
PTR_ERR
(
w
->
regulator
);
goto
request_failed
;
...
...
sound/soc/soc-ops.c
View file @
aeb2e9c4
...
...
@@ -452,7 +452,7 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
val
=
ucontrol
->
value
.
integer
.
value
[
0
];
if
(
mc
->
platform_max
&&
val
>
mc
->
platform_max
)
return
-
EINVAL
;
if
(
val
>
max
-
min
)
if
(
val
>
max
)
return
-
EINVAL
;
val_mask
=
mask
<<
shift
;
val
=
(
val
+
min
)
&
mask
;
...
...
@@ -464,10 +464,15 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
ret
=
err
;
if
(
snd_soc_volsw_is_stereo
(
mc
))
{
unsigned
int
val2
;
unsigned
int
val2
=
ucontrol
->
value
.
integer
.
value
[
1
];
if
(
mc
->
platform_max
&&
val2
>
mc
->
platform_max
)
return
-
EINVAL
;
if
(
val2
>
max
)
return
-
EINVAL
;
val_mask
=
mask
<<
rshift
;
val2
=
(
ucontrol
->
value
.
integer
.
value
[
1
]
+
min
)
&
mask
;
val2
=
(
val2
+
min
)
&
mask
;
val2
=
val2
<<
rshift
;
err
=
snd_soc_component_update_bits
(
component
,
reg2
,
val_mask
,
...
...
sound/soc/soc-pcm.c
View file @
aeb2e9c4
...
...
@@ -822,11 +822,6 @@ static int __soc_pcm_open(struct snd_soc_pcm_runtime *rtd,
ret
=
snd_soc_dai_startup
(
dai
,
substream
);
if
(
ret
<
0
)
goto
err
;
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
dai
->
tx_mask
=
0
;
else
dai
->
rx_mask
=
0
;
}
/* Dynamic PCM DAI links compat checks use dynamic capabilities */
...
...
@@ -1252,6 +1247,8 @@ static void dpcm_be_reparent(struct snd_soc_pcm_runtime *fe,
return
;
be_substream
=
snd_soc_dpcm_get_substream
(
be
,
stream
);
if
(
!
be_substream
)
return
;
for_each_dpcm_fe
(
be
,
stream
,
dpcm
)
{
if
(
dpcm
->
fe
==
fe
)
...
...
sound/soc/sof/ipc3-topology.c
View file @
aeb2e9c4
...
...
@@ -2275,6 +2275,7 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif
struct
sof_ipc_fw_version
*
v
=
&
sdev
->
fw_ready
.
version
;
struct
snd_sof_widget
*
swidget
;
struct
snd_sof_route
*
sroute
;
bool
dyn_widgets
=
false
;
int
ret
;
/*
...
...
@@ -2284,12 +2285,14 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif
* topology loading the sound card unavailable to open PCMs.
*/
list_for_each_entry
(
swidget
,
&
sdev
->
widget_list
,
list
)
{
if
(
swidget
->
dynamic_pipeline_widget
)
if
(
swidget
->
dynamic_pipeline_widget
)
{
dyn_widgets
=
true
;
continue
;
}
/* Do not free widgets for static pipelines with FW
ABI older than 3.19
*/
/* Do not free widgets for static pipelines with FW
older than SOF2.2
*/
if
(
!
verify
&&
!
swidget
->
dynamic_pipeline_widget
&&
v
->
abi_version
<
SOF_ABI_VER
(
3
,
19
,
0
))
{
SOF_FW_VER
(
v
->
major
,
v
->
minor
,
v
->
micro
)
<
SOF_FW_VER
(
2
,
2
,
0
))
{
swidget
->
use_count
=
0
;
swidget
->
complete
=
0
;
continue
;
...
...
@@ -2303,9 +2306,11 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif
/*
* Tear down all pipelines associated with PCMs that did not get suspended
* and unset the prepare flag so that they can be set up again during resume.
* Skip this step for older firmware.
* Skip this step for older firmware unless topology has any
* dynamic pipeline (in which case the step is mandatory).
*/
if
(
!
verify
&&
v
->
abi_version
>=
SOF_ABI_VER
(
3
,
19
,
0
))
{
if
(
!
verify
&&
(
dyn_widgets
||
SOF_FW_VER
(
v
->
major
,
v
->
minor
,
v
->
micro
)
>=
SOF_FW_VER
(
2
,
2
,
0
)))
{
ret
=
sof_tear_down_left_over_pipelines
(
sdev
);
if
(
ret
<
0
)
{
dev_err
(
sdev
->
dev
,
"failed to tear down paused pipelines
\n
"
);
...
...
sound/soc/sof/topology.c
View file @
aeb2e9c4
...
...
@@ -1499,16 +1499,6 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,
break
;
}
if
(
sof_debug_check_flag
(
SOF_DBG_DISABLE_MULTICORE
))
{
swidget
->
core
=
SOF_DSP_PRIMARY_CORE
;
}
else
{
int
core
=
sof_get_token_value
(
SOF_TKN_COMP_CORE_ID
,
swidget
->
tuples
,
swidget
->
num_tuples
);
if
(
core
>=
0
)
swidget
->
core
=
core
;
}
/* check token parsing reply */
if
(
ret
<
0
)
{
dev_err
(
scomp
->
dev
,
...
...
@@ -1520,6 +1510,16 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,
return
ret
;
}
if
(
sof_debug_check_flag
(
SOF_DBG_DISABLE_MULTICORE
))
{
swidget
->
core
=
SOF_DSP_PRIMARY_CORE
;
}
else
{
int
core
=
sof_get_token_value
(
SOF_TKN_COMP_CORE_ID
,
swidget
->
tuples
,
swidget
->
num_tuples
);
if
(
core
>=
0
)
swidget
->
core
=
core
;
}
/* bind widget to external event */
if
(
tw
->
event_type
)
{
if
(
widget_ops
[
w
->
id
].
bind_event
)
{
...
...
sound/soc/stm/stm32_adfsdm.c
View file @
aeb2e9c4
...
...
@@ -304,6 +304,11 @@ static int stm32_adfsdm_dummy_cb(const void *data, void *private)
return
0
;
}
static
void
stm32_adfsdm_cleanup
(
void
*
data
)
{
iio_channel_release_all_cb
(
data
);
}
static
struct
snd_soc_component_driver
stm32_adfsdm_soc_platform
=
{
.
open
=
stm32_adfsdm_pcm_open
,
.
close
=
stm32_adfsdm_pcm_close
,
...
...
@@ -350,6 +355,12 @@ static int stm32_adfsdm_probe(struct platform_device *pdev)
if
(
IS_ERR
(
priv
->
iio_cb
))
return
PTR_ERR
(
priv
->
iio_cb
);
ret
=
devm_add_action_or_reset
(
&
pdev
->
dev
,
stm32_adfsdm_cleanup
,
priv
->
iio_cb
);
if
(
ret
<
0
)
{
dev_err
(
&
pdev
->
dev
,
"Unable to add action
\n
"
);
return
ret
;
}
component
=
devm_kzalloc
(
&
pdev
->
dev
,
sizeof
(
*
component
),
GFP_KERNEL
);
if
(
!
component
)
return
-
ENOMEM
;
...
...
sound/soc/stm/stm32_i2s.c
View file @
aeb2e9c4
...
...
@@ -1077,7 +1077,7 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev,
if
(
irq
<
0
)
return
irq
;
ret
=
devm_request_irq
(
&
pdev
->
dev
,
irq
,
stm32_i2s_isr
,
IRQF_ONESHOT
,
ret
=
devm_request_irq
(
&
pdev
->
dev
,
irq
,
stm32_i2s_isr
,
0
,
dev_name
(
&
pdev
->
dev
),
i2s
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"irq request returned %d
\n
"
,
ret
);
...
...
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