Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Aug 2000 19:36:43 +0200
From:      Ralph Meijer <ralphm@wat.moet.ik.nu>
To:        freebsd-mobile@freebsd.org, freebsd-stable@freebsd.org
Cc:        taku@cent.saitama-u.ac.jp
Subject:   Followup: ESS Maestro-2E
Message-ID:  <20000817193642.B80887@mag.ik.nu>

next in thread | raw e-mail | index | archive | help
Upon suggestion by Sean O'Connell triggered by a Maestro thread on -stable
I've tried the (beta) newpcm driver from
	http://access.cent.saitama-u.ac.jp/~taku/freebsd/maestro/

It didn't compile on my 4.1-RELEASE box because of changes in
/sys/dev/sound/pcm/datatypes.h but following patch fixes that. I'm
not sure if it could be done easier, but this works.

Note that you have to crank the volume up quite a bit compared to the
OSS driver I used. Futhermore, there is no recording support (yet).

Greetz,

Ralphm (r@ik.nu)

--->8-- cut here --->8---
--- maestro.c.orig	Wed Aug 16 17:09:32 2000
+++ maestro.c	Thu Aug 17 19:03:58 2000
@@ -88,6 +88,7 @@
 	u_int			num;
 	u_int16_t		aputype;
 	u_int16_t		wcreg_tpl;
+	u_int32_t		fmt;
 };
 
 struct agg_info {
@@ -584,10 +585,16 @@
 static inline u_int
 calc_timer_freq(struct agg_chinfo *ch)
 {
+	unsigned ss;
+
 	pcm_channel *c = ch->channel;
 
-	return (c->speed * c->buffer.sample_size + c->blocksize - 1)
-	    / c->blocksize;
+	ss = 1;
+	ss <<= (ch->fmt & AFMT_STEREO)? 1 : 0;
+	ss <<= (ch->fmt & AFMT_16BIT)? 1 : 0;
+
+	return (c->speed * ss + c->buffer.blksz - 1)
+	    / c->buffer.blksz;
 }
 
 static void
@@ -679,6 +686,7 @@
 	}
 	ch->wcreg_tpl = wcreg_tpl;
 	ch->aputype = aputype;
+	ch->fmt = format;
 	return format;
 }
 

--->8-- cut here --->8---


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000817193642.B80887>