[pulseaudio-discuss] [PATCH 2/2] alsa: Add surround 2.1 profile

David Henningsson david.henningsson at canonical.com
Mon Feb 10 13:28:47 PST 2014


Are you ok if I push this one to master (just this one, not the chmap
API one)? I was hoping for a review but it seems nobody reviewed before
freeze time and I was on parental leave so missed the freeze date.

I just think it'll help quite a few people with laptop subwoofers so
would be good to have support for it.

On 10/22/2013 10:13 PM, David Henningsson wrote:
> Surround 2.1 is one of the more common surround profiles these days,
> so it's about time we support it.
> 
> Note that the "surround21" name is not in alsa-lib yet. Until it is,
> we fall back to using "surround40" in case "surround21" is not available.
> 
> The channel mapping API calls will help us distinguish between surround 4.0
> and 2.1, and in case the device does not support the channel mapping API,
> both will be available so the user can choose what the extra two channels
> are meant for.
> 
> Signed-off-by: David Henningsson <david.henningsson at canonical.com>
> ---
>  src/modules/alsa/mixer/profile-sets/default.conf                   | 7 +++++++
>  src/modules/alsa/mixer/profile-sets/extra-hdmi.conf                | 7 +++++++
>  src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf | 7 +++++++
>  src/modules/alsa/mixer/profile-sets/force-speaker.conf             | 7 +++++++
>  4 files changed, 28 insertions(+)
> 
> diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf
> index 9326245..a7bf922 100644
> --- a/src/modules/alsa/mixer/profile-sets/default.conf
> +++ b/src/modules/alsa/mixer/profile-sets/default.conf
> @@ -112,6 +112,13 @@ paths-output = analog-output analog-output-lineout analog-output-speaker analog-
>  paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
>  priority = 10
>  
> +[Mapping analog-surround-21]
> +device-strings = surround21:%f surround40:%f
> +channel-map = front-left,front-right,lfe,lfe
> +paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
> +priority = 8
> +direction = output
> +
>  [Mapping analog-surround-40]
>  device-strings = surround40:%f
>  channel-map = front-left,front-right,rear-left,rear-right
> diff --git a/src/modules/alsa/mixer/profile-sets/extra-hdmi.conf b/src/modules/alsa/mixer/profile-sets/extra-hdmi.conf
> index 96652f8..ddef545 100644
> --- a/src/modules/alsa/mixer/profile-sets/extra-hdmi.conf
> +++ b/src/modules/alsa/mixer/profile-sets/extra-hdmi.conf
> @@ -38,6 +38,13 @@ paths-output = analog-output analog-output-lineout analog-output-speaker analog-
>  paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
>  priority = 10
>  
> +[Mapping analog-surround-21]
> +device-strings = surround21:%f surround40:%f
> +channel-map = front-left,front-right,lfe,lfe
> +paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
> +priority = 8
> +direction = output
> +
>  [Mapping analog-surround-40]
>  device-strings = surround40:%f
>  channel-map = front-left,front-right,rear-left,rear-right
> diff --git a/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf b/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf
> index 66b18b3..66ad0be 100644
> --- a/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf
> +++ b/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf
> @@ -35,6 +35,13 @@ paths-output = analog-output analog-output-lineout analog-output-speaker-always
>  paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic-always analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
>  priority = 10
>  
> +[Mapping analog-surround-21]
> +device-strings = surround21:%f surround40:%f
> +channel-map = front-left,front-right,lfe,lfe
> +paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
> +priority = 8
> +direction = output
> +
>  [Mapping analog-surround-40]
>  device-strings = surround40:%f
>  channel-map = front-left,front-right,rear-left,rear-right
> diff --git a/src/modules/alsa/mixer/profile-sets/force-speaker.conf b/src/modules/alsa/mixer/profile-sets/force-speaker.conf
> index 7c5c1b8..a71a494 100644
> --- a/src/modules/alsa/mixer/profile-sets/force-speaker.conf
> +++ b/src/modules/alsa/mixer/profile-sets/force-speaker.conf
> @@ -34,6 +34,13 @@ paths-output = analog-output analog-output-lineout analog-output-speaker-always
>  paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
>  priority = 10
>  
> +[Mapping analog-surround-21]
> +device-strings = surround21:%f surround40:%f
> +channel-map = front-left,front-right,lfe,lfe
> +paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
> +priority = 8
> +direction = output
> +
>  [Mapping analog-surround-40]
>  device-strings = surround40:%f
>  channel-map = front-left,front-right,rear-left,rear-right
> 



-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list