public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: acano@fastmail.fm
To: linux-media@vger.kernel.org
Subject: Re: em28xx i2s volume control
Date: Mon, 20 Jul 2009 14:00:08 -0400	[thread overview]
Message-ID: <20090720180008.GA25027@localhost.localdomain> (raw)
In-Reply-To: <20090719105049.0cb1690c@pedra.chehab.org>

On Sun, Jul 19, 2009 at 10:50:49AM -0300, Mauro Carvalho Chehab wrote:
> Em Sat, 18 Jul 2009 14:22:51 -0400
> acano@fastmail.fm escreveu:
>
> > How do you control the i2s volume output on empia boards?
>
> the em28xx chip doesn't control volume. This is done at the audio chip.
>
> For ac97 chips, the volume is inside the em28xx driver, since we don't have a
> v4l2 device driver for it yet.
>
> On the cases where the volume is on an i2s chips like msp34xx, the volume
> control is done at the i2c driver, that should be exporting such controls via
> v4l2 dev/subdev API, by calling:
> 	v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_ctrl, ctrl);
>
> This way, any application can control the volume via the proper ioctl's.
>
> While trying to see why are you asking this, I noticed that the em28xx driver,
> due to historic reasons, had an implementation that may cause
> confusion.

The problem is that it's not working for usb audio streaming.  With a
cable from line out of the device to my sound card it works well.
Volume can be controlled by applications using the v4l2 ioctls.

The audio from /dev/dsp? is always at max and distorts horribly on
many tv stations.  I can verify with 'modprobe msp3400 debug=1' that
it is trying to set volume I pass to it, but it simply has no effect
on the usb audio stream.

The reason I asked about i2s volume control is because the eeprom has
the bit set that shows my device as "USB audio class volume control
(capable) when audio source is i2s device".

Maybe it's a snd-usb-audio issue since the mixer setting for the
device doesn't allow volume changing.

>
> I just add there two patches that will make it clearer.
>
> There aren't any functional changes with those patches (I tested here on
> devices with msp34xx and with ac202 ac97), except for the fact that now the
> qv4l2 will show the volume as a slider.



  reply	other threads:[~2009-07-20 17:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-18 18:22 em28xx i2s volume control acano
2009-07-19 13:50 ` Mauro Carvalho Chehab
2009-07-20 18:00   ` acano [this message]
2009-07-28  0:36     ` Mauro Carvalho Chehab
2009-07-30  5:02       ` Mauro Carvalho Chehab

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=20090720180008.GA25027@localhost.localdomain \
    --to=acano@fastmail.fm \
    --cc=linux-media@vger.kernel.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