From owner-freebsd-multimedia@freebsd.org Fri Dec 15 10:34:38 2017 Return-Path: Delivered-To: freebsd-multimedia@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 627D6EA233B for ; Fri, 15 Dec 2017 10:34:38 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (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 2480070696 for ; Fri, 15 Dec 2017 10:34:38 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-it0-x229.google.com with SMTP id m11so29021450iti.1 for ; Fri, 15 Dec 2017 02:34:38 -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=zutSKhFbmx6Uts5Fp62DcEvEpnzwJl9K1V+w528PJGE=; b=nFtalPr5JavrKYGhdPNPRk83tvdnRUcNEMI4e0mP2iafMOthq6LyEuMO/45supMKjJ 64BjQ6+umgPKv5rGGLkjBnTIrIVIVjvcQroL2tOl3qeQHJQnP3Dn8iYxbNFph8dD4ZYx d6adF3dFh0YQD+WBVBqJgtEiCKL5LP/FxmgRvNn2RE8G3XjRP2C6S9oY0t3GQ/1Bbfz9 TNOd886RQqooGrE1mx/Tuqonm6NlbDXGVl74xWI0S+GXgT/BS88nNK+MkVjoqKmul59i Y79NKhEyWVt7FYfQxTg4lHdtAVFc/UMrIbStmikvJ3LqwrSULWkKMevDXU4g4e0ZcP4D sztA== 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=zutSKhFbmx6Uts5Fp62DcEvEpnzwJl9K1V+w528PJGE=; b=iQJqqYMQln8lJygWIwW5aKwM5T2K64t3ebPcTV+z+4a4GqbNPA6dzskMmIIwTgLgG+ HXzkuPHsr2WrLfqBsBxL3BUfUWGkoC96XrbCeoIrXfuPn3oURce7Z7bpfovQoVpGVQKv ZzczQyNm+r2FdufBthqA9qGWW4Jg3FHjSztED1R9xEBeF+FZtvNpp/hjNBF7CRYwQKkm Y9KFwT1eyIKhmSFESCW8rxJkNWcJey4x5LgS3Y+h7rwAvAjTYSoZWMuh2F9gWTKGgUH2 dds+GU8bX/l3C0TZF7Trt0iySG7O2zOBwTf1y/fO/imOpe6CfpcbXTRT2oTTNBlgoKcE HHAg== X-Gm-Message-State: AKGB3mLhByoK363wpq4N99iDrOOs1wmeyrkapbFsRjOx2pAHs6n5q7pi ZkCvSyJrFh75ZeXzCf1x9lMqQ4SZAu7gzXzPbyehL+gb X-Google-Smtp-Source: ACJfBouXTwfSWwRNexvufkE1Poj9ECGxRuWGdLj8HRpEwikCOzOoHwBL2iX2sCXHleHbt0MQjwci06awwWITQ9egV/I= X-Received: by 10.107.128.152 with SMTP id k24mr11379021ioi.184.1513334077393; Fri, 15 Dec 2017 02:34:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.134.9 with HTTP; Fri, 15 Dec 2017 02:34:36 -0800 (PST) In-Reply-To: References: From: blubee blubeeme Date: Fri, 15 Dec 2017 18:34:36 +0800 Message-ID: Subject: Re: FreeBSD amd64 GENERIC kernel To: Hans Petter Selasky Cc: "freebsd-multimedia@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 10:34:38 -0000 On Fri, Dec 15, 2017 at 6:07 PM, Hans Petter Selasky wrote: > On 12/14/17 14:23, blubee blubeeme wrote: > >> On Thu, Dec 14, 2017 at 4:35 PM, Hans Petter Selasky >> wrote: >> > > Hi, > > Most OSS v4 IOCTLs are supported by the in-base sound stack at >>> /sys/dev/sound . Further there is a ALSA to OSS wrapper in audio/alsa-lib >>> and audio/alsa-plugins which Chromium can use. >>> >>> OSS provides ALSA emulation: >> > > You mean the audio/oss port provides ALSA emulation? > > ALSA is described here: > https://www.alsa-project.org/main/index.php/Main_Page > > From what I know ALSA is a user-space library for interacting with audio > devices. The backend can vary from operating system to operating system. > > http://ossnext.trueinstruments.com/wiki/index.php/Tips_And_Tricks >> But I also don't mind writing OSS drivers from chromium, why emulate when >> you can go native? >> > > If you want to make a native OSS driver backend for Chromium for both > recording and playback, then please go ahead. > > Making audio/oss the default audio stack in FreeBSD will not make most >>> FreeBSD users happy. >>> >> > Why is this exactly? Most FreeBSD users don't even use the platform as >> their daily driver, >> it's just something they hack on in a VM from their shiny Macbook or >> whatever. >> > > audio/oss is intended for a specific group of audio professionals using > FreeBSD on real machines. OSS in FreeBSD-base has far better support for > the regular audio devices which you find in laptops, computers, raspberry > PI, not to mention USB and VM's. > > >> I can't speak for anyone but myself but I'd like to make FreeBSD user >> friendly for regular people >> who just want to surf the web and check their emails, this is just a step >> in that direction. >> > > Despite your good intentions you shouldn't blame the in-base FreeBSD OSS > stack that you cannot do what you want with Chromium, because the Chromium > developer officially only supports the ALSA audio backend. > > If you want to do something good for FreeBSD, make sure documentation > about new CPU architectures and coming chips both PCI and USB are made > available before products are released and not several years after the > Linux developers hacked together a driver. Second, make sure the different > PCI and USB vendors test their products with FreeBSD aswell, before they > release them into the market. > > This port is intended for studio professionals which buy $1000 PCI audio >>> devices for audio production. Now with the advent of HighSpeed USB and >>> SuperSpeed USB audio, there is no real need to invest in an expensive PCI >>> device unless you need to do realtime audio processing. Further a lot of >>> audio equipment also comes with an ethernet plug :-) Just FYI! >>> >> >> I am one of those guys and trust me I've had my fair share of issues with >> Audio even on Linux. >> You can even see this lil exchange on Ardours forum: >> https://community.ardour.org/node/15438 >> > > What is written on page 24 in the document referred to in the link above > is not fully true: > https://linuxplumbersconf.org/2009/slides/Paul-Davis-lpc2009.pdf > > The OSS API is not only for the kernel, it is a general purpose character > device IOCTL API for any audio application. With the advent of CUSE and > audio/virtual_oss this is especially true. If you're smart you can take > advantage of CUSE's mmap() functionality to share memory between clients > and server having zero copyin/copyout latency. > > The regular audio producing applications need no more than what the OSS > IOCTL API can provide, namely setting the sample rate, sample format, MONO > or STEREO, looking at how many bytes are buffered and that's it. > > Please also note that the OSS support in Linux may not be as advanced as > that in FreeBSD. From what I know Linux the OSS support couldn't change the > sample rate and format in-kernel, leaving this up to every application, > which might be an argument against OSS in Linux, but not in FreeBSD: > > To my knowledge there is now a dozen software audio engines around for > various Linux desktops and JACK is one of them. > > https://lwn.net/Articles/308445/ > > Again, I don't see a problem using libalsa on FreeBSD with applications > coming from Linux. Even if this is a kind of emulation like you say, > emulation can also be so-called seamless, that the user won't notice any > difference. If there are bugs in the OSS ALSA backend, let's try to > identify them and improve the current situation. > > >> Anyways, everyone has this idea that OSS is dead or it's terrible but I'm >> looking for the best performance >> if you listen to this talk: https://www.youtube.com/watch? >> v=6oQF2TzCYtQ&t=3s >> You'll see that it's ALSA, Pulse & JACK that are dying/ dead. >> > > Linux guys like to "kill" stuff obviously and that is their motivation I > guess :-) > > >> I did a lot of audio work on Android and trust me, they try to avoid ALSA >> like the plague. >> > > Reminds me of Samsungs attempt at JACK support for Android :-) > > You might say, what about ALSA? Well OSS supports ALSA emulation: >> http://ossnext.trueinstruments.com/wiki/index.php/Tips_And_Tricks >> It just needs some work. >> >> Once the updated OSS is a part of the kernel then things can move forward. >> > > audio/oss is not sourcecode. It is a binary blob. It won't be accepted > into the kernel. > > How much audio progressed in FreeBSD or Linux in the past 10 years? >> > > Read the SVN history for "sys/dev/sound" in the FreeBSD source tree. > > --HPS > I feel like you're talking at something and not understanding my objectives. It's pretty simple: replace ALSA w/ upstreamed OSS. FreeBSD's implementation of OSS is missing a few features that hamstring the development on FreeBSD. Also, why would FreeBSD want to maintain it's own implementation of an open source project? What part of oss source: https://sourceforge.net/p/opensound/git/ci/master/tree/ is a binary blob?