Discussion:
How do I change the default per-application sound volume in sndiod?
John Batteen
2021-04-26 04:57:42 UTC
Permalink
Greetings misc,

I am running 6.9 and am having some difficulty. I have outputs.master=255,255 set in mixerctl.conf (it is the only line in the file), but every time I open an application its individual volume is set to 0.496. For example, sndioctl reveals:

input.level=0.490
input.mute=0
output.level=1.000
output.mute=0
app/mplayer0.level=0.496

This is very quiet on my setup and I have to manually adjust the volume every time. I have read the entirety of the sndiod, sndioctl, mixerctl, and mixerctl.conf man pages, and I can't find anything that tells me how to change that default 0.496 value. I'd rather have it stay at 1. I've tried modifying every value that was set to 126 (0.496 * 255) or anywhere close to it in the default mixerctl to 255,255 with mixerctl.conf but it still happens. Is this intended behavior?

Thank you very much for your time, I appreciate it. The outputs of dmesg and mixerctl follow.

OpenBSD 6.9-current (GENERIC.MP) #477: Sat Apr 24 16:08:13 MDT 2021
***@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8539095040 (8143MB)
avail mem = 8264933376 (7882MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xeb1d0 (105 entries)
bios0: vendor American Megatrends Inc. version "3801" date 09/12/2013
bios0: ASUSTeK COMPUTER INC. P8P67 LE
acpi0 at bios0: ACPI 4.0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG HPET SSDT SSDT SSDT
acpi0: wakeup devices UAR1(S4) P0P1(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP06(S4) PXSX(S4) RP07(S4) PXSX(S4) RP08(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz, 3300.49 MHz, 06-2a-07
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz, 3300.03 MHz, 06-2a-07
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz, 3300.04 MHz, 06-2a-07
cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz, 3300.03 MHz, 06-2a-07
cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf8000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 2 (RP01)
acpiprt3 at acpi0: bus -1 (RP02)
acpiprt4 at acpi0: bus -1 (RP03)
acpiprt5 at acpi0: bus -1 (RP04)
acpiprt6 at acpi0: bus 5 (RP06)
acpiprt7 at acpi0: bus 6 (RP07)
acpiprt8 at acpi0: bus 7 (RP08)
acpiprt9 at acpi0: bus 1 (PEG0)
acpiprt10 at acpi0: bus -1 (PEG1)
acpiprt11 at acpi0: bus -1 (PEG2)
acpiprt12 at acpi0: bus -1 (PEG3)
acpiprt13 at acpi0: bus 3 (RP05)
acpiprt14 at acpi0: bus 4 (PXSX)
acpiec0 at acpi0
acpiec at acpi0 not configured
acpipci0 at acpi0 PCI0: 0x00000004 0x00000011 0x00000001
acpicmos0 at acpi0
"pnp0c14" at acpi0 not configured
acpibtn0 at acpi0: PWRB
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: C3(***@104 ***@0x20), C1(***@1 mwait.1), PSS
acpicpu1 at acpi0: C3(***@104 ***@0x20), C1(***@1 mwait.1), PSS
acpicpu2 at acpi0: C3(***@104 ***@0x20), C1(***@1 mwait.1), PSS
acpicpu3 at acpi0: C3(***@104 ***@0x20), C1(***@1 mwait.1), PSS
acpipwrres0 at acpi0: FN00, resource for FAN0
acpipwrres1 at acpi0: FN01, resource for FAN1
acpipwrres2 at acpi0: FN02, resource for FAN2
acpipwrres3 at acpi0: FN03, resource for FAN3
acpipwrres4 at acpi0: FN04, resource for FAN4
acpitz0 at acpi0: critical temperature is 99 degC
acpitz1 at acpi0: critical temperature is 99 degC
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD02
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 3300 MHz: speeds: 3301, 3300, 3200, 3100, 2900, 2800, 2700, 2600, 2400, 2300, 2200, 2100, 2000, 1800, 1700, 1600 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
ppb0 at pci0 dev 1 function 0 "Intel Core 2G PCIE" rev 0x09: msi
pci1 at ppb0 bus 1
radeondrm0 at pci1 dev 0 function 0 "ATI Radeon HD 6870" rev 0x00
drm0 at radeondrm0
radeondrm0: msi
azalia0 at pci1 dev 0 function 1 vendor "ATI", unknown product 0xaa88 rev 0x00: msi
azalia0: no supported codecs
"Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x05: apic 2 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia1 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x05: msi
azalia1: codecs: Realtek ALC892
audio0 at azalia1
ppb1 at pci0 dev 28 function 0 "Intel 6 Series PCIE" rev 0xb5: msi
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 4 "Intel 82801BA Hub-to-PCI" rev 0xb5: msi
pci3 at ppb2 bus 3
ppb3 at pci3 dev 0 function 0 "ASMedia ASM1083/1085 PCIE-PCI" rev 0x01
pci4 at ppb3 bus 4
"VIA VT6306 FireWire" rev 0xc0 at pci4 dev 3 function 0 not configured
ppb4 at pci0 dev 28 function 5 "Intel 6 Series PCIE" rev 0xb5: msi
pci5 at ppb4 bus 5
re0 at pci5 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E (0x2c00), msi, address f4:6d:04:29:c3:94
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
ppb5 at pci0 dev 28 function 6 "Intel 6 Series PCIE" rev 0xb5: msi
pci6 at ppb5 bus 6
pciide0 at pci6 dev 0 function 0 vendor "Marvell", unknown product 0x91a0 rev 0x12: DMA (unsupported), channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide0: using apic 2 int 18 for native-PCI interrupt
pciide0: channel 0 ignored (not responding; disabled or no drives?)
pciide0: channel 1 ignored (not responding; disabled or no drives?)
pciide1 at pci6 dev 0 function 1 vendor "Marvell", unknown product 0x91a4 rev 0x12: DMA (unsupported), channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide1: using apic 2 int 19 for native-PCI interrupt
pciide1: channel 0 ignored (not responding; disabled or no drives?)
pciide1: channel 1 ignored (not responding; disabled or no drives?)
ppb6 at pci0 dev 28 function 7 "Intel 6 Series PCIE" rev 0xb5: msi
pci7 at ppb6 bus 7
xhci0 at pci7 dev 0 function 0 "ASMedia ASM1042 xHCI" rev 0x00: msi, xHCI 0.96
usb1 at xhci0: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "ASMedia xHCI root hub" rev 3.00/1.00 addr 1
ehci1 at pci0 dev 29 function 0 "Intel 6 Series USB" rev 0x05: apic 2 int 23
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel P67 LPC" rev 0x05
ahci0 at pci0 dev 31 function 2 "Intel 6 Series AHCI" rev 0x05: msi, AHCI 1.3
ahci0: port 3: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 3 lun 0: <ATA, FUJITSU MJA2250B, 0040> naa.500000e04445640d
sd0: 238475MB, 512 bytes/sector, 488397168 sectors
ichiic0 at pci0 dev 31 function 3 "Intel 6 Series SMBus" rev 0x05: apic 2 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-10600
spdmem1 at iic0 addr 0x51: 4GB DDR3 SDRAM PC3-10600
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
wbsio0 at isa0 port 0x2e/2: NCT6776F rev 0x33
lm1 at wbsio0 port 0x290/8: NCT6776F
uhub3 at uhub0 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uhub4 at uhub2 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uhidev0 at uhub4 port 1 configuration 1 interface 0 "Dell Dell USB Keyboard" rev 1.10/3.01 addr 3
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev1 at uhub4 port 2 configuration 1 interface 0 "Logitech USB Optical Mouse" rev 2.00/72.00 addr 4
uhidev1: iclass 3/1
ums0 at uhidev1: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (0569101a34c3614e.a) swap on sd0b dump on sd0b
radeondrm0: BARTS
radeondrm0: 1280x1024, 32bpp
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wskbd1: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)



inputs.dac-0:1=192,192
inputs.dac-4:5=126,126
inputs.dac-2:3=126,126
inputs.dac-6:7=126,126
record.adc-0:1_mute=off
record.adc-0:1=125,125
record.adc-2:3_mute=off
record.adc-2:3=125,125
inputs.mix_source=mic,mic2,line-in,hp,line-grn,line-blk,line-org,line-gry
inputs.mix_mic=120,120
inputs.mix_mic2=120,120
inputs.mix_line-in=120,120
inputs.mix_hp=120,120
inputs.mix_line-grn=120,120
inputs.mix_line-blk=120,120
inputs.mix_line-org=120,120
inputs.mix_line-gry=120,120
inputs.mix2_source=dac-0:1,mix
inputs.mix3_source=dac-4:5,mix
inputs.mix4_source=dac-2:3,mix
inputs.mix5_source=dac-6:7,mix
outputs.SPDIF_source=dig-dac-2:3
outputs.line-grn_source=mix2
outputs.line-grn_mute=off
outputs.line-grn_dir=output
outputs.line-grn_boost=off
outputs.line-grn_eapd=on
outputs.line-blk_source=mix3
outputs.line-blk_mute=off
outputs.line-blk_dir=output
outputs.line-org_source=mix4
outputs.line-org_mute=off
outputs.line-org_dir=output
outputs.line-gry_source=mix5
outputs.line-gry_mute=off
outputs.line-gry_dir=output
outputs.mic_source=mix2
outputs.mic_mute=off
inputs.mic=85,85
outputs.mic_dir=input-vr80
outputs.mic2_source=mix2
outputs.mic2_mute=off
inputs.mic2=85,85
outputs.mic2_dir=input-vr80
outputs.mic2_boost=off
outputs.line-in_source=mix2
outputs.line-in_mute=off
inputs.line-in=85,85
outputs.line-in_dir=input
outputs.hp_source=mix8
outputs.hp_mute=off
inputs.hp=85,85
outputs.hp_dir=output
outputs.hp_boost=off
outputs.hp_eapd=on
outputs.SPDIF2_source=dig-dac-0:1
record.adc-2:3_source=mic,mic2,line-in,hp,line-grn,line-blk,line-org,line-gry,mix
record.adc-0:1_source=mic,mic2,line-in,hp,line-grn,line-blk,line-org,line-gry,mix
inputs.dac-8:9=192,192
inputs.mix8_source=dac-8:9,mix
outputs.line-grn_sense=plugged
outputs.line-blk_sense=unplugged
outputs.line-org_sense=unplugged
outputs.line-gry_sense=unplugged
outputs.mic_sense=unplugged
outputs.mic2_sense=unplugged
outputs.line-in_sense=unplugged
outputs.hp_sense=unplugged
outputs.master=255,255
outputs.master.mute=off
outputs.master.slaves=dac-0:1,line-grn,hp,dac-8:9
record.volume=125,125
record.volume.mute=off
record.volume.slaves=adc-0:1,adc-2:3
outputs.mode=analog
record.enable=sysctl
Maurice McCarthy
2021-04-26 11:23:17 UTC
Permalink
I only run stable 6.8 but I do this with a sndioctl output.level
command in .profile or .kshrc

HTH
Maurice McCarthy
2021-04-26 11:24:52 UTC
Permalink
/usr/bin/sndioctl app/mplayer0.level=1.000

perhaps
Alexandre Ratchov
2021-04-26 12:43:04 UTC
Permalink
Post by John Batteen
Greetings misc,
I am running 6.9 and am having some difficulty. I have
outputs.master=255,255 set in mixerctl.conf (it is the only line in
the file), but every time I open an application its individual
input.level=0.490
input.mute=0
output.level=1.000
output.mute=0
app/mplayer0.level=0.496
This is very quiet on my setup and I have to manually adjust the
volume every time. I have read the entirety of the sndiod,
sndioctl, mixerctl, and mixerctl.conf man pages, and I can't find
anything that tells me how to change that default 0.496 value. I'd
rather have it stay at 1. I've tried modifying every value that was
set to 126 (0.496 * 255) or anywhere close to it in the default
mixerctl to 255,255 with mixerctl.conf but it still happens. Is
this intended behavior?
When a program exits, its level setting is kept in memory by sndiod;
when the program is started again, it continues with its saved
level. The initial level is 1.

So when the system starts, app/mplayer0.level is supposed to be 1.

Is the problem with mplayer only or with all programs? If it's mplayer
only, is there something in ~/.mplayer/config that could cause this?
John Batteen
2021-04-26 14:32:52 UTC
Permalink
Post by Alexandre Ratchov
Post by John Batteen
Greetings misc,
I am running 6.9 and am having some difficulty. I have
outputs.master=255,255 set in mixerctl.conf (it is the only line in
the file), but every time I open an application its individual
input.level=0.490
input.mute=0
output.level=1.000
output.mute=0
app/mplayer0.level=0.496
This is very quiet on my setup and I have to manually adjust the
volume every time. I have read the entirety of the sndiod,
sndioctl, mixerctl, and mixerctl.conf man pages, and I can't find
anything that tells me how to change that default 0.496 value. I'd
rather have it stay at 1. I've tried modifying every value that was
set to 126 (0.496 * 255) or anywhere close to it in the default
mixerctl to 255,255 with mixerctl.conf but it still happens. Is
this intended behavior?
When a program exits, its level setting is kept in memory by sndiod;
when the program is started again, it continues with its saved
level. The initial level is 1.
So when the system starts, app/mplayer0.level is supposed to be 1.
Is the problem with mplayer only or with all programs? If it's mplayer
only, is there something in ~/.mplayer/config that could cause this?
I owe you a beverage of your choosing. Reinstalling on a machine I haven't used for ages and I copied over an old home directory without much thought. There it was. My apologies for cluttering the list.
Loading...