From owner-freebsd-multimedia@freebsd.org Fri Dec 15 14:39:27 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 290ECE82D48 for ; Fri, 15 Dec 2017 14:39:27 +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 CF65977C2B for ; Fri, 15 Dec 2017 14:39:26 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-it0-x242.google.com with SMTP id z6so19958521iti.4 for ; Fri, 15 Dec 2017 06:39:26 -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=alDMtmEhYDoBfC47uwHJfgEafoGDlw478QJaF+reCgc=; b=MuT/1uLU1vliQiRaiJIIBlOvC5MQNjpeyhE5t0oe8B6bmuRqVFU3VEjJapUjrB7v8j dwZsrOOwcSxDmFCErfakzGOoqr4z7z2mu+RYtFE10ozLbPbeFpRRcmhmHxGkNoc12Jnx CXibt3NVY+vPRWqK3dMnDUJhaJFuEPcj7xgGXSlWdzAV4CQpqBIxtZ8I1YAChM+QmY+k XihJ/TBvI5IBSsdXEE1qH5tGbKcZbdS68RctaPTWWAux3RNJZONETdyqf8Zhmkil5Tup Pxq5tupqsc1J4h7Ma+b+zBR8xs7dUmSElUl8kNbNgsEeHDcOprUPgU6zGG851fF+kppo ndtw== 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=alDMtmEhYDoBfC47uwHJfgEafoGDlw478QJaF+reCgc=; b=uh/2QrLuE354UFd9zJbKOd3WEfUeWceZFqBWbylMXo11WqZALpKFwzAwJGm2ODk5d/ +GFlOKQ3FaqzTaX+89L0r6IRmr6Ihn2xD3d61+p994P7E8Ybf6Oe9NmAaB3Sdo09TRZ2 ZzYZFUwp/X4HfSAo+hIoXZ2CF6/mwpCNpxD02MibESGG45vZ0O5kPoTP4YCVpuCfuGmR 9970/ejrY3/WgKVGtREwoeP323sSsTjJwHS3nKNG7QoQY2US2G0xoWDJJbygZh2eG+fR dklLLcSKIKcVtrpKT9OnEZ4aTe4bunhXU3FncMP+fqTrY/zy/4OqsrLMvgWvOc7qfXEb 688Q== X-Gm-Message-State: AKGB3mJkU8YgqIONxIIyxHf63u8rZlxUbJOm/+mAifKwfou/o81jCIvZ lx1Igiu9/YHR4W3sTAugjHt7tpFmJf+emKoR3Qc= X-Google-Smtp-Source: ACJfBovIGoCMaxbo8Fms+Tn4PNC3TWarBfJUnvqfflOKpppqEl70+9O0h3+l0XrtPaek4zp7WiAUrEdsdA5/UI0jFEA= X-Received: by 10.107.16.158 with SMTP id 30mr3866152ioq.291.1513348766047; Fri, 15 Dec 2017 06:39:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.134.9 with HTTP; Fri, 15 Dec 2017 06:39:25 -0800 (PST) In-Reply-To: References: <4c3ae20e-b6dd-d5db-0b93-2e1225daa658@selasky.org> <4eb0c57e-96fa-b75a-17f8-750154aa247a@selasky.org> From: blubee blubeeme Date: Fri, 15 Dec 2017 22:39:25 +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 14:39:27 -0000 On Fri, Dec 15, 2017 at 10:15 PM, Hans Petter Selasky wrote: > On 12/15/17 13:52, blubee blubeeme wrote: > >> When you read this document:https://people.freebsd.org/~ariff/SOUND_4.TXT >>> >> and search for all the "OSSv4 Compatibility:" comments >> > > Hi, > > >> This is the exact reason why so many *unix developers and users are always >> claiming that the latency is high in their audio programs or *unix needs a >> real time OS to do proper audio. >> > > FreeBSD's OSS subsystem supports both exclusive access, called bitperfect, > where no timers are involved, and the latency follows the selected buffer > size, and virtual OSS channels, which is the default, which let multiple > applications perform playback at the same time w/o any need for any special > library handling like JACK or ALSA. > > That was designed to fail to fix the issues from Jack/ ALSA/ OSSv3 and the >> other legacy audio interfaces. >> > > Here's the bug these "clever" developers introduced by purposefully going >> around the API. >> > > It is not a bug nor failure, it is an excellent feature. It also allows > multiple different system users to playback audio at the same time. > > When an audio application gets exclusive access to the device, they then >> try to implement their own timers as to when to release the hardware, this >> is inevitably done incorrectly, this leads to janky audio because janky >> developers don't want to follow protocol. >> > > I find the logic in your English inverted. Did you forget the word "not"? > > >> oss v4 made sure to make this type of access fail, so developers could >> learn good practices but clever devs patch it out. >> >> Then you have ALSA trying to reduce latency or Jack trying to reduce >> latency or Pulse trying to reduce latency when the issue is, ignorant >> developers grabbing exclusive access to sound hardware and making a mess >> of >> things. >> >> There's a reason why the FreeBSD kernel guys design a few mutex locks and >> tell you to use those and not try to make ur own mutex and even then >> people >> still make a mess sometimes. >> >> That's just one reason why what those clever FreeBSD guys did was a >> terrible idea. >> >> Can anyone on this list give me any reason they think that any piece of >> software should have exclusive access to sound hardware? >> > Please spend some time to write proper English. I'm finding it hard to > understand what you mean. > > Summing up: > > You want to make audio/oss from ports the default, because the latency in > sys/dev/sound causes "janky" audio, because Chromium doesn't play well with > FreeBSD's OSS and libalsa? This doesn't make sense. I suspect there is > some misconfiguration on your side, that libalsa doesn't see the default > FreeBSD's OSS devices through its alsa-OSS plugin. > > --HPS > I'd appreciate it if you kept the discussion on sound and improve your English comprehension. I gave one example of a Chromium bug where they said they'd accept an OSS patch. I did not say janky audio in Chromium have anything to do with why I think OSS is a better choice for the default audio system. You've made that assumption in this thread numerous times and I've ignored it because I wouldn't expect someone to be that dense. It doesn't make sense because you fail to understand English, that's not my fault. I have been porting synth tools to FreeBSD and I'd like to continue to port the software, implementing OSS backends for them based on the current upstream I am running into errors because of these so called "excellent" features which causes a lot of headache. What's with the stuck up attitude? Stay focused on the issue at hand which is FreeBSD's fork of OSS makes it a challenge to implement software that sticks to the OSS standard. There's nobody actively working on improving the audio situation on FreeBSD. You have a user/developer who wants to do the work and you react like it's some personal attack on your person to update the underlying code. Guess what, most of the clever features you talk about are in OSS4 and if they are not, they can still be added. I'd really appreciate it if you refrained from your continued attempts at ad hominem against me and stick to code and a discussion around ideas and implementations.