From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: "Igor M. Liplianin" <liplianin@me.by>
Cc: linux-media@vger.kernel.org, Steven Toth <stoth@linuxtv.org>,
Mijhail Moreyra <mijhail.moreyra@gmail.com>,
Abylai Ospan <aospan@netup.ru>
Subject: Re: [GIT PATCHES FOR 3.2] cx23885 alsa cleaned and prepaired
Date: Fri, 14 Oct 2011 17:07:50 -0300 [thread overview]
Message-ID: <4E989696.5030106@infradead.org> (raw)
In-Reply-To: <201110101752.11536.liplianin@me.by>
Em 10-10-2011 11:52, Igor M. Liplianin escreveu:
> Hi Mauro and Steven,
>
> It's been a long time since cx23885-alsa pull was requested.
> To speed things up I created a git branch where I put the patches.
> Some patches merged, like introduce then correct checkpatch compliance
> or convert spinlock to mutex and back to spinlock, insert printk then remove printk as well.
> Minor corrections from me was silently merged, for major I created additional patches.
>
> Hope it helps.
>
> Steven Toth (31):
> cx23885: mute the audio during channel change
> From 3241f9a7ba2505c48eaa608df7f2bd2a3e79eea0 Mon Sep 17 00:00:00 2001
> From: Steven Toth <stoth@kernellabs.com>
> Date: Mon, 10 Oct 2011 11:09:53 -0300
> Subject: [PATCH] [media] cx23885: mute the audio during channel change
>
> Signed-off-by: Steven Toth <stoth@kernellabs.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>
> diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c
> index 58855b2..7e5342b 100644
> --- a/drivers/media/video/cx23885/cx23885-video.c
> +++ b/drivers/media/video/cx23885/cx23885-video.c
> @@ -1264,18 +1264,30 @@ static int vidioc_g_frequency(struct file *file, void *priv,
>
> static int cx23885_set_freq(struct cx23885_dev *dev, struct v4l2_frequency *f)
> {
> + struct v4l2_control ctrl;
> +
> if (unlikely(UNSET == dev->tuner_type))
> return -EINVAL;
> if (unlikely(f->tuner != 0))
> return -EINVAL;
>
> +
> mutex_lock(&dev->lock);
> dev->freq = f->frequency;
>
> + /* I need to mute audio here */
> + ctrl.id = V4L2_CID_AUDIO_MUTE;
> + ctrl.value = 1;
> + cx23885_set_control(dev, &ctrl);
> +
> call_all(dev, tuner, s_frequency, f);
>
> /* When changing channels it is required to reset TVAUDIO */
> - msleep(10);
> + msleep(100);
> +
> + /* I need to unmute audio here */
> + ctrl.value = 0;
> + cx23885_set_control(dev, &ctrl);
>
> mutex_unlock(&dev->lock);
>
This patch has a weird side effect: If the user has muted the audio, changing the channel will
unmute. The right thing to do here is to do a g_ctrl to check if the device is muted. If it is
muted, don't touch at the mute.
I'll drop this one from my patch series.
Regards,
Mauro
next prev parent reply other threads:[~2011-10-14 20:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 14:52 [GIT PATCHES FOR 3.2] cx23885 alsa cleaned and prepaired Igor M. Liplianin
2011-10-11 18:17 ` Steven Toth
2011-10-11 23:41 ` Igor M. Liplianin
2011-10-14 19:52 ` Mauro Carvalho Chehab
2011-10-14 20:03 ` Mauro Carvalho Chehab
2011-10-14 20:07 ` Mauro Carvalho Chehab [this message]
2011-10-14 20:25 ` Mauro Carvalho Chehab
2011-10-14 21:19 ` Igor M. Liplianin
2011-10-17 14:13 ` Alfredo Jesús Delaiti
2011-10-17 19:00 ` Alfredo Jesús Delaiti
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=4E989696.5030106@infradead.org \
--to=mchehab@infradead.org \
--cc=aospan@netup.ru \
--cc=linux-media@vger.kernel.org \
--cc=liplianin@me.by \
--cc=mijhail.moreyra@gmail.com \
--cc=stoth@linuxtv.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 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.