All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] small patch for recording in opti92x-ad1848
@ 2003-03-11 20:27 Michael
  2003-03-13  9:24 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Michael @ 2003-03-11 20:27 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]


Hi,

The second part of the patch adds a missing line into
snd_opti93x_capture_open to set the substream.  There
is a report on the sourceforge site from someone with
a 933 card which might also be fixed by this.

The first part just introduces a udelay(50) into
snd_opti93x_trigger when starting recording which gives
my card (931) a chance to respond.

I haven't done much testing as my card just produces
noise (but I believe this is a hardware problem).  Part two
I think is correct though, by comparison with
snd_opti93x_playback_open.

/Michael.

[-- Attachment #2: opti92x-ad1848.patch --]
[-- Type: text/plain, Size: 913 bytes --]

--- alsa-driver-0.9.0rc8a/alsa-kernel/isa/opti9xx/opti92x-ad1848.c.orig	Tue Mar 11 20:01:19 2003
+++ alsa-driver-0.9.0rc8a/alsa-kernel/isa/opti9xx/opti92x-ad1848.c	Tue Mar 11 20:03:22 2003
@@ -987,8 +987,10 @@
 			s = s->link_next;
 		} while (s != substream);
 		spin_lock(&chip->lock);
-		if (cmd == SNDRV_PCM_TRIGGER_START)
+		if (cmd == SNDRV_PCM_TRIGGER_START) {
 			snd_opti93x_out_mask(chip, OPTi93X_IFACE_CONF, what, what);
+			if(what & OPTi93X_CAPTURE_ENABLE) udelay(50);
+		}
 		else
 			snd_opti93x_out_mask(chip, OPTi93X_IFACE_CONF, what, 0x00);
 		spin_unlock(&chip->lock);
@@ -1207,6 +1209,7 @@
 		return error;
 	runtime->hw = snd_opti93x_capture;
 	snd_pcm_set_sync(substream);
+	chip->capture_substream = substream;
 	snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.buffer_bytes_max);
 	snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates);
 	return error;

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

end of thread, other threads:[~2003-03-13  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-11 20:27 [PATCH] small patch for recording in opti92x-ad1848 Michael
2003-03-13  9:24 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.