All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Rajeev kumar <rajeev-dlh.kumar@st.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: Audio codec volume control
Date: Thu, 20 Sep 2012 13:46:57 +0300	[thread overview]
Message-ID: <505AF421.1040906@ti.com> (raw)
In-Reply-To: <505AF279.9050906@st.com>

On 09/20/2012 01:39 PM, Rajeev kumar wrote:
> Hello Peter,
> 
> On 9/20/2012 3:49 PM, Peter Ujfalusi wrote:
> Thanks for the info.
> 
> Please find below the controls I have provided
> 
> static const char *pwm_mode_text[] = { "Binary", "Headphone", "Ternary",
>         "Phase-shift"};
> 
> static const DECLARE_TLV_DB_SCALE(out_gain_tlv, -9150, 50, 0);
> static const DECLARE_TLV_DB_SCALE(master_vol_tlv, -12750, 50, 0);
> static const SOC_ENUM_SINGLE_DECL(pwm_src, STA529_FFXCFG1, 4, pwm_mode_text);
> 
> static const struct snd_kcontrol_new sta529_snd_controls[] = {
>         SOC_DOUBLE_R_TLV("Digital Playback Volume", STA529_LVOL, STA529_RVOL, 0,
>                         127, 0, out_gain_tlv),
>         SOC_SINGLE_TLV("Master Playback Volume", STA529_MVOL, 0, 127, 1,
>                         master_vol_tlv),
>         SOC_ENUM("PWM Select", pwm_src),
> };
> 
> So in our amixer output I am not getting any separate numid for left/right
> volume, so that user can control it.

You should have single numid for the stereo control:
amixer sget Digital

amixer sget Master

You should see something like this with the stereo control:

beagle-gentoo dapm # amixer sget Headset
Simple mixer control 'Headset',0
  Capabilities: pvolume penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 3
  Mono:
  Front Left: Playback 2 [67%] [0.00dB]
  Front Right: Playback 2 [67%] [0.00dB]

> 
> Is there something I am missing in my code.

Looks fine for me.

-- 
Péter

      reply	other threads:[~2012-09-20 10:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-20  7:56 Audio codec volume control Rajeev kumar
2012-09-20  9:58 ` Peter Ujfalusi
2012-09-20 10:08   ` Rajeev kumar
2012-09-20 10:19     ` Peter Ujfalusi
2012-09-20 10:39       ` Rajeev kumar
2012-09-20 10:46         ` Peter Ujfalusi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=505AF421.1040906@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=rajeev-dlh.kumar@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.