em28xx i2s volume control
How do you control the i2s volume output on empia boards?
Em Sat, 18 Jul 2009 14:22:51 -0400
[email protected] escreveu:
Quoted 1 line
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.
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.
Cheers,
Mauro
Quoted 13 lines · Mauro Carvalho Chehab
Em Sat, 18 Jul 2009 14:22:51 -0400
[email protected] escreveu:Quoted 1 line
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:
Quoted 7 lines
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.
Quoted 6 lines
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.
Em Mon, 20 Jul 2009 14:00:08 -0400
[email protected] escreveu:
Quoted 31 lines · Mauro Carvalho Chehab
Quoted 13 lines
Em Sat, 18 Jul 2009 14:22:51 -0400
[email protected] escreveu:Quoted 1 line
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:
Quoted 7 lines
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.
Quoted 6 lines
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 need to double check here with a Hauppauge device I have with msp34xx, but it seems weird that this can't be controlled.
Maybe it is some kind of bug at usb audio class driver. Maybe you can enable some debug code there to see what it is doing with volume.
Cheers,
Mauro
Em Mon, 27 Jul 2009 21:36:48 -0300
Mauro Carvalho Chehab <[email protected]> escreveu:
Quoted 37 lines
Em Mon, 20 Jul 2009 14:00:08 -0400
[email protected] escreveu:Quoted 34 lines · Mauro Carvalho Chehab
Quoted 13 lines
Em Sat, 18 Jul 2009 14:22:51 -0400
[email protected] escreveu:Quoted 1 line
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:
Quoted 7 lines
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".
Angelo,
I just checked the datasheet, at page 8 [1]: there's nothing we can do at msp34xx to control volume at i2s interface.
Looking at the signal flow block diagram of MSP34x5G, it is clear that you have 3 different output patches:
1) loudspeaker: offers bass/treble, loudness, spatial effects, balance and volume controls;
2) SCART1 output: offers only volume control;
3) I2S: no control at all.
So, with msp34xx, there's no way to change the i2s output volume.
[1] http://www.datasheetcatalog.org/datasheet/MicronasIntermetall/mXsrwrs.pdf
Cheers,
Mauro