Skip to content

Commit 196f4ee

Browse files
committed
Merge tag 'asoc-v4.19-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.19 This is the usual set of small fixes scatterd around various drivers, plus one fix for DAPM and a UAPI build fix. There's not a huge amount that stands out here relative to anything else.
2 parents c3b55e2 + 75383f8 commit 196f4ee

File tree

24 files changed

+208
-87
lines changed

24 files changed

+208
-87
lines changed

MAINTAINERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13432,9 +13432,8 @@ F: drivers/i2c/busses/i2c-synquacer.c
1343213432
F: Documentation/devicetree/bindings/i2c/i2c-synquacer.txt
1343313433

1343413434
SOCIONEXT UNIPHIER SOUND DRIVER
13435-
M: Katsuhiro Suzuki <[email protected]>
1343613435
L: [email protected] (moderated for non-subscribers)
13437-
S: Maintained
13436+
S: Orphan
1343813437
F: sound/soc/uniphier/
1343913438

1344013439
SOEKRIS NET48XX LED SUPPORT

include/sound/hdaudio.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ void snd_hdac_bus_init_cmd_io(struct hdac_bus *bus);
412412
void snd_hdac_bus_stop_cmd_io(struct hdac_bus *bus);
413413
void snd_hdac_bus_enter_link_reset(struct hdac_bus *bus);
414414
void snd_hdac_bus_exit_link_reset(struct hdac_bus *bus);
415+
int snd_hdac_bus_reset_link(struct hdac_bus *bus, bool full_reset);
415416

416417
void snd_hdac_bus_update_rirb(struct hdac_bus *bus);
417418
int snd_hdac_bus_handle_stream_irq(struct hdac_bus *bus, unsigned int status,

include/sound/soc-dapm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
407407
int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card);
408408
void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card);
409409
int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
410+
struct snd_soc_pcm_runtime *rtd,
410411
const struct snd_soc_pcm_stream *params,
411412
unsigned int num_params,
412413
struct snd_soc_dapm_widget *source,

include/uapi/sound/skl-tplg-interface.h

Lines changed: 54 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef __HDA_TPLG_INTERFACE_H__
1111
#define __HDA_TPLG_INTERFACE_H__
1212

13+
#include <linux/types.h>
14+
1315
/*
1416
* Default types range from 0~12. type can range from 0 to 0xff
1517
* SST types start at higher to avoid any overlapping in future
@@ -143,10 +145,10 @@ enum skl_module_param_type {
143145
};
144146

145147
struct skl_dfw_algo_data {
146-
u32 set_params:2;
147-
u32 rsvd:30;
148-
u32 param_id;
149-
u32 max;
148+
__u32 set_params:2;
149+
__u32 rsvd:30;
150+
__u32 param_id;
151+
__u32 max;
150152
char params[0];
151153
} __packed;
152154

@@ -163,68 +165,68 @@ enum skl_tuple_type {
163165
/* v4 configuration data */
164166

165167
struct skl_dfw_v4_module_pin {
166-
u16 module_id;
167-
u16 instance_id;
168+
__u16 module_id;
169+
__u16 instance_id;
168170
} __packed;
169171

170172
struct skl_dfw_v4_module_fmt {
171-
u32 channels;
172-
u32 freq;
173-
u32 bit_depth;
174-
u32 valid_bit_depth;
175-
u32 ch_cfg;
176-
u32 interleaving_style;
177-
u32 sample_type;
178-
u32 ch_map;
173+
__u32 channels;
174+
__u32 freq;
175+
__u32 bit_depth;
176+
__u32 valid_bit_depth;
177+
__u32 ch_cfg;
178+
__u32 interleaving_style;
179+
__u32 sample_type;
180+
__u32 ch_map;
179181
} __packed;
180182

181183
struct skl_dfw_v4_module_caps {
182-
u32 set_params:2;
183-
u32 rsvd:30;
184-
u32 param_id;
185-
u32 caps_size;
186-
u32 caps[HDA_SST_CFG_MAX];
184+
__u32 set_params:2;
185+
__u32 rsvd:30;
186+
__u32 param_id;
187+
__u32 caps_size;
188+
__u32 caps[HDA_SST_CFG_MAX];
187189
} __packed;
188190

189191
struct skl_dfw_v4_pipe {
190-
u8 pipe_id;
191-
u8 pipe_priority;
192-
u16 conn_type:4;
193-
u16 rsvd:4;
194-
u16 memory_pages:8;
192+
__u8 pipe_id;
193+
__u8 pipe_priority;
194+
__u16 conn_type:4;
195+
__u16 rsvd:4;
196+
__u16 memory_pages:8;
195197
} __packed;
196198

