Don't complain if we're asked for != 8 channels. There's no actual support

for fewer channels yet, but this is necessary just to avoid a boot-time panic.
This commit is contained in:
bjh21 2003-12-06 19:59:32 +00:00
parent dc728f311c
commit 3f1dc2b013
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vidcaudio.c,v 1.15 2003/10/26 11:45:46 jdolecek Exp $ */ /* $NetBSD: vidcaudio.c,v 1.16 2003/12/06 19:59:32 bjh21 Exp $ */
/* /*
* Copyright (c) 1995 Melvin Tang-Richardson * Copyright (c) 1995 Melvin Tang-Richardson
@ -38,7 +38,7 @@
#include <sys/param.h> /* proc.h */ #include <sys/param.h> /* proc.h */
__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.15 2003/10/26 11:45:46 jdolecek Exp $"); __KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.16 2003/12/06 19:59:32 bjh21 Exp $");
#include <sys/conf.h> /* autoconfig functions */ #include <sys/conf.h> /* autoconfig functions */
#include <sys/device.h> /* device calls */ #include <sys/device.h> /* device calls */
@ -330,9 +330,9 @@ vidcaudio_set_params(addr, setmode, usemode, p, r)
int setmode, usemode; int setmode, usemode;
struct audio_params *p, *r; struct audio_params *p, *r;
{ {
if (p->encoding != AUDIO_ENCODING_ULAW || if (p->encoding != AUDIO_ENCODING_ULAW)
p->channels != 8)
return EINVAL; return EINVAL;
/* FIXME Handle number of channels properly. */
vidcaudio_rate(4 * p->sample_rate / (3 * 1024)); /* XXX probably wrong */ vidcaudio_rate(4 * p->sample_rate / (3 * 1024)); /* XXX probably wrong */
return 0; return 0;