Date: Sun, 13 Jun 1999 13:56:17 -0700 (PDT) From: just matt <matt@dqc.org> To: multimedia@freebsd.org Subject: Hauppauge audio (was no sound with fxtv) Message-ID: <Pine.BSO.4.10.9906131324390.438-100000@dqc.org>
next in thread | raw e-mail | index | archive | help
I'd like to thank everyone who helped with my little problem and gave me some really good hints as to what to do to make things work. As you can guess, things are working now soundwise with the hauppauge model 400 card. It seems to automatically detect and switch between mono and stereo transmissions, so it all looks good. so I thought I'd post my solution in case anyone was interested... As per what Juha Nurmela and Roger Hardiman said the problem laid in the initialization of the msp3430G chip, which seems to happen around line 6170 of the brooktree848.c file, which looked like this before I modified it. msp_write(bktr, 0x12, 0x0000,0x7300); /* Set volume to 0db gain */ msp_write(bktr, 0x10, 0x0020,0x0001); /* Enable Auto format detection */ msp_write(bktr, 0x10, 0x0021,0x0001); /* Auto selection of NICAM/MONO mode */ /* uncomment the following line to enable the MSP34xx 1Khz Tone Generator */ /* msp_write(bktr, 0x12, 0x0014, 0x7f40); */ I checked this against the data sheet for the msp34x0G series of chips and noticed some problems, first the msp_write(bktr, 0x10, 0x0021,0x0001); didn't make any sense, 0x0021 wise, as this series of chips only lists 0x0020 and 0x0030 as writeable addresses for initializing the beast to automatically detect incoming sound. That helped but didn't bring in any sound, so I looked further down the data sheet and saw some sample initialization sequences, and chose try example 3.5.2 for BTSC stereo which looks like this: <80 00 80 00> // Soft reset <80 00 00 00> <80 10 00 30 20 03> // MODUS-Register: Automatic = on <80 10 00 20 00 20> // Standard Select: BTSC-Stereo <80 12 00 0E 24 03> // FM/AM Prescale = 24h // FM-Matrix = Sound-A Mono <80 12 00 08 03 20> // Source select = (St or A) & Ch. Matrix = St. <80 12 00 00 73 00> // Loudspeaker Volume 0 db Notice the reverse of the loudspeaker set between the example and current code. Does this make a difference? I haven't checked. So I tried implementing this sample init sequence, minus the soft reset of course. This is what it looks like now... msp_write(bktr, 0x10, 0x0030,0x2003); /* Enable Auto format detection */ msp_write(bktr, 0x10, 0x0020,0x0020); /* Standard Select Reg. = BTSC-Sterio */ msp_write(bktr, 0x12, 0x000E,0x2403); /* darned if I know */ msp_write(bktr, 0x12, 0x0008,0x0320); /* Source select = (St or A) & Ch. Matrix = St */ msp_write(bktr, 0x12, 0x0000,0x7300); /* Set volume to 0db gain */ Couple things to mention, I don't know why there is a need to set the FM/AM Prescale or the FM matrix, but I'm not entirely sure what they do. Also, the msp_write(bktr, 0x10, 0x0020,0x0020); might be better replaced by msp_write(bktr, 0x10, 0x0020,0x0001); so the driver auto-detects input (?) rather than assuming BTSC-Sterio. After rebooting with the new msp_write()'s in place everything took off and worked great. I dunno how easy it will be to implement a patch for the driver so as the changes don't reduce or remove functionality from other cards, but at least this will work as a temp patch for those people with the model 400 hauppauge card. Special thanks to Juha Nurmela <junki@qn-lpr2-98.quicknet.inet.fi> for linking me up with the url to the data sheet and giving me the hints about messing with the msp, and more special thanks to Roger Hardiman <roger@cs.strath.ac.uk> who first gave me the hint to use the actual function msp_write() and the audio mux selector info. Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSO.4.10.9906131324390.438-100000>