From owner-freebsd-questions@FreeBSD.ORG Tue Apr 2 22:56:05 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 53FEFC0 for ; Tue, 2 Apr 2013 22:56:05 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 1A88B1C1 for ; Tue, 2 Apr 2013 22:56:05 +0000 (UTC) Received: from r56.edvax.de (port-92-195-80-247.dynamic.qsc.de [92.195.80.247]) by mx01.qsc.de (Postfix) with ESMTP id D38A03DA41; Tue, 2 Apr 2013 23:15:15 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id r32LFMw2002447; Tue, 2 Apr 2013 23:15:22 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 2 Apr 2013 23:15:22 +0200 From: Polytropon To: "Ronald F. Guilmette" Subject: Re: Recipie for CPU souffle' Message-Id: <20130402231522.71cb7352.freebsd@edvax.de> In-Reply-To: <15043.1364932520@server1.tristatelogic.com> References: <515AAE16.9030707@qeng-ho.org> <15043.1364932520@server1.tristatelogic.com> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Apr 2013 22:56:05 -0000 On Tue, 02 Apr 2013 12:55:20 -0700, Ronald F. Guilmette wrote: > Is there any specific advantage to using that, relative to using mbmon? As far as I understand, it's utilizing a different infrastructure to obtain data. You can see "man amdtemp" in comparison to the reporting mechanisms mbmon uses. > >..."man speaker"... > > Humm... I'm looking at that now and it raises more questions that it answers. It's just an interface to the PC speaker, what question? :-) > First order question: Why is it that in FreeBSD there are so many man > pages like this one, _purporting_ to describe some low level interface > to some sort of hardware, and the man page _doesn't_ include a clear > and explicit description of the relevant ioctls ? Discovering those usually involved using the driver sources. The driver description provided in the manpage doesn't cover everything, but it says: "definitions for the ioctl(2) interface are in ". > Second order question: Why can't I just pipe a .wav file to the > /dev/speaker device file and have it play? Wouldn't that make quite > a lot of sense? No, that does not work. Read the manpage to recognize clearly _what_ kind of input the /dev/speaker device accepts. It does not understand WAV files. However, try this example (cw.sh): #!/bin/sh read -p "CW ===> " TEXT echo ${TEXT} | morse | awk '{ if(length($0) == 0) printf("P4\n"); else { gsub(" dit", "P32L32E", $0); gsub(" di", "P32L32E", $0); gsub(" dah", "P32L8E", $0); printf("%sP16\n", $0); } }' | dd bs=256 of=/dev/speaker > /dev/null 2>&1 This script doesn't require any non-OS components. You can use it as a basis to build a program that will send you system messages in an audible way in morse code... :-) > >/usr/sbin/spkrtest might be useful > > Humm... well... it is at least mildly entertaining. But probably not required, because the simplest test you could construct is something like % echo "c" > /dev/speaker Can you hear a sound? Yes? Good. Speaker works. Don't hear anything? Either your system doesn't have a speaker, or the driver isn't loaded. :-) Hint: Make sure permissions are set properly. own speaker root:operator perm speaker 0660 You can add those to /etc/devfs.conf if you're a member of the "operator" group. > I wonder if whoever write and distributed this realized that he/she could > be sued for copyright infringement for about 5 of the simple tunes that are > embedded in that thing. Sad but true. > :-( Is it really that bad already? "Patent of swinging on a swing or exercising a cat" time? ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...