Opened 16 years ago

Closed 16 years ago

#157 closed defect (fixed)

Map ALSA "PC Speaker" to IOCTL90 "MonoIn"

Reported by: rudi Owned by:
Priority: normal Milestone:
Component: Building Version: 1.1.4RC6
Severity: normal Keywords:
Cc:

Description

This should allow the PC speaker volume/mute on certain notebooks to be controlled via LBMixer.

Attachments (1)

uniaud16.sys (71.2 KB ) - added by Paul Smedley 16 years ago.
Test uniaud16.sys

Download all attachments as: .zip

Change History (4)

by Paul Smedley, 16 years ago

Attachment: uniaud16.sys added

Test uniaud16.sys

comment:1 by Paul Smedley, 16 years ago

This diff + the attached uniaud16.sys might be enough to implement this request: Index: mixer.cpp =================================================================== --- mixer.cpp (revision 400) +++ mixer.cpp (working copy) @@ -49,7 +49,7 @@

#define IOCTL90_MAX_CONTROLS 0x10 static int IOCTL90ToALSAControl[IOCTL90_MAX_CONTROLS][3] = { IOCTL90 id ALSA id, ALSA id 2, fIsProperty

-/* MONOIN */ -1 , -1, FALSE, +/* MONOIN */ OSS32_MIX_VOLUME_SPEAKER, -1, FALSE,

/* PHONESET */ OSS32_MIX_VOLUME_PHONE, -1, FALSE, /* MICSET */ OSS32_MIX_VOLUME_MIC, -1, FALSE, /* LINESET */ OSS32_MIX_VOLUME_LINEIN, -1, FALSE,

@@ -78,7 +78,7 @@

/* OSS32_MIX_VOLUME_CD */ CDSET & 0xF, /* OSS32_MIX_VOLUME_SPDIF */ -1, /* OSS32_MIX_VOLUME_VIDEO */ VIDEOSET & 0xF,

-/* OSS32_MIX_VOLUME_SPEAKER */ -1, +/* OSS32_MIX_VOLUME_SPEAKER */ MONOINSET & 0xF,

/* OSS32_MIX_VOLUME_PHONE */ PHONESET & 0xF, /* OSS32_MIX_VOLUME_HEADPHONE */ -1, /* OSS32_MIX_VOLUME_AUX */ AUXSET & 0xF,

@@ -691,6 +691,15 @@

IoctlMixer(&rp, LDev);

} if(mixcaps.fuCtrlCaps & OSS32_MIX_FLAG(OSS32_MIX_VOLUME_SPEAKER)) {

+ ALSAIOCTLMap[MONOINSET] = 1; + ALSAIOCTLMap[MONOINQUERY] = 1; + + Set MONOIN + rp.s.ioctl.bCode = MONOINSET; + rp.s.ioctl.pvData = (void FAR *)&mixinfo; + mixinfo.Mute = 1; + mixinfo.VolumeR = mixinfo.VolumeL = 80; + IoctlMixer(&rp, LDev);

} if(mixcaps.fuCtrlCaps & OSS32_MIX_FLAG(OSS32_MIX_VOLUME_PHONE)) {

ALSAIOCTLMap[PHONESET] = 1;

comment:2 by rudi, 16 years ago

Hi Paul,

looks good so far !

I'm currently running the new UNIAUD16 with an unmodified older version of UNIAUD32 and I can mute/unmute the speaker using LBMixer. Volume control doesn't work, but that is most likely a problem of that UNIAUD32 on my specific hardware...

Thanks !

comment:3 by Paul Smedley, 16 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.