Loading sound/soc/blackfin/bf5xx-i2s-pcm.c +4 −4 Original line number Diff line number Diff line Loading @@ -290,19 +290,19 @@ static int bf5xx_pcm_silence(struct snd_pcm_substream *substream, unsigned int sample_size = runtime->sample_bits / 8; void *buf = runtime->dma_area; struct bf5xx_i2s_pcm_data *dma_data; unsigned int offset, size; unsigned int offset, samples; dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); if (dma_data->tdm_mode) { offset = pos * 8 * sample_size; size = count * 8 * sample_size; samples = count * 8; } else { offset = frames_to_bytes(runtime, pos); size = frames_to_bytes(runtime, count); samples = count * runtime->channels; } snd_pcm_format_set_silence(runtime->format, buf + offset, size); snd_pcm_format_set_silence(runtime->format, buf + offset, samples); return 0; } Loading sound/soc/codecs/adau1701.c +4 −2 Original line number Diff line number Diff line Loading @@ -230,8 +230,10 @@ static int adau1701_reg_read(void *context, unsigned int reg, *value = 0; for (i = 0; i < size; i++) *value |= recv_buf[i] << (i * 8); for (i = 0; i < size; i++) { *value <<= 8; *value |= recv_buf[i]; } return 0; } Loading sound/soc/codecs/arizona.c +25 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,31 @@ int arizona_init_spk(struct snd_soc_codec *codec) } EXPORT_SYMBOL_GPL(arizona_init_spk); static const struct snd_soc_dapm_route arizona_mono_routes[] = { { "OUT1R", NULL, "OUT1L" }, { "OUT2R", NULL, "OUT2L" }, { "OUT3R", NULL, "OUT3L" }, { "OUT4R", NULL, "OUT4L" }, { "OUT5R", NULL, "OUT5L" }, { "OUT6R", NULL, "OUT6L" }, }; int arizona_init_mono(struct snd_soc_codec *codec) { struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); struct arizona *arizona = priv->arizona; int i; for (i = 0; i < ARIZONA_MAX_OUTPUT; ++i) { if (arizona->pdata.out_mono[i]) snd_soc_dapm_add_routes(&codec->dapm, &arizona_mono_routes[i], 1); } return 0; } EXPORT_SYMBOL_GPL(arizona_init_mono); int arizona_init_gpio(struct snd_soc_codec *codec) { struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); Loading sound/soc/codecs/arizona.h +1 −0 Original line number Diff line number Diff line Loading @@ -249,6 +249,7 @@ extern int arizona_set_fll(struct arizona_fll *fll, int source, extern int arizona_init_spk(struct snd_soc_codec *codec); extern int arizona_init_gpio(struct snd_soc_codec *codec); extern int arizona_init_mono(struct snd_soc_codec *codec); extern int arizona_init_dai(struct arizona_priv *priv, int dai); Loading sound/soc/codecs/cs42l56.c +2 −2 Original line number Diff line number Diff line Loading @@ -445,9 +445,9 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = { SOC_DOUBLE("ADC Boost Switch", CS42L56_GAIN_BIAS_CTL, 3, 2, 1, 1), SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L56_HPA_VOLUME, CS42L56_HPA_VOLUME, 0, 0x44, 0x55, hl_tlv), CS42L56_HPB_VOLUME, 0, 0x44, 0x55, hl_tlv), SOC_DOUBLE_R_SX_TLV("LineOut Volume", CS42L56_LOA_VOLUME, CS42L56_LOA_VOLUME, 0, 0x44, 0x55, hl_tlv), CS42L56_LOB_VOLUME, 0, 0x44, 0x55, hl_tlv), SOC_SINGLE_TLV("Bass Shelving Volume", CS42L56_TONE_CTL, 0, 0x00, 1, tone_tlv), Loading Loading
sound/soc/blackfin/bf5xx-i2s-pcm.c +4 −4 Original line number Diff line number Diff line Loading @@ -290,19 +290,19 @@ static int bf5xx_pcm_silence(struct snd_pcm_substream *substream, unsigned int sample_size = runtime->sample_bits / 8; void *buf = runtime->dma_area; struct bf5xx_i2s_pcm_data *dma_data; unsigned int offset, size; unsigned int offset, samples; dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); if (dma_data->tdm_mode) { offset = pos * 8 * sample_size; size = count * 8 * sample_size; samples = count * 8; } else { offset = frames_to_bytes(runtime, pos); size = frames_to_bytes(runtime, count); samples = count * runtime->channels; } snd_pcm_format_set_silence(runtime->format, buf + offset, size); snd_pcm_format_set_silence(runtime->format, buf + offset, samples); return 0; } Loading
sound/soc/codecs/adau1701.c +4 −2 Original line number Diff line number Diff line Loading @@ -230,8 +230,10 @@ static int adau1701_reg_read(void *context, unsigned int reg, *value = 0; for (i = 0; i < size; i++) *value |= recv_buf[i] << (i * 8); for (i = 0; i < size; i++) { *value <<= 8; *value |= recv_buf[i]; } return 0; } Loading
sound/soc/codecs/arizona.c +25 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,31 @@ int arizona_init_spk(struct snd_soc_codec *codec) } EXPORT_SYMBOL_GPL(arizona_init_spk); static const struct snd_soc_dapm_route arizona_mono_routes[] = { { "OUT1R", NULL, "OUT1L" }, { "OUT2R", NULL, "OUT2L" }, { "OUT3R", NULL, "OUT3L" }, { "OUT4R", NULL, "OUT4L" }, { "OUT5R", NULL, "OUT5L" }, { "OUT6R", NULL, "OUT6L" }, }; int arizona_init_mono(struct snd_soc_codec *codec) { struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); struct arizona *arizona = priv->arizona; int i; for (i = 0; i < ARIZONA_MAX_OUTPUT; ++i) { if (arizona->pdata.out_mono[i]) snd_soc_dapm_add_routes(&codec->dapm, &arizona_mono_routes[i], 1); } return 0; } EXPORT_SYMBOL_GPL(arizona_init_mono); int arizona_init_gpio(struct snd_soc_codec *codec) { struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); Loading
sound/soc/codecs/arizona.h +1 −0 Original line number Diff line number Diff line Loading @@ -249,6 +249,7 @@ extern int arizona_set_fll(struct arizona_fll *fll, int source, extern int arizona_init_spk(struct snd_soc_codec *codec); extern int arizona_init_gpio(struct snd_soc_codec *codec); extern int arizona_init_mono(struct snd_soc_codec *codec); extern int arizona_init_dai(struct arizona_priv *priv, int dai); Loading
sound/soc/codecs/cs42l56.c +2 −2 Original line number Diff line number Diff line Loading @@ -445,9 +445,9 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = { SOC_DOUBLE("ADC Boost Switch", CS42L56_GAIN_BIAS_CTL, 3, 2, 1, 1), SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L56_HPA_VOLUME, CS42L56_HPA_VOLUME, 0, 0x44, 0x55, hl_tlv), CS42L56_HPB_VOLUME, 0, 0x44, 0x55, hl_tlv), SOC_DOUBLE_R_SX_TLV("LineOut Volume", CS42L56_LOA_VOLUME, CS42L56_LOA_VOLUME, 0, 0x44, 0x55, hl_tlv), CS42L56_LOB_VOLUME, 0, 0x44, 0x55, hl_tlv), SOC_SINGLE_TLV("Bass Shelving Volume", CS42L56_TONE_CTL, 0, 0x00, 1, tone_tlv), Loading