Skip to content

Commit b7c5ac8

Browse files
committed
Merge branch 'for-linus' into for-next
2 parents c6b0b9e + 3d016d5 commit b7c5ac8

File tree

22 files changed

+148
-85
lines changed

22 files changed

+148
-85
lines changed

arch/arm/boot/dts/sun8i-a33.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
simple-audio-card,mclk-fs = <512>;
114114
simple-audio-card,aux-devs = <&codec_analog>;
115115
simple-audio-card,routing =
116-
"Left DAC", "Digital Left DAC",
117-
"Right DAC", "Digital Right DAC";
116+
"Left DAC", "AIF1 Slot 0 Left",
117+
"Right DAC", "AIF1 Slot 0 Right";
118118
status = "disabled";
119119

120120
simple-audio-card,cpu {

sound/core/seq/seq_clientmgr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,6 +1832,7 @@ static int snd_seq_ioctl_set_client_pool(struct snd_seq_client *client,
18321832
info->output_pool != client->pool->size)) {
18331833
if (snd_seq_write_pool_allocated(client)) {
18341834
/* remove all existing cells */
1835+
snd_seq_pool_mark_closing(client->pool);
18351836
snd_seq_queue_client_leave_cells(client->number);
18361837
snd_seq_pool_done(client->pool);
18371838
}

sound/core/seq/seq_fifo.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ void snd_seq_fifo_delete(struct snd_seq_fifo **fifo)
7272
return;
7373
*fifo = NULL;
7474

75+
if (f->pool)
76+
snd_seq_pool_mark_closing(f->pool);
77+
7578
snd_seq_fifo_clear(f);
7679

7780
/* wake up clients if any */
@@ -264,6 +267,10 @@ int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize)
264267
/* NOTE: overflow flag is not cleared */
265268
spin_unlock_irqrestore(&f->lock, flags);
266269

270+
/* close the old pool and wait until all users are gone */
271+
snd_seq_pool_mark_closing(oldpool);
272+
snd_use_lock_sync(&f->use_lock);
273+
267274
/* release cells in old pool */
268275
for (cell = oldhead; cell; cell = next) {
269276
next = cell->next;

sound/core/seq/seq_memory.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,18 @@ int snd_seq_pool_init(struct snd_seq_pool *pool)
415415
return 0;
416416
}
417417

