tangled
alpha
login
or
join now
tjh.dev
/
kernel
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Merge branch 'topic/asoc' into for-linus
Takashi Iwai
16 years ago
f0f20a16
f1cf9a66
+11
-9
2 changed files
expand all
collapse all
unified
split
sound
soc
codecs
ak4104.c
soc-core.c
+2
-4
sound/soc/codecs/ak4104.c
···
90
90
if (reg >= codec->reg_cache_size)
91
91
return -EINVAL;
92
92
93
93
-
reg &= AK4104_REG_MASK;
94
94
-
reg |= AK4104_WRITE;
95
95
-
96
93
/* only write to the hardware if value has changed */
97
94
if (cache[reg] != value) {
98
98
-
u8 tmp[2] = { reg, value };
95
95
+
u8 tmp[2] = { (reg & AK4104_REG_MASK) | AK4104_WRITE, value };
96
96
+
99
97
if (spi_write(spi, tmp, sizeof(tmp))) {
100
98
dev_err(&spi->dev, "SPI write failed\n");
101
99
return -EIO;
+9
-5
sound/soc/soc-core.c
···
427
427
if (!runtime->hw.rates) {
428
428
printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",
429
429
codec_dai->name, cpu_dai->name);
430
430
-
goto machine_err;
430
430
+
goto config_err;
431
431
}
432
432
if (!runtime->hw.formats) {
433
433
printk(KERN_ERR "asoc: %s <-> %s No matching formats\n",
434
434
codec_dai->name, cpu_dai->name);
435
435
-
goto machine_err;
435
435
+
goto config_err;
436
436
}
437
437
if (!runtime->hw.channels_min || !runtime->hw.channels_max) {
438
438
printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",
439
439
codec_dai->name, cpu_dai->name);
440
440
-
goto machine_err;
440
440
+
goto config_err;
441
441
}
442
442
443
443
/* Symmetry only applies if we've already got an active stream. */
444
444
if (cpu_dai->active || codec_dai->active) {
445
445
ret = soc_pcm_apply_symmetry(substream);
446
446
if (ret != 0)
447
447
-
goto machine_err;
447
447
+
goto config_err;
448
448
}
449
449
450
450
pr_debug("asoc: %s <-> %s info:\n", codec_dai->name, cpu_dai->name);
···
464
464
mutex_unlock(&pcm_mutex);
465
465
return 0;
466
466
467
467
-
machine_err:
467
467
+
config_err:
468
468
if (machine->ops && machine->ops->shutdown)
469
469
machine->ops->shutdown(substream);
470
470
+
471
471
+
machine_err:
472
472
+
if (codec_dai->ops->shutdown)
473
473
+
codec_dai->ops->shutdown(substream, codec_dai);
470
474
471
475
codec_dai_err:
472
476
if (platform->pcm_ops->close)