Volume control

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium

george53
New Member
Posts: 5
Joined: Sun Jan 05, 2014 4:32 pm

Volume control

Postby george53 » Sun Jan 05, 2014 6:16 pm

I got OSS working and can play sound with ossplay and mpg123. Now I would like to control the volume while these applications are playing.

The following example I found on the internet:

#include <sys/ioctl.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/soundcard.h>
#include <stdlib.h>
#include <unistd.h>

int main() {

int mixer_fd;
if ((mixer_fd = open("/dev/mixer0",O_RDONLY,0)) == -1) {
perror("mixer");
exit (1);
}

int vol = 0x0000; //0x3f3f;
ioctl(mixer_fd, MIXER_WRITE(SOUND_MIXER_VOLUME),&vol);
close(mixer_fd);
return 0;

}

I expect after running this example - which sets volume to zero, I would hear no sound. But the volume does not change. I also run mpg123 in the background while running this program in the foreground. No change in the volume. Why does this make no difference?

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Volume control

Postby igorzwx » Sun Jan 05, 2014 7:39 pm

george53 wrote:I got OSS working and can play sound with ossplay and mpg123. Now I would like to control the volume while these applications are playing.


The "volume" can be controlled with OSS Mixer GUI (ossxmix) or from terminal (ossmix).

Code: Select all

$ whereis ossxmix
ossxmix: /usr/bin/ossxmix /usr/bin/X11/ossxmix /usr/share/man/man1/ossxmix.1.gz

$ ossxmix -h
Usage: ossxmix [options...]
       -h          Prints help (this screen)
       -d<dev#>    Selects the mixer device
       -x          Hides the "legacy" mixer controls
       -w[val]     Make mixer bit wider on screen
       -n[val]     Make mixer bit narrower on screen
       -b          Start mixer in background
       -g[w:h]     Start mixer window with w:h size
       -S          Don't place an icon in system tray


Code: Select all

$ whereis ossmix
ossmix: /usr/bin/ossmix /usr/bin/X11/ossmix /usr/share/man/man1/ossmix.1.gz

$ ossmix -h
Usage: ossmix -h      Displays help (this screen)
Usage: ossmix [-d<devno>] [arguments]
arguments:
   -D         Display device information
   -a         Dump mixer settings for all mixers (normal format)
   -c         Dump mixer settings for all mixers (command format)
   ctrl# value      Change value of a mixer control
   -q         Quiet mode
   -v1|-v2      Verbose mode (-v2 is more verbose).
   <no arguments>   Display current/possible settings


See also:

Code: Select all

$ man ossmix

george53
New Member
Posts: 5
Joined: Sun Jan 05, 2014 4:32 pm

Re: Volume control

Postby george53 » Sun Jan 05, 2014 8:28 pm

Thank you for your reply. However, I would prefer to change the volume within my program. Is there anything wrong with the code I posted?

I also tried to use ossmix from the command line but I do not understand the help text. What means "ctrl# value Change value of a mixer control" ? What should I enter to set the master volume?

When I entered "ossmix -d0 vol 100" it returned an error.

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Volume control

Postby igorzwx » Sun Jan 05, 2014 9:12 pm

george53 wrote:Thank you for your reply. However, I would prefer to change the volume within my program. Is there anything wrong with the code I posted?

I also tried to use ossmix from the command line but I do not understand the help text. What means "ctrl# value Change value of a mixer control" ? What should I enter to set the master volume?

When I entered "ossmix -d0 vol 100" it returned an error.


EXAMPLE:

Code: Select all

$ ossmix | grep vmix0-outvol
vmix0-outvol <monovol> (currently 25.0 dB)
$ ossmix vmix0-outvol 20
Value of mixer control vmix0-outvol set to 20.0
$ ossmix | grep vmix0-outvol
vmix0-outvol <monovol> (currently 20.0 dB)


Code: Select all

$ ossmix vmix0-outvol
Value of mixer control vmix0-outvol is currently set to 20.0 (dB)


Code: Select all