197199
struct skl_dfw_v4_module {
198200
char uuid[SKL_UUID_STR_SZ];
199201

200-
u16 module_id;
201-
u16 instance_id;
202-
u32 max_mcps;
203-
u32 mem_pages;
204-
u32 obs;
205-
u32 ibs;
206-
u32 vbus_id;
207-
208-
u32 max_in_queue:8;
209-
u32 max_out_queue:8;
210-
u32 time_slot:8;
211-
u32 core_id:4;
212-
u32 rsvd1:4;
213-
214-
u32 module_type:8;
215-
u32 conn_type:4;
216-
u32 dev_type:4;
217-
u32 hw_conn_type:4;
218-
u32 rsvd2:12;
219-
220-
u32 params_fixup:8;
221-
u32 converter:8;
222-
u32 input_pin_type:1;
223-
u32 output_pin_type:1;
224-
u32 is_dynamic_in_pin:1;
225-
u32 is_dynamic_out_pin:1;
226-
u32 is_loadable:1;
227-
u32 rsvd3:11;
202+
__u16 module_id;
203+
__u16 instance_id;
204+
__u32 max_mcps;
205+
__u32 mem_pages;
206+
__u32 obs;
207+
__u32 ibs;
208+
__u32 vbus_id;
209+
210+
__u32 max_in_queue:8;
211+
__u32 max_out_queue:8;
212+
__u32 time_slot:8;
213+
__u32 core_id:4;
214+
__u32 rsvd1:4;
215+
216+
__u32 module_type:8;
217+
__u32 conn_type:4;
218+
__u32 dev_type:4;
219+
__u32 hw_conn_type:4;
220+
__u32 rsvd2:12;
221+
222+
__u32 params_fixup:8;
223+
__u32 converter:8;
224+
__u32 input_pin_type:1;
225+
__u32 output_pin_type:1;
226+
__u32 is_dynamic_in_pin:1;
227+
__u32 is_dynamic_out_pin:1;
228+
__u32 is_loadable:1;
229+
__u32 rsvd3:11;
228230

229231
struct skl_dfw_v4_pipe pipe;
230232
struct skl_dfw_v4_module_fmt in_fmt[MAX_IN_QUEUE];

sound/hda/hdac_controller.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ static void azx_clear_corbrp(struct hdac_bus *bus)
4040
*/
4141
void snd_hdac_bus_init_cmd_io(struct hdac_bus *bus)
4242
{
43+
WARN_ON_ONCE(!bus->rb.area);
44+
4345
spin_lock_irq(&bus->reg_lock);
4446
/* CORB set up */
4547
bus->corb.addr = bus->rb.addr;
@@ -383,7 +385,7 @@ void snd_hdac_bus_exit_link_reset(struct hdac_bus *bus)
383385
EXPORT_SYMBOL_GPL(snd_hdac_bus_exit_link_reset);
384386

385387
/* reset codec link */
386-
static int azx_reset(struct hdac_bus *bus, bool full_reset)
388+
int snd_hdac_bus_reset_link(struct hdac_bus *bus, bool full_reset)
387389
{
388390
if (!full_reset)
389391
goto skip_reset;
@@ -408,7 +410,7 @@ static int azx_reset(struct hdac_bus *bus, bool full_reset)
408410
skip_reset:
409411
/* check to see if controller is ready */
410412
if (!snd_hdac_chip_readb(bus, GCTL)) {
411-
dev_dbg(bus->dev, "azx_reset: controller not ready!\n");
413+
dev_dbg(bus->dev, "controller not ready!\n");
412414
return -EBUSY;
413415
}
414416

@@ -423,6 +425,7 @@ static int azx_reset(struct hdac_bus *bus, bool full_reset)
423425

424426
return 0;
425427
}
428+
EXPORT_SYMBOL_GPL(snd_hdac_bus_reset_link);
426429

427430
/* enable interrupts */
428431
static void azx_int_enable(struct hdac_bus *bus)
@@ -477,15 +480,17 @@ bool snd_hdac_bus_init_chip(struct hdac_bus *bus, bool full_reset)
477480
return false;
478481

479482
/* reset controller */
480-
azx_reset(bus, full_reset);
483+
snd_hdac_bus_reset_link(bus, full_reset);
481484

482-
/* initialize interrupts */
485+
/* clear interrupts */
483486
azx_int_clear(bus);
484-
azx_int_enable(bus);
485487

486488
/* initialize the codec command I/O */
487489
snd_hdac_bus_init_cmd_io(bus);
488490

491+
/* enable interrupts after CORB/RIRB buffers are initialized above */
492+
azx_int_enable(bus);
493+
489494
/* program the position buffer */
490495
if (bus->use_posbuf && bus->posbuf.addr) {
491496
snd_hdac_chip_writel(bus, DPLBASE, (u32)bus->posbuf.addr);

sound/soc/amd/acp-pcm-dma.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/module.h>
1717
#include <linux/delay.h>
1818
#include <linux/io.h>
19+
#include <linux/iopoll.h>
1920
#include <linux/sizes.h>
2021
#include <linux/pm_runtime.h>
2122

@@ -184,6 +185,24 @@ static void config_dma_descriptor_in_sram(void __iomem *acp_mmio,
184185
acp_reg_write(descr_info->xfer_val, acp_mmio, mmACP_SRBM_Targ_Idx_Data);
185186
}
186187

188+
static void pre_config_reset(void __iomem *acp_mmio, u16 ch_num)
189+
{
190+
u32 dma_ctrl;
191+
int ret;
192+
193+
/* clear the reset bit */
194+
dma_ctrl = acp_reg_read(acp_mmio, mmACP_DMA_CNTL_0 + ch_num);
195+
dma_ctrl &= ~ACP_DMA_CNTL_0__DMAChRst_MASK;
196+
acp_reg_write(dma_ctrl, acp_mmio, mmACP_DMA_CNTL_0 + ch_num);
197+
/* check the reset bit before programming configuration registers */
198+
ret = readl_poll_timeout(acp_mmio + ((mmACP_DMA_CNTL_0 + ch_num) * 4),
199+
dma_ctrl,
200+
!(dma_ctrl & ACP_DMA_CNTL_0__DMAChRst_MASK),
201+
100, ACP_DMA_RESET_TIME);
202+
if (ret < 0)
203+
pr_err("Failed to clear reset of channel : %d\n", ch_num);
204+
}
205+
187206
/*
188207
* Initialize the DMA descriptor information for transfer between
189208
* system memory <-> ACP SRAM
@@ -236,6 +255,7 @@ static void set_acp_sysmem_dma_descriptors(void __iomem *acp_mmio,
236255
config_dma_descriptor_in_sram(acp_mmio, dma_dscr_idx,
237256
&dmadscr[i]);
238257
}
258+
pre_config_reset(acp_mmio, ch);
239259
config_acp_dma_channel(acp_mmio, ch,
240260
dma_dscr_idx - 1,
241261
NUM_DSCRS_PER_CHANNEL,
@@ -275,6 +295,7 @@ static void set_acp_to_i2s_dma_descriptors(void __iomem *acp_mmio, u32 size,
275295
config_dma_descriptor_in_sram(acp_mmio, dma_dscr_idx,
276296
&dmadscr[i]);
277297
}
298+
pre_config_reset(acp_mmio, ch);
278299
/* Configure the DMA channel with the above descriptore */
279300
config_acp_dma_channel(acp_mmio, ch, dma_dscr_idx - 1,
280301
NUM_DSCRS_PER_CHANNEL,

sound/soc/codecs/cs4265.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ static const struct snd_kcontrol_new cs4265_snd_controls[] = {
157157
SOC_SINGLE("Validity Bit Control Switch", CS4265_SPDIF_CTL2,
158158
3, 1, 0),
159159
SOC_ENUM("SPDIF Mono/Stereo", spdif_mono_stereo_enum),
160-
SOC_SINGLE("MMTLR Data Switch", 0,
161-
1, 1, 0),
160+
SOC_SINGLE("MMTLR Data Switch", CS4265_SPDIF_CTL2,
161+
0, 1, 0),
162162
SOC_ENUM("Mono Channel Select", spdif_mono_select_enum),
163163
SND_SOC_BYTES("C Data Buffer", CS4265_C_DATA_BUFF, 24),
164164
};

sound/soc/codecs/max98373.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ static bool max98373_volatile_reg(struct device *dev, unsigned int reg)
520520
{
521521
switch (reg) {
522522
case MAX98373_R2000_SW_RESET ... MAX98373_R2009_INT_FLAG3:
523+
case MAX98373_R203E_AMP_PATH_GAIN:
523524
case MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK:
524525
case MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK:
525526
case MAX98373_R20B6_BDE_CUR_STATE_READBACK:
@@ -729,6 +730,7 @@ static int max98373_probe(struct snd_soc_component *component)
729730
/* Software Reset */
730731
regmap_write(max98373->regmap,
731732
MAX98373_R2000_SW_RESET, MAX98373_SOFT_RESET);
733+
usleep_range(10000, 11000);
732734

733735
/* IV default slot configuration */
734736
regmap_write(max98373->regmap,
@@ -817,6 +819,7 @@ static int max98373_resume(struct device *dev)
817819

818820
regmap_write(max98373->regmap,
819821
MAX98373_R2000_SW_RESET, MAX98373_SOFT_RESET);
822+
usleep_range(10000, 11000);
820823
regcache_cache_only(max98373->regmap, false);
821824
regcache_sync(max98373->regmap);
822825
return 0;

sound/soc/codecs/rt5514.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ static const struct reg_sequence rt5514_patch[] = {
6464
{RT5514_ANA_CTRL_LDO10, 0x00028604},
6565
{RT5514_ANA_CTRL_ADCFED, 0x00000800},
6666
{RT5514_ASRC_IN_CTRL1, 0x00000003},
67-
{RT5514_DOWNFILTER0_CTRL3, 0x10000352},
68-
{RT5514_DOWNFILTER1_CTRL3, 0x10000352},
67+
{RT5514_DOWNFILTER0_CTRL3, 0x10000342},
68+
{RT5514_DOWNFILTER1_CTRL3, 0x10000342},
6969
};
7070

7171
static const struct reg_default rt5514_reg[] = {
@@ -92,10 +92,10 @@ static const struct reg_default rt5514_reg[] = {
9292
{RT5514_ASRC_IN_CTRL1, 0x00000003},
9393
{RT5514_DOWNFILTER0_CTRL1, 0x00020c2f},
9494
{RT5514_DOWNFILTER0_CTRL2, 0x00020c2f},
95-
{RT5514_DOWNFILTER0_CTRL3, 0x10000352},
95+
{RT5514_DOWNFILTER0_CTRL3, 0x10000342},
9696
{RT5514_DOWNFILTER1_CTRL1, 0x00020c2f},
9797
{RT5514_DOWNFILTER1_CTRL2, 0x00020c2f},
98-
{RT5514_DOWNFILTER1_CTRL3, 0x10000352},
98+
{RT5514_DOWNFILTER1_CTRL3, 0x10000342},
9999
{RT5514_ANA_CTRL_LDO10, 0x00028604},
100100
{RT5514_ANA_CTRL_LDO18_16, 0x02000345},
101101
{RT5514_ANA_CTRL_ADC12, 0x0000a2a8},

sound/soc/codecs/rt5682.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,8 @@ static bool rt5682_readable_register(struct device *dev, unsigned int reg)
750750
}
751751

752752
static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2250, 150, 0);
753-
static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0);
754-
static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0);
753+
static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -6525, 75, 0);
754+
static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -1725, 75, 0);
755755
static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);
756756

757757
/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */
@@ -1114,7 +1114,7 @@ static const struct snd_kcontrol_new rt5682_snd_controls[] = {
11141114

11151115
/* DAC Digital Volume */
11161116
SOC_DOUBLE_TLV("DAC1 Playback Volume", RT5682_DAC1_DIG_VOL,
1117-
RT5682_L_VOL_SFT, RT5682_R_VOL_SFT, 175, 0, dac_vol_tlv),
1117+
RT5682_L_VOL_SFT + 1, RT5682_R_VOL_SFT + 1, 86, 0, dac_vol_tlv),
11181118

11191119
/* IN Boost Volume */
11201120
SOC_SINGLE_TLV("CBJ Boost Volume", RT5682_CBJ_BST_CTRL,
@@ -1124,7 +1124,7 @@ static const struct snd_kcontrol_new rt5682_snd_controls[] = {
11241124
SOC_DOUBLE("STO1 ADC Capture Switch", RT5682_STO1_ADC_DIG_VOL,
11251125
RT5682_L_MUTE_SFT, RT5682_R_MUTE_SFT, 1, 1),
11261126
SOC_DOUBLE_TLV("STO1 ADC Capture Volume", RT5682_STO1_ADC_DIG_VOL,
1127-
RT5682_L_VOL_SFT, RT5682_R_VOL_SFT, 127, 0, adc_vol_tlv),
1127+
RT5682_L_VOL_SFT + 1, RT5682_R_VOL_SFT + 1, 63, 0, adc_vol_tlv),
11281128

11291129
/* ADC Boost Volume Control */
11301130
SOC_DOUBLE_TLV("STO1 ADC Boost Gain Volume", RT5682_STO1_ADC_BOOST,

sound/soc/codecs/sigmadsp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ static int sigmadsp_ctrl_write(struct sigmadsp *sigmadsp,
117117
struct sigmadsp_control *ctrl, void *data)
118118
{
119119
/* safeload loads up to 20 bytes in a atomic operation */
120-
if (ctrl->num_bytes > 4 && ctrl->num_bytes <= 20 && sigmadsp->ops &&
121-
sigmadsp->ops->safeload)
120+
if (ctrl->num_bytes <= 20 && sigmadsp->ops && sigmadsp->ops->safeload)
122121
return sigmadsp->ops->safeload(sigmadsp, ctrl->addr, data,
123122
ctrl->num_bytes);
124123
else

0 commit comments

Comments
 (0)