From: Takashi Iwai <tiwai@suse.de>
To: "Vedran Miletić" <rivanvx@gmail.com>
Cc: alsa-devel mailing list <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] snd-sbxfi: rename erroneous Master mixer control to "PCM Playback Volume".
Date: Sun, 19 Oct 2008 13:12:04 +0200 [thread overview]
Message-ID: <s5h63no3kl7.wl%tiwai@suse.de> (raw)
In-Reply-To: <fd3eb9bf0810190151t75f66e8bua9606477738403cd@mail.gmail.com>
At Sun, 19 Oct 2008 10:51:15 +0200,
=?UTF-8?Q?Vedran_Mileti=C4=87?= wrote:
>
> Sorry to go off-topic, but there are lots of cards that don't have
> Master control. Would this qualify as a bug?
No, it's no bug. Such hardware has really no master volume control
in design.
Takashi
>
> 2008/10/19 Takashi Iwai <tiwai@suse.de>:
> > At Sat, 18 Oct 2008 20:42:24 -0500,
> > William Pitcock wrote:
> >>
> >> The OSS4-provided master mixer control is actually relative to EMU20K1 port
> >> volume settings. So, it should be named PCM. The Master mixer control will be
> >> shortly readded as a control which sets the master volume.
> >>
> >> Signed-off-by: William Pitcock <nenolod@sacredspiral.co.uk>
> >
> > I postpone this until you send the Master control addition.
> > Most apps requires Master control rather than PCM control, AFAIK.
> >
> >
> > Takashi
> >
> >> ---
> >> sound/pci/sbxfi/sbxfi.c | 28 ++++++++++++++--------------
> >> 1 files changed, 14 insertions(+), 14 deletions(-)
> >>
> >> diff --git a/sound/pci/sbxfi/sbxfi.c b/sound/pci/sbxfi/sbxfi.c
> >> index c006278..3e99a97 100644
> >> --- a/sound/pci/sbxfi/sbxfi.c
> >> +++ b/sound/pci/sbxfi/sbxfi.c
> >> @@ -155,7 +155,7 @@ struct sbxfi {
> >> int timer_reprogram;
> >>
> >> unsigned int base_rate;
> >> - int master_vol[2];
> >> + int pcm_vol[2];
> >> int capture_vol[2];
> >> int capsrc;
> >> int micboost;
> >> @@ -1103,7 +1103,7 @@ static void sbxfi_setup_play_mixer(struct sbxfi *chip,
> >> int i, vol, audio_ch;
> >>
> >> for (i = 0; i < 2; i++) {
> >> - vol = port->vol[i] + chip->master_vol[i] - MAX_VOLUME;
> >> + vol = port->vol[i] + chip->pcm_vol[i] - MAX_VOLUME;
> >> if (vol < 0)
> >> vol = 0;
> >> vol = amop_vol_table[vol];
> >> @@ -1124,9 +1124,9 @@ static int sbxfi_update_play_mixer(struct sbxfi *chip, int *vol)
> >> struct sbxfi_port *port;
> >>
> >> for (i = 0; i < 2; i++) {
> >> - if (vol[i] == chip->master_vol[i])
> >> + if (vol[i] == chip->pcm_vol[i])
> >> continue;
> >> - chip->master_vol[i] = vol[i];
> >> + chip->pcm_vol[i] = vol[i];
> >> spin_lock_irq(&chip->port_lock);
> >> list_for_each_entry(port, &chip->port_list, list) {
> >> if (port->substream->stream !=
> >> @@ -1516,7 +1516,7 @@ static int __devinit sbxfi_create_pcm(struct sbxfi *chip)
> >> /*
> >> * Mixer interface
> >> */
> >> -static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
> >> +static int sbxfi_pcm_vol_info(struct snd_kcontrol *kcontrol,
> >> struct snd_ctl_elem_info *uinfo)
> >> {
> >> uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
> >> @@ -1526,16 +1526,16 @@ static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
> >> return 0;
> >> }
> >>
> >> -static int sbxfi_master_vol_get(struct snd_kcontrol *kcontrol,
> >> +static int sbxfi_pcm_vol_get(struct snd_kcontrol *kcontrol,
> >> struct snd_ctl_elem_value *ucontrol)
> >> {
> >> struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
> >> - ucontrol->value.integer.value[0] = chip->master_vol[0];
> >> - ucontrol->value.integer.value[1] = chip->master_vol[1];
> >> + ucontrol->value.integer.value[0] = chip->pcm_vol[0];
> >> + ucontrol->value.integer.value[1] = chip->pcm_vol[1];
> >> return 0;
> >> }
> >>
> >> -static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
> >> +static int sbxfi_pcm_vol_put(struct snd_kcontrol *kcontrol,
> >> struct snd_ctl_elem_value *ucontrol)
> >> {
> >> struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
> >> @@ -1543,7 +1543,7 @@ static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
> >>
> >> vol[0] = ucontrol->value.integer.value[0];
> >> vol[1] = ucontrol->value.integer.value[1];
> >> - if (!memcmp(vol, chip->master_vol, sizeof(vol)))
> >> + if (!memcmp(vol, chip->pcm_vol, sizeof(vol)))
> >> return 0;
> >>
> >> if (vol[0] < 0)
> >> @@ -1658,13 +1658,13 @@ static int sbxfi_micboost_put(struct snd_kcontrol *kcontrol,
> >>
> >> static struct snd_kcontrol_new mixers[] __devinitdata = {
> >> {
> >> - .name = "Master Playback Volume",
> >> + .name = "PCM Playback Volume",
> >> .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
> >> .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE
> >> /* | SNDRV_CTL_ELEM_ACCESS_TLV_READ*/),
> >> - .info = sbxfi_master_vol_info,
> >> - .get = sbxfi_master_vol_get,
> >> - .put = sbxfi_master_vol_put,
> >> + .info = sbxfi_pcm_vol_info,
> >> + .get = sbxfi_pcm_vol_get,
> >> + .put = sbxfi_pcm_vol_put,
> >> /*.tlv = { .p = db_master_vol }*/
> >> },
> >> {
> >> --
> >> 1.5.5.4
> >>
> >> _______________________________________________
> >> Alsa-devel mailing list
> >> Alsa-devel@alsa-project.org
> >> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >>
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >
>
>
>
> --
> Vedran Miletić
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2008-10-19 11:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-19 1:42 [PATCH] snd-sbxfi: rename erroneous Master mixer control to "PCM Playback Volume" William Pitcock
2008-10-19 8:49 ` Takashi Iwai
2008-10-19 8:50 ` Takashi Iwai
2008-10-19 8:51 ` Vedran Miletić
2008-10-19 11:12 ` Takashi Iwai [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-10-19 1:42 William Pitcock
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=s5h63no3kl7.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=rivanvx@gmail.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.