From alexbl@FreeBSD.org  Fri Jun 22 15:55:04 2007
Return-Path: <alexbl@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 507EC16A468
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 22 Jun 2007 15:55:04 +0000 (UTC)
	(envelope-from alexbl@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40])
	by mx1.freebsd.org (Postfix) with ESMTP id 3574413C4AD
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 22 Jun 2007 15:55:04 +0000 (UTC)
	(envelope-from alexbl@FreeBSD.org)
Received: from freefall.freebsd.org (alexbl@localhost [127.0.0.1])
	by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l5MFt3Ao047676
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 22 Jun 2007 15:55:03 GMT
	(envelope-from alexbl@freefall.freebsd.org)
Received: (from alexbl@localhost)
	by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l5MFt3YF047675;
	Fri, 22 Jun 2007 15:55:03 GMT
	(envelope-from alexbl)
Message-Id: <200706221555.l5MFt3YF047675@freefall.freebsd.org>
Date: Fri, 22 Jun 2007 15:55:03 GMT
From: Alexander Botero-Lowry <alexbl@FreeBSD.org>
Reply-To: Alexander Botero-Lowry <alexbl@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: per-vchan mixer support
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         113950
>Category:       kern
>Synopsis:       [sound] [patch] [request] add per-vchan mixer support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 22 16:00:10 GMT 2007
>Closed-Date:    Sat Jan 01 21:51:21 UTC 2011
>Last-Modified:  Sat Jan 01 21:51:21 UTC 2011
>Originator:     Alexander Botero-Lowry
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 6.0-STABLE FreeBSD 6.0-STABLE #0: Sat Dec 10 03:18:20 UTC 2005 kensmith@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386

>Description:
DragonFly has support for per-vchan volume control so that you can
adjust volume on an application level. This is a feature you usually have to
install some lame sound-server to get, and it would be really cool to have it
on FreeBSD. The Dfly commit log and links to the diffs are at:
http://leaf.dragonflybsd.org/mailarchive/commits/2007-06/msg00121.html

I tried to apply this myself, and while it was fairly trivial to apply against
STABLE, I wasn't able to really make sense of where stuff would go on CURRENT.
If it looks ok, and it doesn't take much shoehorning it would be really cool!	
>How-To-Repeat:
Try to play two songs at the same time and mute one of them.
>Fix:
shoehorn the dfly patches.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-multimedia 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Jul 1 04:35:04 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113950 

From: Ariff Abdullah <ariff@FreeBSD.org>
To: bug-followup@FreeBSD.org, alexbl@FreeBSD.org
Cc:  
Subject: Re: kern/113950: [sound] [patch] add per-vchan mixer support
Date: Sun, 1 Jul 2007 21:06:03 +0800

 Technically, the trivial approach used by DFly not quite applicable
 for FreeBSD due to various changes in the current (I'm talking about
 -current / 7.x) sound driver codes. These includes maintaining
 sample/bit fidelity (DFly still using 16bit/stereo little-endian),
 and future multichannel interleaved pcm data. Besides, inlining volume
 processing into virtual channel mixer is not quite correct since we
 already have feeder_volume to do the job. Our vchan is no longer meant
 for playback only since the latest "vrec" feature brings vchan
 capability for recording as well. Making vchan's (and vchan only)
 volume controllable is also quite unfair for other possible multi-pcm
 channel hardware like snd_emu10k and snd_via8233 since these drivers
 have multiple hardware playback channels that will make them look like
 a 2nd class citizen. That said, reasoning like "Sorry, you must enable
 vchan to use this feature" is purely unacceptable.
 
 But wait, I'm not finish yet. Please take a look at
 http://people.freebsd.org/~ariff/ , and see for yourself why
 our soon-to-be-committed "vpc" (volume per channel, coined by joel@)
 are much better. It is sample/bit/endian/multichannel safe, handle
 both playback and recording direction through "pcm" and "rec" control,
 valid for hardware/virtual channels and better locality control
 through SNDCTL_DSP_[GET|SET][PLAY|REC]VOL, SOUND_MIXER_[PCM|RECLEV]
 ioctls.
 
 (btw, I'm still waiting for interested port committers to make a port
  out of patch/binary modules from ~ariff/ , especially for RELENG_6
  and 5)
 
 With that, I'm about to close this PR. Next time, please bring
 this sort of discussion to multimedia@ first, ok ? :)
 
 Thank you.
 
 
 --
 Ariff Abdullah
 FreeBSD
 
 ... Recording in stereo is obviously too advanced
     and confusing for us idiot ***** users :P ........
State-Changed-From-To: open->suspended 
State-Changed-By: ariff 
State-Changed-When: Mon Jul 2 19:28:24 UTC 2007 
State-Changed-Why:  
Work is still in progress and near completion. Technical reasoning 
has been given. Please continue this discussion through multimedia@. 

Thank you. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113950 
State-Changed-From-To: suspended->closed 
State-Changed-By: arundel 
State-Changed-When: Sat Jan 1 21:47:37 UTC 2011 
State-Changed-Why:  
I believe stable/8 and HEAD have support for vpcs. I'm not sure, if this has 
been MFC'ed to stable/7, however if this isn't the case chances are very slim 
it will happen before stable/7 goes EoL. 
Thus close this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113950 
>Unformatted:
