From owner-freebsd-ports@freebsd.org Mon Dec 25 11:55:14 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2787E86328 for ; Mon, 25 Dec 2017 11:55:14 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 911A52254 for ; Mon, 25 Dec 2017 11:55:14 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-io0-x230.google.com with SMTP id 14so23931803iou.2 for ; Mon, 25 Dec 2017 03:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vE8G/nWgBXciCNpMocojeF5jHE+aJW7Su0aiUiivFLc=; b=r19Sg9DssJkENAsLFgcPGessnZcUhLD8E+H/GlPUcHjy+xjYlbx4POV6NhIuHmzO7g 2VYdHOYdbt0ktIlapQlexZRLUQyxAfFafj2WNWPDLEgoHsenAq+2QCjHaFAyFzITzS47 vgx7Tx+5imFWBiyq/uAQbMF912pzcFOZIS0CGA7RaJnOmU2ynqXSmBqTRqVEc/tlkK/m JSgq24yevuD0xU2AiWe5DYXVdD2ycR4iYyGEpTdLUTlE0pPjRfO9dq4AeIi13c7SLbNk TencMUqaUH9j99nHwZFM97O5vxgIzbfHshf996M8GNOn46Iw5bbJ5hXouZtIcf1ZIRO8 jK8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vE8G/nWgBXciCNpMocojeF5jHE+aJW7Su0aiUiivFLc=; b=fHDDcilO+eHMebENz4vuhoFCLHflagyK134D3ryKe57VQLKi91jlJFEEJpRLm7ZP7X w5xWrAMCp4+I09BkDbqUxc+uAbxjar5WjtTAs0f/Bqg/Kr8LYuZDSUyO31U6b8k580V4 v0t+TdzP6hkvjAeE+UB60UVK5dJzQkbs0M+6fWNBZlEMEJ+Jcl5ZZFjlDUm2qEuPwiVi JJ5hW2DhQVqurnQjkqClQ+RHdiPrAJFL1alB2DqD3OeajAnTq2WC/8E6Jm95ZiFntekZ u6koEP3T4Ip67XawfcOgyI+nnWZs6Y8JoNXvNzIIO+IALHUZ/LxTQ5gkyRHtPYr4AimT XFcQ== X-Gm-Message-State: AKGB3mJmOzD5ucoXthiWfzO0sZB4zP31erX2P/ic9rwhnBtbcifkXYOw zMCcO9V8pBUgvB++mcOVn25q4RbMeEoVxoYutBWYyMUX X-Google-Smtp-Source: ACJfBouw9kGHLspDCjWFBCZbXGB60Cv0CwWzSIG6p9ittibRNNzm4e12R3M36XR2ShCgqkMaMJtIg0HvroY1dQSlQYU= X-Received: by 10.107.157.82 with SMTP id g79mr28696710ioe.296.1514202913593; Mon, 25 Dec 2017 03:55:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.164.203 with HTTP; Mon, 25 Dec 2017 03:55:12 -0800 (PST) In-Reply-To: References: From: blubee blubeeme Date: Mon, 25 Dec 2017 19:55:12 +0800 Message-ID: Subject: Re: OSS Audio To: Sid Cc: FreeBSD Ports Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 11:55:14 -0000 On Mon, Dec 25, 2017 at 12:16 PM, blubee blubeeme wrote: > > > On Fri, Dec 22, 2017 at 9:31 PM, Sid wrote: > >> OSS soundcard.h for FreeBSD stable and current >> https://svn.freebsd.org/base/stable/11/sys/sys/ >> https://svn.freebsd.org/base/head/sys/sys/ >> >> blubee blubeeme; Mon Dec 11 17:03:10 UTC 2017 >> > I'm taking a look at soundcard.h in /usr/include/sys/soundcard.h in >> FreeBSD >> > vs the soundcard.h in the offical OSS 4.01 >> > https://sourceforge.net/p/opensound/git/ci/master/tree/inclu >> de/soundcard.h >> >> > It seems like there's been a lot of changes between FreeBSD 3.8ish >> version >> > and the 4.0 version. >> >> > I was grepping around to see if any other files included this >> soundcard.h >> > header and if updating to the latest would break any other programs. >> > > I've been looking into this for a bit now and these ioctl seems missing or > returning strange values. > > SNDCTL_DSP_COOKEDMODE > SNDCTL_MIDIINFO > SNDCTL_MIX_ENUMINFO > SNDCTL_MIX_EXTINFO > SNDCTL_CARDINFO > SNDCTL_GETLABEL > SNDCTL_SETLABEL > SNDCTL_GETSONG > SNDCTL_SETNAME > SNDCTL_DSP_GET_CHNORDER > > oss_digital_control and it's related data structures seems to be missing, > that needed for digital sources. > SNDCTL_DSP_READCTL > SNDCTL_DSP_WRITECTL > > The might be implemented in other places if so, where? > > I was trying to find some more info about the above functions and came across this wiki page: https://wiki.freebsd.org/RyanBeasley/ioctlref It already documents some of the reasons why the specific ioctls weren't implemented and their progress. Is there any updated information on this? There's a huge chunk of code to test digital audio that can't be tested because of [oss_digital_control] is missing, code sample below: ---------------------------- #ifdef SHOW_STATUS time_t t; oss_digital_control c; c.valid = VAL_CBITIN | VAL_ISTATUS; if (ioctl (fd, SNDCTL_DSP_READCTL, &c) == -1) { perror ("SNDCTL_DSP_READCTL"); exit (-1); } time (&t); printf ("\n%s\n", ctime (&t)); if (c.valid & VAL_ISTATUS) { switch (c.in_locked) { case LOCK_NOT_INDICATED: printf ("Receiver locked: Status unknown\n"); break; case LOCK_UNLOCKED: printf ("receiver locked: *** NOT LOCKED ***\n"); break; case LOCK_LOCKED: printf ("receiver locked: Locked OK\n"); break; } switch (c.in_quality) { case IN_QUAL_NOT_INDICATED: printf ("Signal quality: Unknown\n"); break; case IN_QUAL_POOR: printf ("Signal quality: *** POOR ***\n"); break; case IN_QUAL_GOOD: printf ("Signal quality: Good\n"); break; } switch (c.in_vbit) { case VBIT_NOT_INDICATED: printf ("V-bit: Unknown\n"); break; case VBIT_ON: printf ("V-bit: On (not valid audio)\n"); break; case VBIT_OFF: printf ("V-bit: Off (valid audio signal)\n"); break; } switch (c.in_data) { case IND_UNKNOWN: printf ("Audio/data: Unknown\n"); break; case IND_AUDIO: printf ("Audio/data: Audio\n"); break; case IND_DATA: printf ("Audio/data: Data\n"); break; } printf ("Errors: "); if (c.in_errors & INERR_CRC) printf ("CRC "); if (c.in_errors & INERR_QCODE_CRC) printf ("QCODE_CRC "); if (c.in_errors & INERR_PARITY) printf ("PARITY "); if (c.in_errors & INERR_BIPHASE) printf ("BIPHASE "); printf ("\n"); } else printf ("No input status information available\n"); if (c.valid & VAL_CBITIN && c.in_locked != LOCK_UNLOCKED) { printf ("\n"); printf ("Control bits: "); for (i = 0; i < 24; i++) printf ("%02x ", c.cbitin[i]); printf ("\n"); if (c.cbitin[0] & 0x01) decode_pro_mode (c.cbitin); else decode_consumer_mode (c.cbitin); } else printf ("No incoming control bit information available\n"); #endif ----------------------------