$ man ossmix
CHANGING MIXER SETTINGS
       Changing the values is done just like with the original "mixer" applet.
       For example:

               ossmix pcm 50:60

       The above sets the pcm control (audio playback volume) so that the left
       channel  volume  is  50  and  the right channel volume is 60. With just
       "ossmix pcm 50" the both channel volumes will be set to 50.

       In addition to the old mixer there are now some (usually  ON/OFF)  set‐
       tings.   These  settings  are  device  specific and don't work with all
       soundcards.  The easiest way to find them out is to start ossmix  with‐
       out command line arguments (other than -d#).

       Some  control  names  contain  a  dot  ("."). This dot is required when
       changing the value. For example: "ossmix -d0 mic.micboost ON".

EXAMPLES
       ossmix vol 50
              Set the vol control volume to 50. If the pcm control is a stereo
              control, than both channels will be set to 50.

       ossmix vol 50:60
              Set  the  vol  control so that the left channel volume is 50 and
              the right channel volume is 60.

       ossmix vol +2
              Raise vol volume by 2.

       ossmix -- vol +2:-2
              Raise the left channel volume by 2, and lower right channel vol‐
              ume  by  2.  The "--" is needed on some systems so that the "-2"
              won't be mistaken for a parameter.

       ossmix micboost ON
              Set micboost to ON.

george53
New Member
Posts: 5
Joined: Sun Jan 05, 2014 4:32 pm

Re: Volume control

Postby george53 » Sun Jan 05, 2014 10:02 pm

Thank you very much! Using "ossmix vmix0-outvol 0" I could turn the sound off and control the volume.

Using "ossmix jack.green.mute ON" I could turn off the sound and ON again. But "ossmix jack.green 0" had no effect. Do you have an explanation for that?

I would like to turn on the CD-ROM input. Can this be done with ossmix too? What control would I have to turn ON for that?

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Volume control

Postby igorzwx » Sun Jan 05, 2014 11:06 pm

george53 wrote:But "ossmix jack.green 0" had no effect. Do you have an explanation for that?


Type on terminal:

Code: Select all

 $ ossmix | grep jack.green


and post the output here (mark it as code).

george53 wrote:I would like to turn on the CD-ROM input. Can this be done with ossmix too? What control would I have to turn ON for that?


There is such "control" in the OSS Mixer for ancient AC'97 codecs (very old computers, e.g. of 2003) https://en.wikipedia.org/wiki/AC%2797
The OSS Mixer for Intel HDA codecs may not have such control.

george53
New Member
Posts: 5
Joined: Sun Jan 05, 2014 4:32 pm

Re: Volume control

Postby george53 » Mon Jan 06, 2014 5:58 pm

Here is the output of "ossmix | grep jack.green"

Code: Select all

jack.green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.green [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.green.mute ON|OFF (currently OFF)


and "ossmix | grep vmix" to compare:

Code: Select all

vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm11 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm12 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm13 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)


Thank you.

George

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Volume control

Postby igorzwx » Mon Jan 06, 2014 6:30 pm

george53 wrote:Here is the output of "ossmix | grep jack.green"

Code: Select all

jack.green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.green [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.green.mute ON|OFF (currently OFF)


and "ossmix | grep vmix" to compare:

Code: Select all

vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm11 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm12 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm13 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)


Thank you.

George


"jack.green" looks rather strange. Usually, it is a kind of "jack.green.front"

Something might be wrong with your "generic open-crap" driver.
The manual is here: _http://manuals.opensound.com/usersguide/oss_hdaudio.html
ALSA drivers for Intel HDA codecs are also a sort of "generic crap".

I have another Intel HDA codec/motherboard:

Code: Select all

$ ossmix | grep mixer
Selected mixer 0/High Definition Audio ALC887


Code: Select all

$ ossmix | grep jack.green
codec3.jack.green.mode <front|input> (currently front)
codec3.jack.green.mute ON|OFF (currently OFF)
codec3.jack.green.front [<leftvol>:<rightvol>] (currently 55.9:55.9 dB)
codec3.jack.green.front-mute ON|OFF (currently OFF)
codec3.jack.green.input-mix-mut ON|OFF (currently ON)


Code: Select all

$ ossmix codec3.jack.green.front 0
Value of mixer control codec3.jack.green.front set to 0.0:0.0

Code: Select all

$ ossmix codec3.jack.green.front
Value of mixer control codec3.jack.green.front is currently set to 0.0:0.0 (dB)


Code: Select all

$ ossmix codec3.jack.green.front 60
Value of mixer control codec3.jack.green.front set to 60.0:60.0


Post here the output of the following commands:

Code: Select all

$ ossmix jack.green 0


Code: Select all

$ ossmix jack.green


Code: Select all

$ ossmix jack.green 60


Code: Select all

$ ossmix | grep mixer


Code: Select all

$ ossmix


Code: Select all

$ ossinfo


Code: Select all

$ lspci -vnn


_________________________________________________
george53 wrote:

Code: Select all

vmix0-enable ON|OFF (currently ON)
vmix0-src <Fast|High|OFF> (currently Fast)


"Fast" is a very bad resampler. If you do not hear the difference, you may need to visit doctors.

Hearing Loss Testing, Hearing Aids, and Hearing Test Demonstration: _https://www.youtube.com/watch?v=96K1FWjQAK4
Hearing Loss and Dementia: _https://www.youtube.com/watch?v=-Js4vPv1eEQ

george53
New Member
Posts: 5
Joined: Sun Jan 05, 2014 4:32 pm

Re: Volume control

Postby george53 » Mon Jan 06, 2014 9:49 pm

Well this is quite a lot of data, but you asked for it:

$ ossmix jack.green

Code: Select all

Value of mixer control jack.green is currently set to 29.9:29.9 (dB)


$ ossmix jack.green 0

Code: Select all

Value of mixer control jack.green set to 0.0:0.0


$ ossmix jack.green

Code: Select all

Value of mixer control jack.green is currently set to 0.0:0.0 (dB)


$ ossmix jack.green 60

Code: Select all

Value of mixer control jack.green set to 60.0:60.0


$ ossmix jack.green

Code: Select all

Value of mixer control jack.green is currently set to 29.9:29.9 (dB)


$ ossmix | grep mixer

Code: Select all

Selected mixer 0/High Definition Audio ALC885


$ ossmix

Code: Select all

Selected mixer 0/High Definition Audio ALC885
Known controls are:
jack.green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.green [<leftvol>:<rightvol>] (currently 0.0:0.0 dB)
jack.green.mute ON|OFF (currently OFF)
jack.black.mode <front|rear|center/LFE|side|pcm4|input> (currently center/LFE)
jack.black [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.black.mute ON|OFF (currently OFF)
jack.orange.mode <front|rear|center/LFE|side|pcm4|input> (currently rear)
jack.orange [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.orange.mute ON|OFF (currently OFF)
jack.gray.mode <front|rear|center/LFE|side|pcm4|input> (currently pcm4)
jack.gray [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.gray.mute ON|OFF (currently OFF)
jack.pink.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.pink [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.pink.mute ON|OFF (currently OFF)
jack.fp-pink.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.fp-pink [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.fp-pink.mute ON|OFF (currently OFF)
jack.blue.mode <front|rear|center/LFE|side|pcm4|input> (currently input)
jack.blue [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.blue.mute ON|OFF (currently OFF)
jack.fp-green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.fp-green [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.fp-green.mute ON|OFF (currently OFF)
record.mix.mute.mic1 ON|OFF (currently OFF)
record.mix.mute.fp-mic1 ON|OFF (currently OFF)
record.mix.mute.linein1 ON|OFF (currently OFF)
record.mix.mute.fp-headphone1 ON|OFF (currently OFF)
record.mix.mute.green1 ON|OFF (currently OFF)
record.mix.mute.black1 ON|OFF (currently OFF)
record.mix.mute.orange1 ON|OFF (currently OFF)
record.mix.mute.gray1 ON|OFF (currently OFF)
record.mix.mute.input-mix1 ON|OFF (currently OFF)
record.mix1 [<leftvol>:<rightvol>] (currently 37.9:37.9 dB)
record.mix.mute.mic2 ON|OFF (currently OFF)
record.mix.mute.fp-mic2 ON|OFF (currently OFF)
record.mix.mute.linein2 ON|OFF (currently OFF)
record.mix.mute.fp-headphone2 ON|OFF (currently OFF)
record.mix.mute.green2 ON|OFF (currently OFF)
record.mix.mute.black2 ON|OFF (currently OFF)
record.mix.mute.orange2 ON|OFF (currently OFF)
record.mix.mute.gray2 ON|OFF (currently OFF)
record.mix.mute.input-mix2 ON|OFF (currently OFF)
record.mix2 [<leftvol>:<rightvol>] (currently 37.9:37.9 dB)
record.mix.mute.mic3 ON|OFF (currently OFF)
record.mix.mute.fp-mic3 ON|OFF (currently OFF)
record.mix.mute.linein3 ON|OFF (currently OFF)
record.mix.mute.fp-headphone3 ON|OFF (currently OFF)
record.mix.mute.green3 ON|OFF (currently OFF)
record.mix.mute.black3 ON|OFF (currently OFF)
record.mix.mute.orange3 ON|OFF (currently OFF)
record.mix.mute.gray3 ON|OFF (currently OFF)
record.mix.mute.input-mix3 ON|OFF (currently OFF)
record.mix3 [<leftvol>:<rightvol>] (currently 37.9:37.9 dB)
misc.mic [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.fp-mic [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.linein [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.fp-headphone [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.green [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.black [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.orange [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.gray [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.input-mix <mic|fp-mic|linein> (currently mic)
misc.front-mute ON|OFF (currently OFF)
misc.input-mix-mute1 ON|OFF (currently OFF)
misc.front1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.front2 <front|input-mix> (currently front)
misc.rear-mute ON|OFF (currently OFF)
misc.input-mix-mute2 ON|OFF (currently OFF)
misc.rear1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.rear2 <rear|input-mix> (currently rear)
misc.center/lfe-mute ON|OFF (currently OFF)
misc.input-mix-mute3 ON|OFF (currently OFF)
misc.center/lfe1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.center/lfe2 <center/LFE|input-mix> (currently center/LFE)
misc.side-mute ON|OFF (currently OFF)
misc.input-mix-mute4 ON|OFF (currently OFF)
misc.side1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.side2 <side|input-mix> (currently side)
misc.pcm4-mute ON|OFF (currently OFF)
misc.input-mix-mute5 ON|OFF (currently OFF)
misc.pcm41 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.pcm42 <pcm4|input-mix> (currently pcm4)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm11 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm12 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm13 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)


$ ossinfo

Code: Select all

Version info: OSS 4.2 (b 2006/201202181035) (0x00040100) GPL
Platform: Linux/i686 3.0.21-tinycore #3021 SMP Sat Feb 18 11:54:11 EET 2012 (box)

Number of audio devices:   12
Number of audio engines:   16
Number of MIDI devices:      0
Number of mixer devices:   2


Device objects
 0: osscore0 OSS core services
 1: oss_hdaudio0 ATI HD Audio interrupts=1187 (1187)
    HD Audio controller ATI HD Audio
    Vendor ID    0x10024383
    Subvendor ID 0x1458a022
     Codec  0: ALC885 (0x10ec0885/0x1458a002)
 2: oss_usb0 USB audio core services
 3: usb0d8c000e-0 USB sound device
 4: usb0d8c000e-1 USB sound device
 5: usb0d8c000e-2 USB sound device

MIDI devices (/dev/midi*)

Mixer devices
 0: High Definition Audio ALC885 (Mixer 0 of device object 1)
 1: USB sound device (Mixer 0 of device object 3)

Audio devices
HD Audio play front               /dev/oss/oss_hdaudio0/pcm0  (device index 0)
HD Audio play rear                /dev/oss/oss_hdaudio0/pcm1  (device index 1)
HD Audio play center/LFE          /dev/oss/oss_hdaudio0/pcm2  (device index 2)
HD Audio play side                /dev/oss/oss_hdaudio0/pcm3  (device index 3)
HD Audio play pcm4                /dev/oss/oss_hdaudio0/pcm4  (device index 4)
HD Audio play spdif-out           /dev/oss/oss_hdaudio0/spdout0  (device index 5)
HD Audio rec mix                  /dev/oss/oss_hdaudio0/pcmin0  (device index 6)
HD Audio rec mix                  /dev/oss/oss_hdaudio0/pcmin1  (device index 7)
HD Audio rec mix                  /dev/oss/oss_hdaudio0/pcmin2  (device index 8)
HD Audio rec spdifin              /dev/oss/oss_hdaudio0/spdin0  (device index 9)
USB sound device play             /dev/oss/usb0d8c000e-1/pcm0  (device index 10)
USB sound device rec              /dev/oss/usb0d8c000e-2/pcmin0  (device index 11)

Nodes
  /dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_hdaudio0/spdout0
  /dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0


$ lspci -vnn

Code: Select all

00:00.0 Host bridge [0600]: Advanced Micro Devices [AMD] RS780 Host Bridge [1022:9600]
   Subsystem: Advanced Micro Devices [AMD] RS780 Host Bridge [1022:9600]
   Flags: bus master, 66MHz, medium devsel, latency 32
   Memory at <ignored> (64-bit, non-prefetchable)
   Capabilities: <access denied>

00:02.0 PCI bridge [0604]: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (ext gfx port 0) [1022:9603] (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
   I/O behind bridge: 0000e000-0000efff
   Memory behind bridge: fde00000-fdefffff
   Prefetchable memory behind bridge: 00000000d0000000-00000000dfffffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:04.0 PCI bridge [0604]: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 0) [1022:9604] (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
   I/O behind bridge: 0000d000-0000dfff
   Memory behind bridge: fdd00000-fddfffff
   Prefetchable memory behind bridge: 00000000fdc00000-00000000fdcfffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:0a.0 PCI bridge [0604]: Advanced Micro Devices [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 5) [1022:9609] (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
   I/O behind bridge: 0000c000-0000cfff
   Memory behind bridge: fd900000-fd9fffff
   Prefetchable memory behind bridge: 00000000fdf00000-00000000fdffffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:11.0 SATA controller [0106]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode] [1002:4390] (prog-if 01 [AHCI 1.0])
   Subsystem: Giga-byte Technology GA-MA770-DS3rev2.0 Motherboard [1458:b002]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 43
   I/O ports at ff00 [size=8]
   I/O ports at fe00 [size=4]
   I/O ports at fd00 [size=8]
   I/O ports at fc00 [size=4]
   I/O ports at fb00 [size=16]
   Memory at fe02f000 (32-bit, non-prefetchable) [size=1K]
   Capabilities: <access denied>
   Kernel driver in use: ahci

00:12.0 USB Controller [0c03]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
   Memory at fe02e000 (32-bit, non-prefetchable) [size=4K]
   Kernel driver in use: ohci_hcd

00:12.1 USB Controller [0c03]: ATI Technologies Inc SB7x0 USB OHCI1 Controller [1002:4398] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
   Memory at fe02d000 (32-bit, non-prefetchable) [size=4K]
   Kernel driver in use: ohci_hcd

00:12.2 USB Controller [0c03]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396] (prog-if 20 [EHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 17
   Memory at fe02c000 (32-bit, non-prefetchable) [size=256]
   Capabilities: <access denied>
   Kernel driver in use: ehci_hcd

00:13.0 USB Controller [0c03]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 18
   Memory at fe02b000 (32-bit, non-prefetchable) [size=4K]
   Kernel driver in use: ohci_hcd

00:13.1 USB Controller [0c03]: ATI Technologies Inc SB7x0 USB OHCI1 Controller [1002:4398] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 18
   Memory at fe02a000 (32-bit, non-prefetchable) [size=4K]
   Kernel driver in use: ohci_hcd

00:13.2 USB Controller [0c03]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396] (prog-if 20 [EHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 19
   Memory at fe029000 (32-bit, non-prefetchable) [size=256]
   Capabilities: <access denied>
   Kernel driver in use: ehci_hcd

00:14.0 SMBus [0c05]: ATI Technologies Inc SBx00 SMBus Controller [1002:4385] (rev 3a)
   Subsystem: Giga-byte Technology GA-MA770-DS3rev2.0 Motherboard [1458:4385]
   Flags: 66MHz, medium devsel
   Capabilities: <access denied>

00:14.1 IDE interface [0101]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 IDE Controller [1002:439c] (prog-if 8a [Master SecP PriP])
   Subsystem: Giga-byte Technology Device [1458:5002]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
   I/O ports at 01f0 [size=8]
   I/O ports at 03f4 [size=1]
   I/O ports at 0170 [size=8]
   I/O ports at 0374 [size=1]
   I/O ports at fa00 [size=16]
   Capabilities: <access denied>
   Kernel driver in use: pata_atiixp

00:14.2 Audio device [0403]: ATI Technologies Inc SBx00 Azalia (Intel HDA) [1002:4383]
   Subsystem: Giga-byte Technology GA-MA770-DS3rev2.0 Motherboard [1458:a022]
   Flags: bus master, slow devsel, latency 32, IRQ 16
   Memory at fe024000 (64-bit, non-prefetchable) [size=16K]
   Capabilities: <access denied>
   Kernel driver in use: oss_hdaudio

00:14.3 ISA bridge [0601]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 LPC host controller [1002:439d]
   Subsystem: ATI Technologies Inc Device [1002:4383]
   Flags: bus master, 66MHz, medium devsel, latency 0

00:14.4 PCI bridge [0604]: ATI Technologies Inc SBx00 PCI to PCI Bridge [1002:4384] (prog-if 01 [Subtractive decode])
   Flags: bus master, VGA palette snoop, 66MHz, medium devsel, latency 64
   Bus: primary=00, secondary=04, subordinate=04, sec-latency=64
   I/O behind bridge: 0000b000-0000bfff
   Memory behind bridge: fdb00000-fdbfffff
   Prefetchable memory behind bridge: fda00000-fdafffff

00:14.5 USB Controller [0c03]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI2 Controller [1002:4399] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 18
   Memory at fe028000 (32-bit, non-prefetchable) [size=4K]
   Kernel driver in use: ohci_hcd

00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration [1022:1200]
   Flags: fast devsel
   Capabilities: <access denied>

00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h Processor Address Map [1022:1201]
   Flags: fast devsel

00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller [1022:1202]
   Flags: fast devsel

00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control [1022:1203]
   Flags: fast devsel
   Capabilities: <access denied>

00:18.4 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h Processor Link Control [1022:1204]
   Flags: fast devsel

01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Mobility Radeon HD 3600 Series [1002:9598] (prog-if 00 [VGA controller])
   Subsystem: PC Partner Limited Device [174b:e410]
   Flags: bus master, fast devsel, latency 0, IRQ 10
   Memory at d0000000 (64-bit, prefetchable) [size=256M]
   Memory at fdee0000 (64-bit, non-prefetchable) [size=64K]
   I/O ports at ee00 [size=256]
   [virtual] Expansion ROM at fde00000 [disabled] [size=128K]
   Capabilities: <access denied>

01:00.1 Audio device [0403]: ATI Technologies Inc RV635 Audio device [Radeon HD 3600 Series] [1002:aa20]
   Subsystem: PC Partner Limited Device [174b:aa20]
   Flags: bus master, fast devsel, latency 0, IRQ 3
   Memory at fdefc000 (64-bit, non-prefetchable) [size=16K]
   Capabilities: <access denied>

02:00.0 USB Controller [0c03]: NEC Corporation uPD720200 USB 3.0 Host Controller [1033:0194] (rev 03) (prog-if 30 [XHCI])
   Subsystem: Melco Inc Device [1154:0241]
   Flags: bus master, fast devsel, latency 0, IRQ 16
   Memory at fddfe000 (64-bit, non-prefetchable) [size=8K]
   Capabilities: <access denied>
   Kernel driver in use: xhci_hcd

03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 02)
   Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard [1458:e000]
   Flags: bus master, fast devsel, latency 0, IRQ 49
   I/O ports at ce00 [size=256]
   Memory at fdfff000 (64-bit, prefetchable) [size=4K]
   Memory at fdfe0000 (64-bit, prefetchable) [size=64K]
   [virtual] Expansion ROM at fdf00000 [disabled] [size=64K]
   Capabilities: <access denied>
   Kernel driver in use: r8169

04:0e.0 FireWire (IEEE 1394) [0c00]: Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link) [104c:8024] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard [1458:1000]
   Flags: bus master, medium devsel, latency 32, IRQ 11
   Memory at fdbff000 (32-bit, non-prefetchable) [size=2K]
   Memory at fdbf8000 (32-bit, non-prefetchable) [size=16K]
   Capabilities: <access denied>

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Volume control

Postby igorzwx » Mon Jan 06, 2014 11:12 pm

george53 wrote:Well this is quite a lot of data, but you asked for it:

$ ossmix jack.green

Code: Select all

Value of mixer control jack.green is currently set to 29.9:29.9 (dB)


$ ossmix jack.green 0

Code: Select all

Value of mixer control jack.green set to 0.0:0.0


$ ossmix jack.green

Code: Select all

Value of mixer control jack.green is currently set to 0.0:0.0 (dB)


$ ossmix jack.green 60

Code: Select all

Value of mixer control jack.green set to 60.0:60.0


$ ossmix jack.green

Code: Select all

Value of mixer control jack.green is currently set to 29.9:29.9 (dB)


$ ossmix | grep mixer

Code: Select all

Selected mixer 0/High Definition Audio ALC885


$ ossmix

Code: Select all

Selected mixer 0/High Definition Audio ALC885
Known controls are:
jack.green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.green [<leftvol>:<rightvol>] (currently 0.0:0.0 dB)
jack.green.mute ON|OFF (currently OFF)
jack.black.mode <front|rear|center/LFE|side|pcm4|input> (currently center/LFE)
jack.black [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.black.mute ON|OFF (currently OFF)
jack.orange.mode <front|rear|center/LFE|side|pcm4|input> (currently rear)
jack.orange [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.orange.mute ON|OFF (currently OFF)
jack.gray.mode <front|rear|center/LFE|side|pcm4|input> (currently pcm4)
jack.gray [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.gray.mute ON|OFF (currently OFF)
jack.pink.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.pink [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.pink.mute ON|OFF (currently OFF)
jack.fp-pink.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.fp-pink [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.fp-pink.mute ON|OFF (currently OFF)
jack.blue.mode <front|rear|center/LFE|side|pcm4|input> (currently input)
jack.blue [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.blue.mute ON|OFF (currently OFF)
jack.fp-green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.fp-green [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.fp-green.mute ON|OFF (currently OFF)
record.mix.mute.mic1 ON|OFF (currently OFF)
record.mix.mute.fp-mic1 ON|OFF (currently OFF)
record.mix.mute.linein1 ON|OFF (currently OFF)
record.mix.mute.fp-headphone1 ON|OFF (currently OFF)
record.mix.mute.green1 ON|OFF (currently OFF)
record.mix.mute.black1 ON|OFF (currently OFF)
record.mix.mute.orange1 ON|OFF (currently OFF)
record.mix.mute.gray1 ON|OFF (currently OFF)
record.mix.mute.input-mix1 ON|OFF (currently OFF)
record.mix1 [<leftvol>:<rightvol>] (currently 37.9:37.9 dB)
record.mix.mute.mic2 ON|OFF (currently OFF)
record.mix.mute.fp-mic2 ON|OFF (currently OFF)
record.mix.mute.linein2 ON|OFF (currently OFF)
record.mix.mute.fp-headphone2 ON|OFF (currently OFF)
record.mix.mute.green2 ON|OFF (currently OFF)
record.mix.mute.black2 ON|OFF (currently OFF)
record.mix.mute.orange2 ON|OFF (currently OFF)
record.mix.mute.gray2 ON|OFF (currently OFF)
record.mix.mute.input-mix2 ON|OFF (currently OFF)
record.mix2 [<leftvol>:<rightvol>] (currently 37.9:37.9 dB)
record.mix.mute.mic3 ON|OFF (currently OFF)
record.mix.mute.fp-mic3 ON|OFF (currently OFF)
record.mix.mute.linein3 ON|OFF (currently OFF)
record.mix.mute.fp-headphone3 ON|OFF (currently OFF)
record.mix.mute.green3 ON|OFF (currently OFF)
record.mix.mute.black3 ON|OFF (currently OFF)
record.mix.mute.orange3 ON|OFF (currently OFF)
record.mix.mute.gray3 ON|OFF (currently OFF)
record.mix.mute.input-mix3 ON|OFF (currently OFF)
record.mix3 [<leftvol>:<rightvol>] (currently 37.9:37.9 dB)
misc.mic [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.fp-mic [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.linein [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.fp-headphone [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.green [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.black [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.orange [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.gray [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.input-mix <mic|fp-mic|linein> (currently mic)
misc.front-mute ON|OFF (currently OFF)
misc.input-mix-mute1 ON|OFF (currently OFF)
misc.front1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.front2 <front|input-mix> (currently front)
misc.rear-mute ON|OFF (currently OFF)
misc.input-mix-mute2 ON|OFF (currently OFF)
misc.rear1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.rear2 <rear|input-mix> (currently rear)
misc.center/lfe-mute ON|OFF (currently OFF)
misc.input-mix-mute3 ON|OFF (currently OFF)
misc.center/lfe1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.center/lfe2 <center/LFE|input-mix> (currently center/LFE)
misc.side-mute ON|OFF (currently OFF)
misc.input-mix-mute4 ON|OFF (currently OFF)
misc.side1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.side2 <side|input-mix> (currently side)
misc.pcm4-mute ON|OFF (currently OFF)
misc.input-mix-mute5 ON|OFF (currently OFF)
misc.pcm41 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.pcm42 <pcm4|input-mix> (currently pcm4)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm11 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm12 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm13 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)


$ ossinfo

Code: Select all

Version info: OSS 4.2 (b 2006/201202181035) (0x00040100) GPL
Platform: Linux/i686 3.0.21-tinycore #3021 SMP Sat Feb 18 11:54:11 EET 2012 (box)

Number of audio devices:   12
Number of audio engines:   16
Number of MIDI devices:      0
Number of mixer devices:   2


Device objects
 0: osscore0 OSS core services
 1: oss_hdaudio0 ATI HD Audio interrupts=1187 (1187)
    HD Audio controller ATI HD Audio
    Vendor ID    0x10024383
    Subvendor ID 0x1458a022
     Codec  0: ALC885 (0x10ec0885/0x1458a002)
 2: oss_usb0 USB audio core services
 3: usb0d8c000e-0 USB sound device
 4: usb0d8c000e-1 USB sound device
 5: usb0d8c000e-2 USB sound device

MIDI devices (/dev/midi*)

Mixer devices
 0: High Definition Audio ALC885 (Mixer 0 of device object 1)
 1: USB sound device (Mixer 0 of device object 3)

Audio devices
HD Audio play front               /dev/oss/oss_hdaudio0/pcm0  (device index 0)
HD Audio play rear                /dev/oss/oss_hdaudio0/pcm1  (device index 1)
HD Audio play center/LFE          /dev/oss/oss_hdaudio0/pcm2  (device index 2)
HD Audio play side                /dev/oss/oss_hdaudio0/pcm3  (device index 3)
HD Audio play pcm4                /dev/oss/oss_hdaudio0/pcm4  (device index 4)
HD Audio play spdif-out           /dev/oss/oss_hdaudio0/spdout0  (device index 5)
HD Audio rec mix                  /dev/oss/oss_hdaudio0/pcmin0  (device index 6)
HD Audio rec mix                  /dev/oss/oss_hdaudio0/pcmin1  (device index 7)
HD Audio rec mix                  /dev/oss/oss_hdaudio0/pcmin2  (device index 8)
HD Audio rec spdifin              /dev/oss/oss_hdaudio0/spdin0  (device index 9)
USB sound device play             /dev/oss/usb0d8c000e-1/pcm0  (device index 10)
USB sound device rec              /dev/oss/usb0d8c000e-2/pcmin0  (device index 11)

Nodes
  /dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_hdaudio0/spdout0
  /dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0


$ lspci -vnn

Code: Select all

00:00.0 Host bridge [0600]: Advanced Micro Devices [AMD] RS780 Host Bridge [1022:9600]
   Subsystem: Advanced Micro Devices [AMD] RS780 Host Bridge [1022:9600]
   Flags: bus master, 66MHz, medium devsel, latency 32
   Memory at <ignored> (64-bit, non-prefetchable)
   Capabilities: <access denied>

00:02.0 PCI bridge [0604]: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (ext gfx port 0) [1022:9603] (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
   I/O behind bridge: 0000e000-0000efff
   Memory behind bridge: fde00000-fdefffff
   Prefetchable memory behind bridge: 00000000d0000000-00000000dfffffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:04.0 PCI bridge [0604]: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 0) [1022:9604] (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
   I/O behind bridge: 0000d000-0000dfff
   Memory behind bridge: fdd00000-fddfffff
   Prefetchable memory behind bridge: 00000000fdc00000-00000000fdcfffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:0a.0 PCI bridge [0604]: Advanced Micro Devices [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 5) [1022:9609] (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
   I/O behind bridge: 0000c000-0000cfff
   Memory behind bridge: fd900000-fd9fffff
   Prefetchable memory behind bridge: 00000000fdf00000-00000000fdffffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:11.0 SATA controller [0106]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode] [1002:4390] (prog-if 01 [AHCI 1.0])
   Subsystem: Giga-byte Technology GA-MA770-DS3rev2.0 Motherboard [1458:b002]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 43
   I/O ports at ff00 [size=8]
   I/O ports at fe00 [size=4]
   I/O ports at fd00 [size=8]
   I/O ports at fc00 [size=4]
   I/O ports at fb00 [size=16]
   Memory at fe02f000 (32-bit, non-prefetchable) [size=1K]
   Capabilities: <access denied>
   Kernel driver in use: ahci

00:12.0 USB Controller [0c03]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
   Memory at fe02e000 (32-bit, non-prefetchable) [size=4K]
   Kernel driver in use: ohci_hcd

00:12.1 USB Controller [0c03]: ATI Technologies Inc SB7x0 USB OHCI1 Controller [1002:4398] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
   Memory at fe02d000 (32-bit, non-prefetchable) [size=4K]
   Kernel driver in use: ohci_hcd

00:12.2 USB Controller [0c03]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396] (prog-if 20 [EHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 17
   Memory at fe02c000 (32-bit, non-prefetchable) [size=256]
   Capabilities: <access denied>
   Kernel driver in use: ehci_hcd

00:13.0 USB Controller [0c03]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 18
   Memory at fe02b000 (32-bit, non-prefetchable) [size=4K]
   Kernel driver in use: ohci_hcd

00:13.1 USB Controller [0c03]: ATI Technologies Inc SB7x0 USB OHCI1 Controller [1002:4398] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 18
   Memory at fe02a000 (32-bit, non-prefetchable) [size=4K]
   Kernel driver in use: ohci_hcd

00:13.2 USB Controller [0c03]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396] (prog-if 20 [EHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 19
   Memory at fe029000 (32-bit, non-prefetchable) [size=256]
   Capabilities: <access denied>
   Kernel driver in use: ehci_hcd

00:14.0 SMBus [0c05]: ATI Technologies Inc SBx00 SMBus Controller [1002:4385] (rev 3a)
   Subsystem: Giga-byte Technology GA-MA770-DS3rev2.0 Motherboard [1458:4385]
   Flags: 66MHz, medium devsel
   Capabilities: <access denied>

00:14.1 IDE interface [0101]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 IDE Controller [1002:439c] (prog-if 8a [Master SecP PriP])
   Subsystem: Giga-byte Technology Device [1458:5002]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
   I/O ports at 01f0 [size=8]
   I/O ports at 03f4 [size=1]
   I/O ports at 0170 [size=8]
   I/O ports at 0374 [size=1]
   I/O ports at fa00 [size=16]
   Capabilities: <access denied>
   Kernel driver in use: pata_atiixp

00:14.2 Audio device [0403]: ATI Technologies Inc SBx00 Azalia (Intel HDA) [1002:4383]
   Subsystem: Giga-byte Technology GA-MA770-DS3rev2.0 Motherboard [1458:a022]
   Flags: bus master, slow devsel, latency 32, IRQ 16
   Memory at fe024000 (64-bit, non-prefetchable) [size=16K]
   Capabilities: <access denied>
   Kernel driver in use: oss_hdaudio

00:14.3 ISA bridge [0601]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 LPC host controller [1002:439d]
   Subsystem: ATI Technologies Inc Device [1002:4383]
   Flags: bus master, 66MHz, medium devsel, latency 0

00:14.4 PCI bridge [0604]: ATI Technologies Inc SBx00 PCI to PCI Bridge [1002:4384] (prog-if 01 [Subtractive decode])
   Flags: bus master, VGA palette snoop, 66MHz, medium devsel, latency 64
   Bus: primary=00, secondary=04, subordinate=04, sec-latency=64
   I/O behind bridge: 0000b000-0000bfff
   Memory behind bridge: fdb00000-fdbfffff
   Prefetchable memory behind bridge: fda00000-fdafffff

00:14.5 USB Controller [0c03]: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI2 Controller [1002:4399] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology Device [1458:5004]
   Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 18
   Memory at fe028000 (32-bit, non-prefetchable) [size=4K]
   Kernel driver in use: ohci_hcd

00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration [1022:1200]
   Flags: fast devsel
   Capabilities: <access denied>

00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h Processor Address Map [1022:1201]
   Flags: fast devsel

00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller [1022:1202]
   Flags: fast devsel

00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control [1022:1203]
   Flags: fast devsel
   Capabilities: <access denied>

00:18.4 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h Processor Link Control [1022:1204]
   Flags: fast devsel

01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Mobility Radeon HD 3600 Series [1002:9598] (prog-if 00 [VGA controller])
   Subsystem: PC Partner Limited Device [174b:e410]
   Flags: bus master, fast devsel, latency 0, IRQ 10
   Memory at d0000000 (64-bit, prefetchable) [size=256M]
   Memory at fdee0000 (64-bit, non-prefetchable) [size=64K]
   I/O ports at ee00 [size=256]
   [virtual] Expansion ROM at fde00000 [disabled] [size=128K]
   Capabilities: <access denied>

01:00.1 Audio device [0403]: ATI Technologies Inc RV635 Audio device [Radeon HD 3600 Series] [1002:aa20]
   Subsystem: PC Partner Limited Device [174b:aa20]
   Flags: bus master, fast devsel, latency 0, IRQ 3
   Memory at fdefc000 (64-bit, non-prefetchable) [size=16K]
   Capabilities: <access denied>

02:00.0 USB Controller [0c03]: NEC Corporation uPD720200 USB 3.0 Host Controller [1033:0194] (rev 03) (prog-if 30 [XHCI])
   Subsystem: Melco Inc Device [1154:0241]
   Flags: bus master, fast devsel, latency 0, IRQ 16
   Memory at fddfe000 (64-bit, non-prefetchable) [size=8K]
   Capabilities: <access denied>
   Kernel driver in use: xhci_hcd

03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 02)
   Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard [1458:e000]
   Flags: bus master, fast devsel, latency 0, IRQ 49
   I/O ports at ce00 [size=256]
   Memory at fdfff000 (64-bit, prefetchable) [size=4K]
   Memory at fdfe0000 (64-bit, prefetchable) [size=64K]
   [virtual] Expansion ROM at fdf00000 [disabled] [size=64K]
   Capabilities: <access denied>
   Kernel driver in use: r8169

04:0e.0 FireWire (IEEE 1394) [0c00]: Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link) [104c:8024] (prog-if 10 [OHCI])
   Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard [1458:1000]
   Flags: bus master, medium devsel, latency 32, IRQ 11
   Memory at fdbff000 (32-bit, non-prefetchable) [size=2K]
   Memory at fdbf8000 (32-bit, non-prefetchable) [size=16K]
   Capabilities: <access denied>


george53 wrote:Well this is quite a lot of data, but you asked for it


OSS4 users are expected to provide such data before asking questions on this forum.

george53 wrote:Using "ossmix jack.green.mute ON" I could turn off the sound and ON again. But "ossmix jack.green 0" had no effect. Do you have an explanation for that?


"ossmix jack.green 0" works as it should. But you may not hear any effect. This seems to be your problem. Right?

Some Azalia codecs support front panel connectors and so if you see
fp-green and fp-pink connectors, then these are for front panel
speaker and mic/line-in Jacks. _http://manuals.opensound.com/usersguide/oss_hdaudio.html


This is your microphone jack (configured for output, not for input):

Code: Select all

jack.fp-pink.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.fp-pink [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.fp-pink.mute ON|OFF (currently OFF)


This is your earphone jack (configured for output, not muted):

Code: Select all

jack.fp-green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.fp-green [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.fp-green.mute ON|OFF (currently OFF)


Notice that Intel HDA codecs allow to use microphone jack (pink) for playback, and earphone jack (green) for recording sound with microphone. It depends on ossmix settings.

1. Run "ossxmix".

2. Find out which controls work for your purpose.

3. Try to change them from terminal with "ossmix".

george53 wrote:and "ossmix | grep vmix" to compare


"jack.green" and "vmix0-outvol" do not seem to be comparable. The reason is simple. They are different sorts of crap produced by different open-crap drivers:

1. "jack.green" was produced by the "generic open-crap" driver oss_hdaudio _http://manuals.opensound.com/usersguide/oss_hdaudio.html

2. "vmix0-outvol" belongs to a very special sort of "virtual crap" which tends to be called "virtual mixer" (vmix). It is a kind of PulseAudio with crappy resamplers (vmix0-src) for semi-deaf Linux users.

3. "vmix0-outvol" is a "universal crap", you may have it on any computer with OSS4 installed and vmix enabled.

4. "jack.green" is not a "universal crap", you may not have this "control" for other HDA codecs.

Foreigners have souls; the English haven't... The worst kind of soul is the great Slav soul. People who suffer from it are usually very deep thinkers.
They may say things like this: 'Sometimes I am so merry and sometimes I am so sad. Can you explain why?' (You cannot, do not try.)
George Mikes, How to be an Alien (1946)


How to be an Alien:
_https://en.wikipedia.org/wiki/How_to_be_an_Alien
_http://f2.org/humour/howalien.html
_http://f2.org/humour/howalien.html#Soul

You may want to read some manuals for "very deep thinkers":

1. Manual for oss_hdaudio _http://manuals.opensound.com/usersguide/oss_hdaudio.html
2. Troubleshooting HD Audio devices _https://wiki.archlinux.org/index.php/OSS#Troubleshooting_HD_Audio_devices

NOTE: Arch Linux Wiki seems to be a very special mixture of useful technical knowledge and "false information" (if not lunatic ravings).

seawright
Member
Posts: 94
Joined: Sat Jan 06, 2007 9:10 pm
Location: Hampshire UK

Re: Volume control

Postby seawright » Thu Jan 09, 2014 9:35 pm

What version of mpg123 are you using?
Version 1.17.0 is oss4 aware provided that the configure script locates the correct version of soundcard.h ie. /usr/lib/oss/include/sys/soundcard.h and not one provided by the kernel. You may need to provide a link:

Code: Select all

sudo ln -sf /usr/lib/oss/include/sys/soundcard.h /usr/include/sys/soundcard.h

Using the command:

Code: Select all

mpg123 --gain 100 -C -o oss /path_to/mp3_file.mp3

will ensure that the appropriate vmix0.pcm channel is set to maximum eg.

Code: Select all

Value of mixer control vmix0.pcm8 is currently set to 25.0:25.0 (dB)

Volume can be adjusted with keyboard or keypad "+" and "-" keys but this uses a software control within mpg123.
There is no mute control but pausing playback using the spacebar may be more appropriate.

As in says in mpg123's man page:
-g gain, --gain gain
[DEPRECATED] Set audio hardware output gain (default: don't
change). The unit of the gain value is hardware and output mod‐
ule dependent. (This parameter is only provided for backwards
compatibility and may be removed in the future without prior
notice. Use the audio player for playing and a mixer app for
mixing, UNIX style!)

regards
Clive

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: Volume control

Postby igorzwx » Fri Jan 10, 2014 2:18 am

george53 wrote:
Using "ossmix jack.green.mute ON" I could turn off the sound and ON again. But "ossmix jack.green 0" had no effect. Do you have an explanation for that?

Code: Select all

$ lspci -vnn
00:14.2 Audio device [0403]: ATI Technologies Inc SBx00 Azalia (Intel HDA) [1002:4383]
   Subsystem: Giga-byte Technology GA-MA770-DS3rev2.0 Motherboard [1458:a022]
   Flags: bus master, slow devsel, latency 32, IRQ 16
   Memory at fe024000 (64-bit, non-prefetchable) [size=16K]
   Capabilities: <access denied>
   Kernel driver in use: oss_hdaudio


Code: Select all

$ ossmix | grep mixer
Selected mixer 0/High Definition Audio ALC885



The HDA codec might be misidentified by the generic driver oss_hdaudio _http://manuals.opensound.com/usersguide/oss_hdaudio.html

"jack.green" may not be "green". It might be a kind of "generic deception".

However codecs are different. To make things even worse motherboard
manufacturers have complete freedom to decide which I/O pin they connect
the jacks and other audio inputs and outputs. It is not enough to write
just one mixer driver for each codec. This needs to be done by hand for
every single motherboard (unless there are boards that have the pins
assigned in the same way).
The mixgen.c can be used to create a skeleton of a mixer driver. Then
the result can be fine tuned by using trial and error approach.
Hannu _http://permalink.gmane.org/gmane.comp.audio.oss.devel/1155


Even if the HDA codec is correctly identified, the driver may fail simply because "motherboard manufacturers have complete freedom to decide which I/O pin they connect the jacks and other audio inputs and outputs."
The ALSA drivers have a similar problem.


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 3 guests