Date: Sat, 26 Jun 1999 22:56:09 -0400 From: Randall Hopper <aa8vb@ipass.net> To: Frode Vatvedt Fjeld <frodef@acm.org>, lyndon@orthanc.ab.ca Cc: freebsd-multimedia@FreeBSD.ORG Subject: Re: bt848 channel frequencies Message-ID: <19990626225609.A3178@ipass.net> In-Reply-To: <2hzp1n9nw2.fsf@dslab7.cs.uit.no>; from Frode Vatvedt Fjeld on Sat, Jun 26, 1999 at 01:55:57PM %2B0200 References: <2hzp1n9nw2.fsf@dslab7.cs.uit.no> <199906262132.PAA05313@orthanc.ab.ca> <Pine.BSF.4.05.9906252306200.4112-100000@pena.oh5nxo.ampr.org> <2hzp1n9nw2.fsf@dslab7.cs.uit.no>
next in thread | previous in thread | raw e-mail | index | archive | help
lyndon@orthanc.ab.ca: |Frode Vatvedt Fjeld: |> Or would it be better to use a 64-bit type to represent frequencies? |> Then we could go from uHz to GHz without problems.. :-) | |Why not hide the implementation in the library and just pass the |frequency (in around as an ASCII string? E.g. What piece of software is responsible for converting it to a number? I'd advocate not passing string to the kernel and having it do string-to-num conversion. Assuming we don't do that, then the application must convert. So why not use whatever numeric format it must convert to (uint64_t, int[2], struct, or whatever)? |int tuner_set_freq(TUNER *t, char *freq); | . | . | . | rc = tuner_set_freq(t, "14313000.155"); /* rc = 0 */ | rc = tuner_set_freq(t, "740000"); /* rc = -1, errno = ERANGE (tuner | doesn't tune that low) */ | rc = tuner_set_freq(t, NULL); /* rc = -1, errno = EFAULT */ | |Frequency strings are in Hz. If no '.nnn' appended assume '.0'. Is this a rtn proposed for libtv? Unless I missed a message, I don't recall Frode proposing putting routines that talk to a device driver in libtv. Randall 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?19990626225609.A3178>