Skip to content

Commit

Permalink
Merge pull request #873 from hmbedded/rpi-3.18.y-iqaudio
Browse files Browse the repository at this point in the history
Align pcm512x driver with upstream
  • Loading branch information
popcornmix committed Mar 7, 2015
2 parents 61c2a56 + f48db28 commit 190b13d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion sound/soc/bcm/iqaudio-dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@

static int snd_rpi_iqaudio_dac_init(struct snd_soc_pcm_runtime *rtd)
{
// NOT USED struct snd_soc_codec *codec = rtd->codec;
int ret;
struct snd_soc_card *card = rtd->card;
struct snd_soc_codec *codec = rtd->codec;

ret = snd_soc_limit_volume(codec, "Digital Playback Volume", 207);
if (ret < 0)
dev_warn(card->dev, "Failed to set volume limit: %d\n", ret);

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/pcm512x.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ static const struct soc_enum pcm512x_veds =
pcm512x_ramp_step_text);

static const struct snd_kcontrol_new pcm512x_controls[] = {
SOC_DOUBLE_R_RANGE_TLV("PCM", PCM512x_DIGITAL_VOLUME_2,
PCM512x_DIGITAL_VOLUME_3, 0, 40, 255, 1, digital_tlv),
SOC_DOUBLE_R_TLV("Digital Playback Volume", PCM512x_DIGITAL_VOLUME_2,
PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, digital_tlv),
SOC_DOUBLE_TLV("Playback Volume", PCM512x_ANALOG_GAIN_CTRL,
PCM512x_LAGN_SHIFT, PCM512x_RAGN_SHIFT, 1, 1, analog_tlv),
SOC_DOUBLE_TLV("Playback Boost Volume", PCM512x_ANALOG_GAIN_BOOST,
Expand Down

0 comments on commit 190b13d

Please sign in to comment.