public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* i810_audio mono troubles
@ 2001-12-18  4:57 Greg Pomerantz
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Pomerantz @ 2001-12-18  4:57 UTC (permalink / raw)
  To: linux-kernel

Monaural audio streams on my Sony Vaio PCG-R505TSK play at double speed
under Debian woody / kernel 2.4.16. I've written a quick hack to fix
it, and I was curious if this problem is affecting anybody else, or if
it is specific to my platform. I have been communicating with a number
of people on the linux-sony mailing list who are also having what appear
to be sample-rate related problems with the i810s in Sony Vaios.

Just posting this to make all of theiti810 fans aware of this. My patch
is most likely not the right way to do things, but it does work... I am
particularly curious to hear if I am doing the right thing with
I810_FMT_STEREO.

This patch was made against 2.4.16, but it applies fine (offset -4
lines) against 2.4.17-rc1. My platform is Debian woody, kernel 2.4.16.
My i810 vital statistics:

  Intel 810 + AC97 Audio, version 0.04, 23:16:04 Dec 17 2001
  PCI: Found IRQ 5 for device 00:1f.5
  PCI: Sharing IRQ 5 with 00:1f.3
  PCI: Sharing IRQ 5 with 00:1f.6
  PCI: Setting latency timer of device 00:1f.5 to 64
  i810: Intel ICH2 found at IO 0x1840 and 0x1c00, IRQ 5
  i810_audio: Audio Controller supports 6 channels.
  ac97_codec: AC97 Audio codec, id: 0x4144:0x5348 (Analog Devices AD1881A)
  i810_audio: AC'97 codec 0 Unable to map surround DAC's (or DAC's not present), total channels = 2
  ac97_codec: AC97 Modem codec, id: 0x4358:0x5421 (Unknown)
  i810_audio: timed out waiting for codec 1 analog ready


Take care,

Greg Pomerantz

#text/plain;name=patch-i810-mono-2.4.16 /home/gmp/work/stuff/patch-i810-mono-2.4.16


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: i810_audio mono troubles
@ 2001-12-18  4:58 Greg Pomerantz
  2001-12-18 16:11 ` Doug Ledford
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Pomerantz @ 2001-12-18  4:58 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: patch-i810-mono-2.4.16 --]
[-- Type: text/plain, Size: 531 bytes --]

+++ drivers/sound/i810_audio.c	Mon Dec 17 23:15:19 2001
@@ -609,6 +609,9 @@
 	
 	new_rate = ac97_set_dac_rate(codec, rate);
 
+	if ((dmabuf->fmt & I810_FMT_STEREO) == 0)
+		new_rate *= 2;
+
 	if(new_rate != rate) {
 		dmabuf->rate = (new_rate * 48000)/clocking;
 	}
@@ -1687,6 +1690,12 @@
 		if (dmabuf->enable & ADC_RUNNING) {
 			stop_adc(state);
 		}
+
+		if (*(int *)arg == 0)
+			dmabuf->fmt &= ~I810_FMT_STEREO;
+		else
+			dmabuf->fmt |= I810_FMT_STEREO;
+
 		return put_user(1, (int *)arg);
 
 	case SNDCTL_DSP_GETBLKSIZE:

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-12-18 16:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-18  4:57 i810_audio mono troubles Greg Pomerantz
  -- strict thread matches above, loose matches on Subject: below --
2001-12-18  4:58 Greg Pomerantz
2001-12-18 16:11 ` Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox