As promised: Soft volume mixer controller (doesn't work for me)
Ariff Abdullah
skywizard at MyBSD.org.my
Tue Sep 13 14:03:50 PDT 2005
On Tue, 13 Sep 2005 22:34:23 +0200
Michael Nottebrock <lofi at freebsd.org> wrote:
> On Tuesday, 13. September 2005 01:58, Ariff Abdullah wrote:
>
> > Note on giving feedback: Please include (before / after applying
> > patch):-
>
> Before: PCM volume control is binary - 0 is silent, everything else is
> full volume.
>
> pcm0: <Intel ICH2 (82801BA)> port 0xe800-0xe83f,0xec00-0xecff irq 17
> at device 31.5 on pci0
> pcm0: <C-Media Electronics CMI9739 AC97 Codec>
>
> Mixer vol is currently set to 100:100
> Mixer pcm is currently set to 100:100
> Mixer speaker is currently set to 0:0
> Mixer line is currently set to 0:0
> Mixer mic is currently set to 0:0
> Mixer cd is currently set to 0:0
> Mixer rec is currently set to 11:11
> Mixer ogain is currently set to 50:50
> Mixer line1 is currently set to 0:0
> Mixer phin is currently set to 0:0
> Mixer phout is currently set to 0:0
> Mixer video is currently set to 0:0
> Recording source: line
>
> pcm0 at pci0:31:5: class=0x040100 card=0x49611849 chip=0x24458086
> rev=0x05 hdr=0x00
> vendor = 'Intel Corporation'
> device = '82801BA/BAM (ICH2/ICH2-M) AC'97 Audio Controller'
> class = multimedia
> subclass = audio
>
> After: Complete silence, regardless of mixer setting.
>
> pcm0: <Intel ICH2 (82801BA)> port 0xe800-0xe83f,0xec00-0xecff irq 17
> at device 31.5 on pci0
> pcm0: <C-Media Electronics CMI9739 AC97 Codec>
>
> Mixer vol is currently set to 100:100
> Mixer pcm is currently set to 100:100
> Mixer speaker is currently set to 0:0
> Mixer line is currently set to 0:0
> Mixer mic is currently set to 0:0
> Mixer cd is currently set to 0:0
> Mixer rec is currently set to 11:11
> Mixer ogain is currently set to 50:50
> Mixer line1 is currently set to 0:0
> Mixer phin is currently set to 0:0
> Mixer phout is currently set to 0:0
> Mixer video is currently set to 0:0
>
> pcm0 at pci0:31:5: class=0x040100 card=0x49611849 chip=0x24458086
> rev=0x05 hdr=0x00
> vendor = 'Intel Corporation'
> device = '82801BA/BAM (ICH2/ICH2-M) AC'97 Audio Controller'
> class = multimedia
> subclass = audio
>
>
(sorry, I need uname -a as well..)
How about applying this one:
--- ac97.c.diff BEGIN ---
--- sys/dev/sound/pcm/ac97.c.orig Wed Sep 14 04:54:36 2005
+++ sys/dev/sound/pcm/ac97.c Wed Sep 14 05:00:10 2005
@@ -556,17 +556,25 @@
#endif
switch (codec->id) {
case 0x434d4941: /* CMI9738 */
+ ac97_wrcd(codec, AC97_MIX_PCM, 0x8000);
+ break;
case 0x434d4961: /* CMI9739 */
+ ac97_wrcd(codec, AC97_MIX_MASTER, 0x8000);
+ ac97_wrcd(codec, AC97_MIX_PCM, 0x8000);
+ break;
case 0x434d4983: /* CMI9761 */
- bzero(&codec->mix[SOUND_MIXER_PCM],
- sizeof(codec->mix[SOUND_MIXER_PCM]));
- codec->flags |= AC97_F_SOFTVOL;
- if (d)
- d->flags |= SD_F_SOFTVOL;
+ ac97_wrcd(codec, AC97_MIX_MASTER, 0x8808);
+ ac97_wrcd(codec, AC97_MIX_PCM, 0x8808);
break;
default:
+ return;
break;
}
+ bzero(&codec->mix[SOUND_MIXER_PCM],
+ sizeof(codec->mix[SOUND_MIXER_PCM]));
+ codec->flags |= AC97_F_SOFTVOL;
+ if (d)
+ d->flags |= SD_F_SOFTVOL;
}
static const char*
--- ac97.c.diff END ---
--
Ariff Abdullah
MyBSD
http://www.MyBSD.org.my (IPv6/IPv4)
http://staff.MyBSD.org.my (IPv6/IPv4)
http://tomoyo.MyBSD.org.my (IPv6/IPv4)
More information about the freebsd-multimedia
mailing list