qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	dnb@redhat.com, dlaor@redhat.com, qemu-devel@nongnu.org,
	kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 05/11] hw/ac97: add support for volume control
Date: Tue, 13 Mar 2012 20:07:49 +0400 (MSK)	[thread overview]
Message-ID: <alpine.LNX.2.00.1203132005270.4347@linmac> (raw)
In-Reply-To: <CAJ+F1CL5wPN36ARnbWx4kDPBg1YtE-rxQPrzjq6-C-gqGTZJUw@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1647 bytes --]

On Tue, 13 Mar 2012, Marc-Andr? Lureau wrote:

> On Tue, Mar 13, 2012 at 4:37 PM, malc <av1474@comtv.ru> wrote:
> > On Tue, 13 Mar 2012, Marc-Andr? Lureau wrote:
> >
> >> Combine output volume with Master and PCM registers values.
> >> Use default values in mixer_reset ().
> >> Set volume on post-load to update backend values.
> >>
> >> v4:
> >> - fix some code style
> >
> > Don't think it fixes anything...
> >
> >>
> >> Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com>
> >> ---
> >>  hw/ac97.c |   80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >>  1 files changed, 80 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/hw/ac97.c b/hw/ac97.c
> >> index f7866ed..f5ae637 100644
> >> --- a/hw/ac97.c
> >> +++ b/hw/ac97.c
> >> @@ -436,6 +436,64 @@ static void reset_voices (AC97LinkState *s, uint8_t active[LAST_INDEX])
> >>      AUD_set_active_in (s->voice_mc, active[MC_INDEX]);
> >>  }
> >>
> >> +static void get_volume (uint16_t vol, uint16_t mask, int inverse,
> >> +                        int *mute, uint8_t *lvol, uint8_t *rvol)
> >> +{
> >> +  *mute = (vol >> MUTE_SHIFT) & 1;
> >> +  *rvol = (255 * (vol & mask)) / mask;
> >> +  *lvol = (255 * ((vol >> 8) & mask)) / mask;
> >> +  if (inverse) {
> >> +    *rvol = 255 - *rvol;
> >> +    *lvol = 255 - *lvol;
> >
> > Here.
> >
> > [..snip..]
> 
> checkpatch doesn't complain here, I only get 30 warnings:
> 
> WARNING: space prohibited between function name and open parenthesis '('
> 
> which seems to be the code style in audio/
> 

That's right. But the whole get_volume function is indented with 2
instead of 4 spaces.

-- 
mailto:av1474@comtv.ru

  reply	other threads:[~2012-03-13 16:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 15:20 [Qemu-devel] [PATCH v4 00/11] apply volume on client side Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 01/11] audio: add VOICE_VOLUME ctl Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 02/11] audio: don't apply volume effect if backend has VOICE_VOLUME_CAP Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 03/11] hw/ac97: remove USE_MIXER code Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 04/11] hw/ac97: the volume mask is not only 0x1f Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 05/11] hw/ac97: add support for volume control Marc-André Lureau
2012-03-13 15:37   ` malc
2012-03-13 16:04     ` Marc-André Lureau
2012-03-13 16:07       ` malc [this message]
2012-03-13 16:23         ` Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 06/11] audio/spice: " Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 07/11] Do not use pa_simple PulseAudio API Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 08/11] configure: pa_simple is not needed anymore Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 09/11] Allow controlling volume with PulseAudio backend Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 10/11] Enable mixemu by default, add runtime option Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 11/11] audio/rfc: remove PLIVE and PERIOD options Marc-André Lureau
2012-03-13 15:47   ` malc
2012-03-14  9:22     ` Gerd Hoffmann
2012-03-14 11:20       ` Marc-André Lureau
2012-03-14 11:49         ` Gerd Hoffmann
2012-03-14 12:13           ` Marc-André Lureau

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=alpine.LNX.2.00.1203132005270.4347@linmac \
    --to=av1474@comtv.ru \
    --cc=dlaor@redhat.com \
    --cc=dnb@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).