···90 if (reg >= codec->reg_cache_size)91 return -EINVAL;9293- reg &= AK4104_REG_MASK;94- reg |= AK4104_WRITE;95-96 /* only write to the hardware if value has changed */97 if (cache[reg] != value) {98- u8 tmp[2] = { reg, value };099 if (spi_write(spi, tmp, sizeof(tmp))) {100 dev_err(&spi->dev, "SPI write failed\n");101 return -EIO;
···90 if (reg >= codec->reg_cache_size)91 return -EINVAL;9200093 /* only write to the hardware if value has changed */94 if (cache[reg] != value) {95+ u8 tmp[2] = { (reg & AK4104_REG_MASK) | AK4104_WRITE, value };96+97 if (spi_write(spi, tmp, sizeof(tmp))) {98 dev_err(&spi->dev, "SPI write failed\n");99 return -EIO;
+9-5
sound/soc/soc-core.c
···427 if (!runtime->hw.rates) {428 printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",429 codec_dai->name, cpu_dai->name);430- goto machine_err;431 }432 if (!runtime->hw.formats) {433 printk(KERN_ERR "asoc: %s <-> %s No matching formats\n",434 codec_dai->name, cpu_dai->name);435- goto machine_err;436 }437 if (!runtime->hw.channels_min || !runtime->hw.channels_max) {438 printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",439 codec_dai->name, cpu_dai->name);440- goto machine_err;441 }442443 /* Symmetry only applies if we've already got an active stream. */444 if (cpu_dai->active || codec_dai->active) {445 ret = soc_pcm_apply_symmetry(substream);446 if (ret != 0)447- goto machine_err;448 }449450 pr_debug("asoc: %s <-> %s info:\n", codec_dai->name, cpu_dai->name);···464 mutex_unlock(&pcm_mutex);465 return 0;466467-machine_err:468 if (machine->ops && machine->ops->shutdown)469 machine->ops->shutdown(substream);0000470471codec_dai_err:472 if (platform->pcm_ops->close)
···427 if (!runtime->hw.rates) {428 printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",429 codec_dai->name, cpu_dai->name);430+ goto config_err;431 }432 if (!runtime->hw.formats) {433 printk(KERN_ERR "asoc: %s <-> %s No matching formats\n",434 codec_dai->name, cpu_dai->name);435+ goto config_err;436 }437 if (!runtime->hw.channels_min || !runtime->hw.channels_max) {438 printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",439 codec_dai->name, cpu_dai->name);440+ goto config_err;441 }442443 /* Symmetry only applies if we've already got an active stream. */444 if (cpu_dai->active || codec_dai->active) {445 ret = soc_pcm_apply_symmetry(substream);446 if (ret != 0)447+ goto config_err;448 }449450 pr_debug("asoc: %s <-> %s info:\n", codec_dai->name, cpu_dai->name);···464 mutex_unlock(&pcm_mutex);465 return 0;466467+config_err:468 if (machine->ops && machine->ops->shutdown)469 machine->ops->shutdown(substream);470+471+machine_err:472+ if (codec_dai->ops->shutdown)473+ codec_dai->ops->shutdown(substream, codec_dai);474475codec_dai_err:476 if (platform->pcm_ops->close)