Bug 16587

Summary: [sound] [patch] Can't record with newpcm & CS4236 (AW35/Pro)
Product: Base System Reporter: mreimer <mreimer>
Component: kernAssignee: sound
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   

Description mreimer 2000-02-08 18:20:00 UTC
	With my Acer AW35/Pro (CS4236) and -current I can play sound
just fine, but I can't record. (Recording and full duplex worked fine with
3.4-stable.)

When I run

	rec -c 1 -f s -r 44100 -s w test.wav

rec just sits, blocked in pcmrd, and rec can't be interrupted with ctl-c. The output file test.wav never increases in size, always remaining 0 bytes long.

My kernel config file has "device pcm".

Any ideas?

Matt

How-To-Repeat: 
	Try to record anything; e.g.

		rec -c 1 -f s -r 44100 -s w test.wav
Comment 1 mreimer 2000-02-23 19:13:22 UTC
Partial fix: the following patch correctly configures the card for dual
channel DMA. The problem was that the SDC bit (0x04) can only be set in
the MCE state.

So now recording doesn't hang, and data is returned, but the recorded
sound doesn't sound right when played back. Anybody?

--- mss.c.orig  Wed Feb 23 11:04:23 2000
+++ mss.c       Fri Jan 28 16:18:28 2000
@@ -92,8 +92,6 @@
 static int             ad_read(struct mss_info *mss, int reg);
 static void            ad_write(struct mss_info *mss, int reg, u_char
data);
 static void            ad_write_cnt(struct mss_info *mss, int reg,
u_short data
-static void            ad_enter_MCE(struct mss_info *mss);
-static void            ad_leave_MCE(struct mss_info *mss);

 /* io primitives */
 static void            conf_wr(struct mss_info *mss, u_char reg, u_char
data); 
@@ -467,9 +465,7 @@
        }
        if (FULL_DUPLEX(mss) && mss->bd_id != MD_OPTI931)
                ad_write(mss, 12, ad_read(mss, 12) | 0x40); /* mode 2 */
-       ad_enter_MCE(mss);
        ad_write(mss, 9, FULL_DUPLEX(mss)? 0 : 4);
-       ad_leave_MCE(mss);
        ad_write(mss, 10, 2); /* int enable */
        io_wr(mss, MSS_STATUS, 0); /* Clear interrupt status */
        /* the following seem required on the CS4232 */
Comment 2 mreimer 2000-03-20 19:52:21 UTC
Whoops, that patch was reversed.

Elucidation on how recording doesn't work properly: when playing back
the recorded sample, there is a short burst of what sounds like static
and then silence.
Comment 3 Adrian Chadd freebsd_committer freebsd_triage 2000-03-28 16:59:55 UTC
Responsible Changed
From-To: freebsd-bugs->cg

Over to the maintainer 
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2004-09-09 20:29:52 UTC
Responsible Changed
From-To: cg->sound

With permission, reassign to mailing list alias.
Comment 5 Tilman Keskinoz freebsd_committer freebsd_triage 2005-06-14 15:59:37 UTC
State Changed
From-To: open->closed

Committed by cg 5 years ago.