Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael <ad@corlett.plus.com>
To: alsa-devel@lists.sourceforge.net
Subject: [PATCH] small patch for recording in opti92x-ad1848
Date: Tue, 11 Mar 2003 20:27:46 +0000	[thread overview]
Message-ID: <3E6E46C2.9040200@corlett.plus.com> (raw)

[-- 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;

             reply	other threads:[~2003-03-11 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-11 20:27 Michael [this message]
2003-03-13  9:24 ` [PATCH] small patch for recording in opti92x-ad1848 Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E6E46C2.9040200@corlett.plus.com \
    --to=ad@corlett.plus.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox