From owner-freebsd-ports@freebsd.org Sun Dec 17 01:06:33 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 E72D1E95EDA for ; Sun, 17 Dec 2017 01:06:33 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (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 A27457A95D for ; Sun, 17 Dec 2017 01:06:33 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-it0-x242.google.com with SMTP id z6so24608132iti.4 for ; Sat, 16 Dec 2017 17:06:33 -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=Q8iLaZx1EXFnEQRt/LGH0j8tCix80aa1FhoQT9fpaMw=; b=YW59t9jmH0bFbogf9D4BK7fiULoNQyZ/iuT3BKN6vasRxYMWGWO+DryjWr/OjsQ/Id dJuY7OKGhnRPFlNE9VhKIP6vzYwlmZzUB2gRq4nwyk2JFNdt4KTf50iwGJmFsgxd7w3G mlyqJSZNleAfzcUkaRM3Qhj1kWOiN0bvjt9VvK7QcZOSXCInvG011bjoOu6Ugw68mzxl HIbLiRVMMX/5hdBCrIglmMS3dg3Q8rhbjsma4yZLKdkC8ORTX81Wy/yE6jfYqzLBDVqY TNJDNr8qO5CZPrVU2Fc3XL4Wi2RynEiiZe6ubpZXu49UJJ3uEihOsFNZNbz5ep7oT8v3 FADg== 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=Q8iLaZx1EXFnEQRt/LGH0j8tCix80aa1FhoQT9fpaMw=; b=IM12uqmL3iExfE9LwDiVcmsGeY1pWlvaoLNoethMY67uNiMa/yYczWQ2hCgDrqR/oS 1L0zDBy3/Teab+Ednw5LZnDY0jM8d9qXUqvjb7hlAMqo5sTvLP/EJ+4zuSJhX06tL7vU wwvUdB1gQ19Mmc6l4K6R39cawBv3W7nk/c2rM9McqXzieC4iFz1tiBR3bIUwibtCRV27 6+5XzkAONnp1sjq0HEZjH/6UYRTVeSuYz5vsiC7TnfkFUPuO+e5oWwZaV3YtDz7sHVOx qR9fa/fl0epZvG3pUbfEWryMlSJDA8UbEWROfl1IQEF3rqlucTOCF718sF1qH0XZPvwK Jz6w== X-Gm-Message-State: AKGB3mLT7UgqNvfe05YIlxKHI77+jUpe/SlX383nfpW4qcDAioe7GSq/ WNeO9P4Rj6F5QRqOkKlvgBj111zcim7qQn6nF6Y= X-Google-Smtp-Source: ACJfBouf39n9t57IA0WkHukpPylUby2JEtuOiRcAZXWL4ypIgxoTWq0eQI9qHf0xiDoAKHyEDtL2xs+joEKDo7cWs6c= X-Received: by 10.36.151.198 with SMTP id k189mr15411184ite.100.1513472792796; Sat, 16 Dec 2017 17:06:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.134.9 with HTTP; Sat, 16 Dec 2017 17:06:31 -0800 (PST) In-Reply-To: References: From: blubee blubeeme Date: Sun, 17 Dec 2017 09:06:31 +0800 Message-ID: Subject: Re: OSS Audio To: Sid Cc: Yuri , fjwcash@gmail.com, 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: Sun, 17 Dec 2017 01:06:34 -0000 On Sun, Dec 17, 2017 at 6:53 AM, Sid wrote: > I've had a few misconceptions. > > Bluebee Blubeeme said, 4Front has a modern OSS implementation that is > under a FreeBSD license. > > The model of Sound on FreeBSD is, three layers: > 1. The API, where programs use libraries (of respective sound > architecture) to access the sound server. > 2. The sound server: OSS, Sndio, Portaudio, JACK, ALSA, native, etc > 3. FreeBSD's base is always OSS (OpenBSD's driver is sndio); sound servers > connect to and use this. > FreeBSD base is an older fork of 4Front OSS, somewhere around version 3 something. There's a 3,200 line diff between freebsd /sys/sys/soundcard.h and the one available in 4Front repo right now, there's been a lot of improvements between FreeBSD fork and 4Front OSS 4.2 Plus the OSS 4.x soundcard.h handles ALL legacy devices. The main thing that changed is the API, follow updated coding styles for new applications while old applications still just work. The sound server madness goes away with 4Front OSS. The API would be stable with 4Front OSS There's no single place with a more straight forward audio programming guide online compared to this: http://manuals.opensound.com/developer/ If there is please share. To use 4Front's OSS, FreeBSD's kernel will have to be recompiled without > OSS, "snd" and "sound" references, and then that version of OSS installed. > without the legacy oss, snd and sound references. That would be replaced by the 4Front OSS implementation. Then improvements/ fixes can be made on our end and tried to have upstreamed. The API is stable, well documented and the sound server madness goes away as well. > > The part of OSS in name, that is a mess, is the API structure, and various > implementations. In FreeBSD for instance, when a program uses an OSS API, I > hear that developers, need to write so many patches, because different OSS > frontends are not standardized. Most applications in ports use Sndio, > because across BSD's the API to it is standard. Bluebee claims that > 4Front's OSS is standard as well. As for API on programs/ports, just use > the FreeBSD API that is available for it, OSS, Sndio, Portaudio, to connect > to that sound server. > This is what can happen w/ open source software. Everyone took from Hannu's work and then no one credited him for his accomplishments but everyone dog piles on him. > > As long as OSS covers the wide range of implementations of it, OSS In > Name, without clarifiers, will carry this burden of being complex and > having a nonstandard API, even when certain implementations don't or may > not have this issue. > This is a Linuxism, spread right around the time they wanted to push ALSA. Since there are very few to NO audio developers who build software from the ground up for FreeBSD, all these Linuxism seeped in through the porting of software from Linux to FreeBSD. > > Bluebee says, to my understanding, that 4Front's OSS doesn't have certain > coding inefficiencies that certain sound architectures have. That is > something for the developers to be informed about, and to consider in > FreeBSD current. > This is why I am bringing up the issue and why I said the first step would be porting the proper 4Front OSS into the kernel. It doesn't have to be the default at first but if it's not in the kernel why bother wasting time to have it rejected because of all the misconceptions I've been dealing with in these threads. Add 4Front OSS to the kernel Use the 4.x API/ Documentation Add it to an audio programming section of FBSD Handbook Upstream changes that make sense Simplify audio programming, documentation, all those audio sound servers Port device drivers to the OSS Device Driver API: http://manuals.opensound.com/sources/drv_index.html > _______________________________________________ > freebsd-ports@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" > That's a lot of work and without being able to get this into the kernel because people just say "oss is a mess" isn't a valid reason. A lot of these opinions seeped into FreeBSD from other sources.