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
cfee987c
Commit
cfee987c
authored
Aug 17, 2023
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
ASoC: Merge up fixes
For the benefit of CI.
parents
44cb08fd
ab0b5072
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
114 additions
and
45 deletions
+114
-45
MAINTAINERS
MAINTAINERS
+33
-0
sound/soc/codecs/cs35l56-i2c.c
sound/soc/codecs/cs35l56-i2c.c
+9
-0
sound/soc/codecs/cs35l56-spi.c
sound/soc/codecs/cs35l56-spi.c
+9
-0
sound/soc/codecs/cs35l56.c
sound/soc/codecs/cs35l56.c
+12
-19
sound/soc/codecs/rt1308-sdw.c
sound/soc/codecs/rt1308-sdw.c
+12
-1
sound/soc/codecs/tas2781-comlib.c
sound/soc/codecs/tas2781-comlib.c
+10
-9
sound/soc/meson/axg-tdm-formatter.c
sound/soc/meson/axg-tdm-formatter.c
+26
-16
sound/soc/sof/ipc4-pcm.c
sound/soc/sof/ipc4-pcm.c
+3
-0
No files found.
MAINTAINERS
View file @
cfee987c
...
...
@@ -21063,6 +21063,39 @@ S: Maintained
F: Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml
F: sound/soc/ti/
TEXAS INSTRUMENTS AUDIO (ASoC/HDA) DRIVERS
M: Shenghao Ding <shenghao-ding@ti.com>
M: Kevin Lu <kevin-lu@ti.com>
M: Baojun Xu <x1077012@ti.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/sound/tas2552.txt
F: Documentation/devicetree/bindings/sound/tas2562.yaml
F: Documentation/devicetree/bindings/sound/tas2770.yaml
F: Documentation/devicetree/bindings/sound/tas27xx.yaml
F: Documentation/devicetree/bindings/sound/ti,pcm1681.txt
F: Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
F: Documentation/devicetree/bindings/sound/ti,tlv320*.yaml
F: Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
F: Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
F: Documentation/devicetree/bindings/sound/tpa6130a2.txt
F: include/sound/tas2*.h
F: include/sound/tlv320*.h
F: include/sound/tpa6130a2-plat.h
F: sound/pci/hda/tas2781_hda_i2c.c
F: sound/soc/codecs/pcm1681.c
F: sound/soc/codecs/pcm1789*.*
F: sound/soc/codecs/pcm179x*.*
F: sound/soc/codecs/pcm186x*.*
F: sound/soc/codecs/pcm3008.*
F: sound/soc/codecs/pcm3060*.*
F: sound/soc/codecs/pcm3168a*.*
F: sound/soc/codecs/pcm5102a.c
F: sound/soc/codecs/pcm512x*.*
F: sound/soc/codecs/tas2*.*
F: sound/soc/codecs/tlv320*.*
F: sound/soc/codecs/tpa6130a2.*
TEXAS INSTRUMENTS DMA DRIVERS
M: Peter Ujfalusi <peter.ujfalusi@gmail.com>
L: dmaengine@vger.kernel.org
...
...
sound/soc/codecs/cs35l56-i2c.c
View file @
cfee987c
...
...
@@ -62,10 +62,19 @@ static const struct i2c_device_id cs35l56_id_i2c[] = {
};
MODULE_DEVICE_TABLE
(
i2c
,
cs35l56_id_i2c
);
#ifdef CONFIG_ACPI
static
const
struct
acpi_device_id
cs35l56_asoc_acpi_match
[]
=
{
{
"CSC355C"
,
0
},
{},
};
MODULE_DEVICE_TABLE
(
acpi
,
cs35l56_asoc_acpi_match
);
#endif
static
struct
i2c_driver
cs35l56_i2c_driver
=
{
.
driver
=
{
.
name
=
"cs35l56"
,
.
pm
=
&
cs35l56_pm_ops_i2c_spi
,
.
acpi_match_table
=
ACPI_PTR
(
cs35l56_asoc_acpi_match
),
},
.
id_table
=
cs35l56_id_i2c
,
.
probe
=
cs35l56_i2c_probe
,
...
...
sound/soc/codecs/cs35l56-spi.c
View file @
cfee987c
...
...
@@ -59,10 +59,19 @@ static const struct spi_device_id cs35l56_id_spi[] = {
};
MODULE_DEVICE_TABLE
(
spi
,
cs35l56_id_spi
);
#ifdef CONFIG_ACPI
static
const
struct
acpi_device_id
cs35l56_asoc_acpi_match
[]
=
{
{
"CSC355C"
,
0
},
{},
};
MODULE_DEVICE_TABLE
(
acpi
,
cs35l56_asoc_acpi_match
);
#endif
static
struct
spi_driver
cs35l56_spi_driver
=
{
.
driver
=
{
.
name
=
"cs35l56"
,
.
pm
=
&
cs35l56_pm_ops_i2c_spi
,
.
acpi_match_table
=
ACPI_PTR
(
cs35l56_asoc_acpi_match
),
},
.
id_table
=
cs35l56_id_spi
,
.
probe
=
cs35l56_spi_probe
,
...
...
sound/soc/codecs/cs35l56.c
View file @
cfee987c
...
...
@@ -5,7 +5,6 @@
// Copyright (C) 2023 Cirrus Logic, Inc. and
// Cirrus Logic International Semiconductor Ltd.
#include <linux/acpi.h>
#include <linux/completion.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
...
...
@@ -1029,26 +1028,22 @@ static int cs35l56_dsp_init(struct cs35l56_private *cs35l56)
return
0
;
}
static
int
cs35l56_
acpi_get_name
(
struct
cs35l56_private
*
cs35l56
)
static
int
cs35l56_
get_firmware_uid
(
struct
cs35l56_private
*
cs35l56
)
{
acpi_handle
handle
=
ACPI_HANDLE
(
cs35l56
->
base
.
dev
);
const
char
*
sub
;
struct
device
*
dev
=
cs35l56
->
base
.
dev
;
const
char
*
prop
;
int
ret
;
/* If there is no ACPI_HANDLE, there is no ACPI for this system, return 0 */
if
(
!
handle
)
ret
=
device_property_read_string
(
dev
,
"cirrus,firmware-uid"
,
&
prop
);
/* If bad sw node property, return 0 and fallback to legacy firmware path */
if
(
ret
<
0
)
return
0
;
sub
=
acpi_get_subsystem_id
(
handle
);
if
(
IS_ERR
(
sub
))
{
/* If bad ACPI, return 0 and fallback to legacy firmware path, otherwise fail */
if
(
PTR_ERR
(
sub
)
==
-
ENODATA
)
return
0
;
else
return
PTR_ERR
(
sub
);
}
cs35l56
->
dsp
.
system_name
=
devm_kstrdup
(
dev
,
prop
,
GFP_KERNEL
);
if
(
cs35l56
->
dsp
.
system_name
==
NULL
)
return
-
ENOMEM
;
cs35l56
->
dsp
.
system_name
=
sub
;
dev_dbg
(
cs35l56
->
base
.
dev
,
"Subsystem ID: %s
\n
"
,
cs35l56
->
dsp
.
system_name
);
dev_dbg
(
dev
,
"Firmware UID: %s
\n
"
,
cs35l56
->
dsp
.
system_name
);
return
0
;
}
...
...
@@ -1095,7 +1090,7 @@ int cs35l56_common_probe(struct cs35l56_private *cs35l56)
gpiod_set_value_cansleep
(
cs35l56
->
base
.
reset_gpio
,
1
);
}
ret
=
cs35l56_
acpi_get_name
(
cs35l56
);
ret
=
cs35l56_
get_firmware_uid
(
cs35l56
);
if
(
ret
!=
0
)
goto
err
;
...
...
@@ -1217,8 +1212,6 @@ void cs35l56_remove(struct cs35l56_private *cs35l56)
regcache_cache_only
(
cs35l56
->
base
.
regmap
,
true
);
kfree
(
cs35l56
->
dsp
.
system_name
);
gpiod_set_value_cansleep
(
cs35l56
->
base
.
reset_gpio
,
0
);
regulator_bulk_disable
(
ARRAY_SIZE
(
cs35l56
->
supplies
),
cs35l56
->
supplies
);
}
...
...
sound/soc/codecs/rt1308-sdw.c
View file @
cfee987c
...
...
@@ -52,6 +52,7 @@ static bool rt1308_volatile_register(struct device *dev, unsigned int reg)
case
0x300a
:
case
0xc000
:
case
0xc710
:
case
0xcf01
:
case
0xc860
...
0xc863
:
case
0xc870
...
0xc873
:
return
true
;
...
...
@@ -213,7 +214,7 @@ static int rt1308_io_init(struct device *dev, struct sdw_slave *slave)
{
struct
rt1308_sdw_priv
*
rt1308
=
dev_get_drvdata
(
dev
);
int
ret
=
0
;
unsigned
int
tmp
;
unsigned
int
tmp
,
hibernation_flag
;
if
(
rt1308
->
hw_init
)
return
0
;
...
...
@@ -231,6 +232,10 @@ static int rt1308_io_init(struct device *dev, struct sdw_slave *slave)
pm_runtime_get_noresume
(
&
slave
->
dev
);
regmap_read
(
rt1308
->
regmap
,
0xcf01
,
&
hibernation_flag
);
if
((
hibernation_flag
!=
0x00
)
&&
rt1308
->
first_hw_init
)
goto
_preset_ready_
;
/* sw reset */
regmap_write
(
rt1308
->
regmap
,
RT1308_SDW_RESET
,
0
);
...
...
@@ -271,6 +276,12 @@ static int rt1308_io_init(struct device *dev, struct sdw_slave *slave)
regmap_write
(
rt1308
->
regmap
,
0xc100
,
0xd7
);
regmap_write
(
rt1308
->
regmap
,
0xc101
,
0xd7
);
/* apply BQ params */
rt1308_apply_bq_params
(
rt1308
);
regmap_write
(
rt1308
->
regmap
,
0xcf01
,
0x01
);
_preset_ready_:
if
(
rt1308
->
first_hw_init
)
{
regcache_cache_bypass
(
rt1308
->
regmap
,
false
);
regcache_mark_dirty
(
rt1308
->
regmap
);
...
...
sound/soc/codecs/tas2781-comlib.c
View file @
cfee987c
...
...
@@ -57,16 +57,17 @@ static int tasdevice_change_chn_book(struct tasdevice_priv *tas_priv,
if
(
client
->
addr
!=
tasdev
->
dev_addr
)
{
client
->
addr
=
tasdev
->
dev_addr
;
if
(
tasdev
->
cur_book
==
book
)
{
ret
=
regmap_write
(
map
,
TASDEVICE_PAGE_SELECT
,
0
);
if
(
ret
<
0
)
{
dev_err
(
tas_priv
->
dev
,
"%s, E=%d
\n
"
,
__func__
,
ret
);
goto
out
;
}
/* All tas2781s share the same regmap, clear the page
* inside regmap once switching to another tas2781.
* Register 0 at any pages and any books inside tas2781
* is the same one for page-switching.
*/
ret
=
regmap_write
(
map
,
TASDEVICE_PAGE_SELECT
,
0
);
if
(
ret
<
0
)
{
dev_err
(
tas_priv
->
dev
,
"%s, E=%d
\n
"
,
__func__
,
ret
);
goto
out
;
}
goto
out
;
}
if
(
tasdev
->
cur_book
!=
book
)
{
...
...
sound/soc/meson/axg-tdm-formatter.c
View file @
cfee987c
...
...
@@ -30,27 +30,32 @@ int axg_tdm_formatter_set_channel_masks(struct regmap *map,
struct
axg_tdm_stream
*
ts
,
unsigned
int
offset
)
{
unsigned
int
val
,
ch
=
ts
->
channels
;
unsigned
long
mask
;
int
i
,
j
;
unsigned
int
ch
=
ts
->
channels
;
u32
val
[
AXG_TDM_NUM_LANES
];
int
i
,
j
,
k
;
/*
* We need to mimick the slot distribution used by the HW to keep the
* channel placement consistent regardless of the number of channel
* in the stream. This is why the odd algorithm below is used.
*/
memset
(
val
,
0
,
sizeof
(
*
val
)
*
AXG_TDM_NUM_LANES
);
/*
* Distribute the channels of the stream over the available slots
* of each TDM lane
* of each TDM lane
. We need to go over the 32 slots ...
*/
for
(
i
=
0
;
i
<
AXG_TDM_NUM_LANES
;
i
++
)
{
val
=
0
;
mask
=
ts
->
mask
[
i
];
for
(
j
=
find_first_bit
(
&
mask
,
32
);
(
j
<
32
)
&&
ch
;
j
=
find_next_bit
(
&
mask
,
32
,
j
+
1
))
{
val
|=
1
<<
j
;
ch
-=
1
;
for
(
i
=
0
;
(
i
<
32
)
&&
ch
;
i
+=
2
)
{
/* ... of all the lanes ... */
for
(
j
=
0
;
j
<
AXG_TDM_NUM_LANES
;
j
++
)
{
/* ... then distribute the channels in pairs */
for
(
k
=
0
;
k
<
2
;
k
++
)
{
if
((
BIT
(
i
+
k
)
&
ts
->
mask
[
j
])
&&
ch
)
{
val
[
j
]
|=
BIT
(
i
+
k
);
ch
-=
1
;
}
}
}
regmap_write
(
map
,
offset
,
val
);
offset
+=
regmap_get_reg_stride
(
map
);
}
/*
...
...
@@ -63,6 +68,11 @@ int axg_tdm_formatter_set_channel_masks(struct regmap *map,
return
-
EINVAL
;
}
for
(
i
=
0
;
i
<
AXG_TDM_NUM_LANES
;
i
++
)
{
regmap_write
(
map
,
offset
,
val
[
i
]);
offset
+=
regmap_get_reg_stride
(
map
);
}
return
0
;
}
EXPORT_SYMBOL_GPL
(
axg_tdm_formatter_set_channel_masks
);
...
...
sound/soc/sof/ipc4-pcm.c
View file @
cfee987c
...
...
@@ -709,6 +709,9 @@ static int sof_ipc4_pcm_hw_params(struct snd_soc_component *component,
struct
snd_sof_pcm
*
spcm
;
spcm
=
snd_sof_find_spcm_dai
(
component
,
rtd
);
if
(
!
spcm
)
return
-
EINVAL
;
time_info
=
spcm
->
stream
[
substream
->
stream
].
private
;
/* delay calculation is not supported by current fw_reg ABI */
if
(
!
time_info
)
...
...
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