Loading sound/soc/soc-core.c +54 −46 Original line number Diff line number Diff line Loading @@ -178,9 +178,11 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) /* Check that the codec and cpu DAI's are compatible */ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { runtime->hw.rate_min = max(codec_dai->playback.rate_min, cpu_dai->playback.rate_min); max(codec_dai->playback.rate_min, cpu_dai->playback.rate_min); runtime->hw.rate_max = min(codec_dai->playback.rate_max, cpu_dai->playback.rate_max); min(codec_dai->playback.rate_max, cpu_dai->playback.rate_max); runtime->hw.channels_min = max(codec_dai->playback.channels_min, cpu_dai->playback.channels_min); Loading @@ -193,9 +195,11 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) codec_dai->playback.rates & cpu_dai->playback.rates; } else { runtime->hw.rate_min = max(codec_dai->capture.rate_min, cpu_dai->capture.rate_min); max(codec_dai->capture.rate_min, cpu_dai->capture.rate_min); runtime->hw.rate_max = min(codec_dai->capture.rate_max, cpu_dai->capture.rate_max); min(codec_dai->capture.rate_max, cpu_dai->capture.rate_max); runtime->hw.channels_min = max(codec_dai->capture.channels_min, cpu_dai->capture.channels_min); Loading Loading @@ -511,7 +515,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, if (cpu_dai->ops.hw_params) { ret = cpu_dai->ops.hw_params(substream, params); if (ret < 0) { printk(KERN_ERR "asoc: can't set interface %s hw params\n", printk(KERN_ERR "asoc: interface %s hw params failed\n", cpu_dai->name); goto interface_err; } Loading @@ -520,7 +524,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, if (platform->pcm_ops->hw_params) { ret = platform->pcm_ops->hw_params(substream, params); if (ret < 0) { printk(KERN_ERR "asoc: can't set platform %s hw params\n", printk(KERN_ERR "asoc: platform %s hw params failed\n", platform->name); goto platform_err; } Loading Loading @@ -720,7 +724,7 @@ static int soc_resume(struct platform_device *pdev) SND_SOC_DAPM_STREAM_RESUME); } /* unmute any active DAC's */ /* unmute any active DACs */ for (i = 0; i < machine->num_links; i++) { struct snd_soc_codec_dai *dai = machine->dai_link[i].codec_dai; if (dai->dai_ops.digital_mute && dai->playback.active) Loading Loading @@ -876,7 +880,8 @@ static int soc_new_pcm(struct snd_soc_device *socdev, ret = snd_pcm_new(codec->card, new_name, codec->pcm_devs++, playback, capture, &pcm); if (ret < 0) { printk(KERN_ERR "asoc: can't create pcm for codec %s\n", codec->name); printk(KERN_ERR "asoc: can't create pcm for codec %s\n", codec->name); kfree(rtd); return ret; } Loading Loading @@ -926,7 +931,8 @@ static ssize_t codec_reg_show(struct device *dev, count += sprintf(buf, "%s registers\n", codec->name); for (i = 0; i < codec->reg_cache_size; i += step) count += sprintf(buf + count, "%2x: %4x\n", i, codec->read(codec, i)); count += sprintf(buf + count, "%2x: %4x\n", i, codec->read(codec, i)); return count; } Loading Loading @@ -1119,7 +1125,7 @@ int snd_soc_register_card(struct snd_soc_device *socdev) ret = snd_card_register(codec->card); if (ret < 0) { printk(KERN_ERR "asoc: failed to register soundcard for codec %s\n", printk(KERN_ERR "asoc: failed to register soundcard for %s\n", codec->name); goto out; } Loading @@ -1143,7 +1149,7 @@ int snd_soc_register_card(struct snd_soc_device *socdev) err = device_create_file(socdev->dev, &dev_attr_codec_reg); if (err < 0) printk(KERN_WARNING "asoc: failed to add codec sysfs entries\n"); printk(KERN_WARNING "asoc: failed to add codec sysfs files\n"); mutex_unlock(&codec->mutex); Loading Loading @@ -1279,7 +1285,8 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol, for (bitmask = 1; bitmask < e->mask; bitmask <<= 1) ; val = snd_soc_read(codec, e->reg); ucontrol->value.enumerated.item[0] = (val >> e->shift_l) & (bitmask - 1); ucontrol->value.enumerated.item[0] = (val >> e->shift_l) & (bitmask - 1); if (e->shift_l != e->shift_r) ucontrol->value.enumerated.item[1] = (val >> e->shift_r) & (bitmask - 1); Loading Loading @@ -1573,7 +1580,8 @@ int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, val = val << shift; val2 = val2 << shift; if ((err = snd_soc_update_bits(codec, reg, val_mask, val)) < 0) err = snd_soc_update_bits(codec, reg, val_mask, val); if (err < 0) return err; err = snd_soc_update_bits(codec, reg2, val_mask, val2); Loading Loading
sound/soc/soc-core.c +54 −46 Original line number Diff line number Diff line Loading @@ -178,9 +178,11 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) /* Check that the codec and cpu DAI's are compatible */ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { runtime->hw.rate_min = max(codec_dai->playback.rate_min, cpu_dai->playback.rate_min); max(codec_dai->playback.rate_min, cpu_dai->playback.rate_min); runtime->hw.rate_max = min(codec_dai->playback.rate_max, cpu_dai->playback.rate_max); min(codec_dai->playback.rate_max, cpu_dai->playback.rate_max); runtime->hw.channels_min = max(codec_dai->playback.channels_min, cpu_dai->playback.channels_min); Loading @@ -193,9 +195,11 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) codec_dai->playback.rates & cpu_dai->playback.rates; } else { runtime->hw.rate_min = max(codec_dai->capture.rate_min, cpu_dai->capture.rate_min); max(codec_dai->capture.rate_min, cpu_dai->capture.rate_min); runtime->hw.rate_max = min(codec_dai->capture.rate_max, cpu_dai->capture.rate_max); min(codec_dai->capture.rate_max, cpu_dai->capture.rate_max); runtime->hw.channels_min = max(codec_dai->capture.channels_min, cpu_dai->capture.channels_min); Loading Loading @@ -511,7 +515,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, if (cpu_dai->ops.hw_params) { ret = cpu_dai->ops.hw_params(substream, params); if (ret < 0) { printk(KERN_ERR "asoc: can't set interface %s hw params\n", printk(KERN_ERR "asoc: interface %s hw params failed\n", cpu_dai->name); goto interface_err; } Loading @@ -520,7 +524,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, if (platform->pcm_ops->hw_params) { ret = platform->pcm_ops->hw_params(substream, params); if (ret < 0) { printk(KERN_ERR "asoc: can't set platform %s hw params\n", printk(KERN_ERR "asoc: platform %s hw params failed\n", platform->name); goto platform_err; } Loading Loading @@ -720,7 +724,7 @@ static int soc_resume(struct platform_device *pdev) SND_SOC_DAPM_STREAM_RESUME); } /* unmute any active DAC's */ /* unmute any active DACs */ for (i = 0; i < machine->num_links; i++) { struct snd_soc_codec_dai *dai = machine->dai_link[i].codec_dai; if (dai->dai_ops.digital_mute && dai->playback.active) Loading Loading @@ -876,7 +880,8 @@ static int soc_new_pcm(struct snd_soc_device *socdev, ret = snd_pcm_new(codec->card, new_name, codec->pcm_devs++, playback, capture, &pcm); if (ret < 0) { printk(KERN_ERR "asoc: can't create pcm for codec %s\n", codec->name); printk(KERN_ERR "asoc: can't create pcm for codec %s\n", codec->name); kfree(rtd); return ret; } Loading Loading @@ -926,7 +931,8 @@ static ssize_t codec_reg_show(struct device *dev, count += sprintf(buf, "%s registers\n", codec->name); for (i = 0; i < codec->reg_cache_size; i += step) count += sprintf(buf + count, "%2x: %4x\n", i, codec->read(codec, i)); count += sprintf(buf + count, "%2x: %4x\n", i, codec->read(codec, i)); return count; } Loading Loading @@ -1119,7 +1125,7 @@ int snd_soc_register_card(struct snd_soc_device *socdev) ret = snd_card_register(codec->card); if (ret < 0) { printk(KERN_ERR "asoc: failed to register soundcard for codec %s\n", printk(KERN_ERR "asoc: failed to register soundcard for %s\n", codec->name); goto out; } Loading @@ -1143,7 +1149,7 @@ int snd_soc_register_card(struct snd_soc_device *socdev) err = device_create_file(socdev->dev, &dev_attr_codec_reg); if (err < 0) printk(KERN_WARNING "asoc: failed to add codec sysfs entries\n"); printk(KERN_WARNING "asoc: failed to add codec sysfs files\n"); mutex_unlock(&codec->mutex); Loading Loading @@ -1279,7 +1285,8 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol, for (bitmask = 1; bitmask < e->mask; bitmask <<= 1) ; val = snd_soc_read(codec, e->reg); ucontrol->value.enumerated.item[0] = (val >> e->shift_l) & (bitmask - 1); ucontrol->value.enumerated.item[0] = (val >> e->shift_l) & (bitmask - 1); if (e->shift_l != e->shift_r) ucontrol->value.enumerated.item[1] = (val >> e->shift_r) & (bitmask - 1); Loading Loading @@ -1573,7 +1580,8 @@ int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, val = val << shift; val2 = val2 << shift; if ((err = snd_soc_update_bits(codec, reg, val_mask, val)) < 0) err = snd_soc_update_bits(codec, reg, val_mask, val); if (err < 0) return err; err = snd_soc_update_bits(codec, reg2, val_mask, val2); Loading