418+
/* refuse the further insertion to the pool */
419+
void snd_seq_pool_mark_closing(struct snd_seq_pool *pool)
420+
{
421+
unsigned long flags;
422+
423+
if (snd_BUG_ON(!pool))
424+
return;
425+
spin_lock_irqsave(&pool->lock, flags);
426+
pool->closing = 1;
427+
spin_unlock_irqrestore(&pool->lock, flags);
428+
}
429+
418430
/* remove events */
419431
int snd_seq_pool_done(struct snd_seq_pool *pool)
420432
{
@@ -425,10 +437,6 @@ int snd_seq_pool_done(struct snd_seq_pool *pool)
425437
return -EINVAL;
426438

427439
/* wait for closing all threads */
428-
spin_lock_irqsave(&pool->lock, flags);
429-
pool->closing = 1;
430-
spin_unlock_irqrestore(&pool->lock, flags);
431-
432440
if (waitqueue_active(&pool->output_sleep))
433441
wake_up(&pool->output_sleep);
434442

@@ -485,6 +493,7 @@ int snd_seq_pool_delete(struct snd_seq_pool **ppool)
485493
*ppool = NULL;
486494
if (pool == NULL)
487495
return 0;
496+
snd_seq_pool_mark_closing(pool);
488497
snd_seq_pool_done(pool);
489498
kfree(pool);
490499
return 0;

sound/core/seq/seq_memory.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ static inline int snd_seq_total_cells(struct snd_seq_pool *pool)
8484
int snd_seq_pool_init(struct snd_seq_pool *pool);
8585

8686
/* done pool - free events */
87+
void snd_seq_pool_mark_closing(struct snd_seq_pool *pool);
8788
int snd_seq_pool_done(struct snd_seq_pool *pool);
8889

8990
/* create pool */

sound/firewire/oxfw/oxfw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ static void do_registration(struct work_struct *work)
227227
if (err < 0)
228228
goto error;
229229

230-
err = detect_quirks(oxfw);
230+
err = snd_oxfw_stream_discover(oxfw);
231231
if (err < 0)
232232
goto error;
233233

234-
err = snd_oxfw_stream_discover(oxfw);
234+
err = detect_quirks(oxfw);
235235
if (err < 0)
236236
goto error;
237237

sound/pci/hda/patch_realtek.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4860,6 +4860,7 @@ enum {
48604860
ALC292_FIXUP_DISABLE_AAMIX,
48614861
ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK,
48624862
ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
4863+
ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
48634864
ALC275_FIXUP_DELL_XPS,
48644865
ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE,
48654866
ALC293_FIXUP_LENOVO_SPK_NOISE,
@@ -5495,6 +5496,15 @@ static const struct hda_fixup alc269_fixups[] = {
54955496
.chained = true,
54965497
.chain_id = ALC269_FIXUP_HEADSET_MODE
54975498
},
5499+
[ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE] = {
5500+
.type = HDA_FIXUP_PINS,
5501+
.v.pins = (const struct hda_pintbl[]) {
5502+
{ 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
5503+
{ }
5504+
},
5505+
.chained = true,
5506+
.chain_id = ALC269_FIXUP_HEADSET_MODE
5507+
},
54985508
[ALC275_FIXUP_DELL_XPS] = {
54995509
.type = HDA_FIXUP_VERBS,
55005510
.v.verbs = (const struct hda_verb[]) {
@@ -5567,7 +5577,7 @@ static const struct hda_fixup alc269_fixups[] = {
55675577
.type = HDA_FIXUP_FUNC,
55685578
.v.func = alc298_fixup_speaker_volume,
55695579
.chained = true,
5570-
.chain_id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
5580+
.chain_id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
55715581
},
55725582
[ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER] = {
55735583
.type = HDA_FIXUP_PINS,
@@ -6203,6 +6213,8 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
62036213
ALC295_STANDARD_PINS,
62046214
{0x17, 0x21014040},
62056215
{0x18, 0x21a19050}),
6216+
SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
6217+
ALC295_STANDARD_PINS),
62066218
SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
62076219
ALC298_STANDARD_PINS,
62086220
{0x17, 0x90170110}),

sound/soc/atmel/atmel-classd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static int atmel_classd_codec_dai_digital_mute(struct snd_soc_dai *codec_dai,
349349
}
350350

351351
#define CLASSD_ACLK_RATE_11M2896_MPY_8 (112896 * 100 * 8)
352-
#define CLASSD_ACLK_RATE_12M288_MPY_8 (12228 * 1000 * 8)
352+
#define CLASSD_ACLK_RATE_12M288_MPY_8 (12288 * 1000 * 8)
353353

354354
static struct {
355355
int rate;

sound/soc/codecs/hdac_hdmi.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,21 +1534,20 @@ static void hdac_hdmi_eld_notify_cb(void *aptr, int port, int pipe)
15341534
pin->mst_capable = false;
15351535
/* if not MST, default is port[0] */
15361536
hport = &pin->ports[0];
1537-
goto out;
15381537
} else {
15391538
for (i = 0; i < pin->num_ports; i++) {
15401539
pin->mst_capable = true;
15411540
if (pin->ports[i].id == pipe) {
15421541
hport = &pin->ports[i];
1543-
goto out;
1542+
break;
15441543
}
15451544
}
15461545
}
1546+
1547+
if (hport)
1548+
hdac_hdmi_present_sense(pin, hport);
15471549
}
15481550

1549-
out:
1550-
if (pin && hport)
1551-
hdac_hdmi_present_sense(pin, hport);
15521551
}
15531552

15541553
static struct i915_audio_component_audio_ops aops = {
@@ -1998,7 +1997,7 @@ static int hdac_hdmi_dev_remove(struct hdac_ext_device *edev)
19981997
struct hdac_hdmi_pin *pin, *pin_next;
19991998
struct hdac_hdmi_cvt *cvt, *cvt_next;
20001999
struct hdac_hdmi_pcm *pcm, *pcm_next;
2001-
struct hdac_hdmi_port *port;
2000+
struct hdac_hdmi_port *port, *port_next;
20022001
int i;
20032002

20042003
snd_soc_unregister_codec(&edev->hdac.dev);
@@ -2008,8 +2007,9 @@ static int hdac_hdmi_dev_remove(struct hdac_ext_device *edev)
20082007
if (list_empty(&pcm->port_list))
20092008
continue;
20102009

2011-
list_for_each_entry(port, &pcm->port_list, head)
2012-
port = NULL;
2010+
list_for_each_entry_safe(port, port_next,
2011+
&pcm->port_list, head)
2012+
list_del(&port->head);
20132013

20142014
list_del(&pcm->head);
20152015
kfree(pcm);

sound/soc/codecs/rt5665.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ static irqreturn_t rt5665_irq(int irq, void *data)
12411241
static void rt5665_jd_check_handler(struct work_struct *work)
12421242
{
12431243
struct rt5665_priv *rt5665 = container_of(work, struct rt5665_priv,
1244-
calibrate_work.work);
1244+
jd_check_work.work);
12451245

12461246
if (snd_soc_read(rt5665->codec, RT5665_AJD1_CTRL) & 0x0010) {
12471247
/* jack out */
@@ -2252,7 +2252,7 @@ static const char * const rt5665_if2_1_adc_in_src[] = {
22522252

22532253
static const SOC_ENUM_SINGLE_DECL(
22542254
rt5665_if2_1_adc_in_enum, RT5665_DIG_INF2_DATA,
2255-
RT5665_IF3_ADC_IN_SFT, rt5665_if2_1_adc_in_src);
2255+
RT5665_IF2_1_ADC_IN_SFT, rt5665_if2_1_adc_in_src);
22562256

22572257
static const struct snd_kcontrol_new rt5665_if2_1_adc_in_mux =
22582258
SOC_DAPM_ENUM("IF2_1 ADC IN Source", rt5665_if2_1_adc_in_enum);
@@ -3178,6 +3178,9 @@ static const struct snd_soc_dapm_route rt5665_dapm_routes[] = {
31783178
{"DAC Mono Right Filter", NULL, "DAC Mono R ASRC", is_using_asrc},
31793179
{"DAC Stereo1 Filter", NULL, "DAC STO1 ASRC", is_using_asrc},
31803180
{"DAC Stereo2 Filter", NULL, "DAC STO2 ASRC", is_using_asrc},
3181+
{"I2S1 ASRC", NULL, "CLKDET"},
3182+
{"I2S2 ASRC", NULL, "CLKDET"},
3183+
{"I2S3 ASRC", NULL, "CLKDET"},
31813184

31823185
/*Vref*/
31833186
{"Mic Det Power", NULL, "Vref2"},
@@ -3912,6 +3915,7 @@ static const struct snd_soc_dapm_route rt5665_dapm_routes[] = {
39123915
{"Mono MIX", "MONOVOL Switch", "MONOVOL"},
39133916
{"Mono Amp", NULL, "Mono MIX"},
39143917
{"Mono Amp", NULL, "Vref2"},
3918+
{"Mono Amp", NULL, "Vref3"},
39153919
{"Mono Amp", NULL, "CLKDET SYS"},
39163920
{"Mono Amp", NULL, "CLKDET MONO"},
39173921
{"Mono Playback", "Switch", "Mono Amp"},
@@ -4798,7 +4802,7 @@ static int rt5665_i2c_probe(struct i2c_client *i2c,
47984802
/* Enhance performance*/
47994803
regmap_update_bits(rt5665->regmap, RT5665_PWR_ANLG_1,
48004804
RT5665_HP_DRIVER_MASK | RT5665_LDO1_DVO_MASK,
4801-
RT5665_HP_DRIVER_5X | RT5665_LDO1_DVO_09);
4805+
RT5665_HP_DRIVER_5X | RT5665_LDO1_DVO_12);
48024806

48034807
INIT_DELAYED_WORK(&rt5665->jack_detect_work,
48044808
rt5665_jack_detect_handler);

sound/soc/codecs/rt5665.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@
11061106
#define RT5665_HP_DRIVER_MASK (0x3 << 2)
11071107
#define RT5665_HP_DRIVER_1X (0x0 << 2)
11081108
#define RT5665_HP_DRIVER_3X (0x1 << 2)
1109-
#define RT5665_HP_DRIVER_5X (0x2 << 2)
1109+
#define RT5665_HP_DRIVER_5X (0x3 << 2)
11101110
#define RT5665_LDO1_DVO_MASK (0x3)
11111111
#define RT5665_LDO1_DVO_09 (0x0)
11121112
#define RT5665_LDO1_DVO_10 (0x1)

sound/soc/codecs/wm_adsp.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,10 @@ static int wm_coeff_put(struct snd_kcontrol *kctl,
899899

900900
mutex_lock(&ctl->dsp->pwr_lock);
901901

902-
memcpy(ctl->cache, p, ctl->len);
902+
if (ctl->flags & WMFW_CTL_FLAG_VOLATILE)
903+
ret = -EPERM;
904+
else
905+
memcpy(ctl->cache, p, ctl->len);
903906

904907
ctl->set = 1;
905908
if (ctl->enabled && ctl->dsp->running)
@@ -926,6 +929,8 @@ static int wm_coeff_tlv_put(struct snd_kcontrol *kctl,
926929
ctl->set = 1;
927930
if (ctl->enabled && ctl->dsp->running)
928931
ret = wm_coeff_write_control(ctl, ctl->cache, size);
932+
else if (ctl->flags & WMFW_CTL_FLAG_VOLATILE)
933+
ret = -EPERM;
929934
}
930935

931936
mutex_unlock(&ctl->dsp->pwr_lock);
@@ -947,7 +952,7 @@ static int wm_coeff_put_acked(struct snd_kcontrol *kctl,
947952

948953
mutex_lock(&ctl->dsp->pwr_lock);
949954

950-
if (ctl->enabled)
955+
if (ctl->enabled && ctl->dsp->running)
951956
ret = wm_coeff_write_acked_control(ctl, val);
952957
else
953958
ret = -EPERM;

sound/soc/generic/simple-card-utils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ int asoc_simple_card_parse_clk(struct device *dev,
115115
clk = devm_get_clk_from_child(dev, node, NULL);
116116
if (!IS_ERR(clk)) {
117117
simple_dai->sysclk = clk_get_rate(clk);
118+
simple_dai->clk = clk;
118119
} else if (!of_property_read_u32(node, "system-clock-frequency", &val)) {
119120
simple_dai->sysclk = val;
120121
} else {

sound/soc/intel/skylake/skl-topology.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ static int skl_tplg_set_module_init_data(struct snd_soc_dapm_widget *w)
512512
if (bc->set_params != SKL_PARAM_INIT)
513513
continue;
514514

515-
mconfig->formats_config.caps = (u32 *)&bc->params;
515+
mconfig->formats_config.caps = (u32 *)bc->params;
516516
mconfig->formats_config.caps_size = bc->size;
517517

518518
break;

sound/soc/mediatek/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ config SND_SOC_MT2701
1313

1414
config SND_SOC_MT2701_CS42448
1515
tristate "ASoc Audio driver for MT2701 with CS42448 codec"
16-
depends on SND_SOC_MT2701
16+
depends on SND_SOC_MT2701 && I2C
1717
select SND_SOC_CS42XX8_I2C
1818
select SND_SOC_BT_SCO
1919
help

sound/soc/sh/rcar/cmd.c

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,24 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
3131
struct rsnd_mod *mix = rsnd_io_to_mod_mix(io);
3232
struct device *dev = rsnd_priv_to_dev(priv);
3333
u32 data;
34+
u32 path[] = {
35+
[1] = 1 << 0,
36+
[5] = 1 << 8,
37+
[6] = 1 << 12,
38+
[9] = 1 << 15,
39+
};
3440

3541
if (!mix && !dvc)
3642
return 0;
3743

44+
if (ARRAY_SIZE(path) < rsnd_mod_id(mod) + 1)
45+
return -ENXIO;
46+
3847
if (mix) {
3948
struct rsnd_dai *rdai;
4049
struct rsnd_mod *src;
4150
struct rsnd_dai_stream *tio;
4251
int i;
43-
u32 path[] = {
44-
[0] = 0,
45-
[1] = 1 << 0,
46-
[2] = 0,
47-
[3] = 0,
48-
[4] = 0,
49-
[5] = 1 << 8
50-
};
5152

5253
/*
5354
* it is assuming that integrater is well understanding about
@@ -70,16 +71,19 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
7071
} else {
7172
struct rsnd_mod *src = rsnd_io_to_mod_src(io);
7273

73-
u32 path[] = {
74-
[0] = 0x30000,
75-
[1] = 0x30001,
76-
[2] = 0x40000,
77-
[3] = 0x10000,
78-
[4] = 0x20000,
79-
[5] = 0x40100
74+
u8 cmd_case[] = {
75+
[0] = 0x3,
76+
[1] = 0x3,
77+
[2] = 0x4,
78+
[3] = 0x1,
79+
[4] = 0x2,
80+
[5] = 0x4,
81+
[6] = 0x1,
82+
[9] = 0x2,
8083
};
8184

82-
data = path[rsnd_mod_id(src)];
85+
data = path[rsnd_mod_id(src)] |
86+
cmd_case[rsnd_mod_id(src)] << 16;
8387
}
8488

8589
dev_dbg(dev, "ctu/mix path = 0x%08x", data);

0 commit comments

Comments
 (0)