Skip to contentSkip to conversation

add surround21 for Echo3G devices

PATCH In review [email protected] 2 participants 10 messages Jan 16, 2016 – Jan 18, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add surround21 for Echo3G devices

From: Tom Yan <[email protected]>

It's the only card conf that make use of surround41.conf and surround50.conf but not surround21.conf; Adding it for consistency, since all three of them are derived from surround51.

src/conf/cards/Echo_Echo3G.conf +34 -0
index 766f13f..93d9ce4 100644
@@ -50,6 +50,40 @@ Echo_Echo3G.pcm.side.0 {
 	subdevice 6
 }
 
+<confdir:pcm/surround21.conf>
+Echo_Echo3G.pcm.surround21.0 {
+	@args [ CARD ]
+	@args.CARD {
+		type string
+	}
+	type multi
+	slaves [
+		{
+			pcm {
+				@func concat
+				strings [
+					"cards.Echo_Echo3G.pcm.front.0:CARD=" $CARD
+				]
+			}
+			channels 2
+		}
+		{
+			pcm {
+				@func concat
+				strings [
+					"cards.Echo_Echo3G.pcm.center_lfe.0:CARD=" $CARD
+				]
+			}
+			channels 2
+		}
+	]
+	bindings [
+		{ slave 0 channel 0 }
+		{ slave 0 channel 1 }
+		{ slave 1 channel 0 }
+	]
+}
+
 <confdir:pcm/surround40.conf>
 Echo_Echo3G.pcm.surround40.0 {
 	@args [ CARD ]
Signature · 1 line
2.7.0
author
#1 lore raw

There is actually ONE card conf, AACI.conf, that supports surround51 but not surround20/surround41/surround50, but I don't feel like touching it, coz it's in the ideal state of what I proposed here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-January/103121.html

Quoted 54 lines · On 17 January 2016 at 03:05, <[email protected]> wrote:

From: Tom Yan <[email protected]>

It's the only card conf that make use of surround41.conf and surround50.conf but not surround21.conf; Adding it for consistency, since all three of them are derived from surround51.

src/conf/cards/Echo_Echo3G.conf +34 -1
index 766f13f..93d9ce4 100644
@@ -50,6 +50,40 @@ Echo_Echo3G.pcm.side.0 {
        subdevice 6
 }
 
+<confdir:pcm/surround21.conf>
+Echo_Echo3G.pcm.surround21.0 {
+       @args [ CARD ]
+       @args.CARD {
+               type string
+       }
+       type multi
+       slaves [
+               {
+                       pcm {
+                               @func concat
+                               strings [
+                                       "cards.Echo_Echo3G.pcm.front.0:CARD=" $CARD
+                               ]
+                       }
+                       channels 2
+               }
+               {
+                       pcm {
+                               @func concat
+                               strings [
+                                       "cards.Echo_Echo3G.pcm.center_lfe.0:CARD=" $CARD
+                               ]
+                       }
+                       channels 2
+               }
+       ]
+       bindings [
+               { slave 0 channel 0 }
+               { slave 0 channel 1 }
+               { slave 1 channel 0 }
+       ]
+}
+
 <confdir:pcm/surround40.conf>
 Echo_Echo3G.pcm.surround40.0 {
        @args [ CARD ]
--

2.7.0

author
#2 lore raw

It's included in another patchset:
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-January/103140.html
So that the surround21 definition will be before surround30 instead of surround40.

Quoted 60 lines · Tom Yan

There is actually ONE card conf, AACI.conf, that supports surround51 but not surround20/surround41/surround50, but I don't feel like touching it, coz it's in the ideal state of what I proposed here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-January/103121.html

Quoted 54 lines · On 17 January 2016 at 03:05, <[email protected]> wrote:

From: Tom Yan <[email protected]>

It's the only card conf that make use of surround41.conf and surround50.conf but not surround21.conf; Adding it for consistency, since all three of them are derived from surround51.

src/conf/cards/Echo_Echo3G.conf +34 -1
index 766f13f..93d9ce4 100644
@@ -50,6 +50,40 @@ Echo_Echo3G.pcm.side.0 {
        subdevice 6
 }
 
+<confdir:pcm/surround21.conf>
+Echo_Echo3G.pcm.surround21.0 {
+       @args [ CARD ]
+       @args.CARD {
+               type string
+       }
+       type multi
+       slaves [
+               {
+                       pcm {
+                               @func concat
+                               strings [
+                                       "cards.Echo_Echo3G.pcm.front.0:CARD=" $CARD
+                               ]
+                       }
+                       channels 2
+               }
+               {
+                       pcm {
+                               @func concat
+                               strings [
+                                       "cards.Echo_Echo3G.pcm.center_lfe.0:CARD=" $CARD
+                               ]
+                       }
+                       channels 2
+               }
+       ]
+       bindings [
+               { slave 0 channel 0 }
+               { slave 0 channel 1 }
+               { slave 1 channel 0 }
+       ]
+}
+
 <confdir:pcm/surround40.conf>
 Echo_Echo3G.pcm.surround40.0 {
        @args [ CARD ]
--

2.7.0

#3 lore raw
In reply to Tom Yan

7>

Quoted 4 lines

There is actually ONE card conf, AACI.conf, that supports surround51 but not surround20/surround41/surround50, but I don't feel like touching it, coz it's in the ideal state of what I proposed here:

http://mailman.alsa-project.org/pipermail/alsa-devel/2016-January/103121.html

Quoted 5 lines · On 17 January 2016 at 03:05, <[email protected]> wrote:
Quoted 3 lines

From: Tom Yan <[email protected]>

It's the only card conf that make use of surround41.conf and

surround50.conf but not surround21.conf; Adding it for consistency, since all three of them are derived from surround51.

Quoted 4 lines

Review

Quoted 4 lines
(quoted diff) +0 -0

b/src/conf/cards/Echo_Echo3G.conf

Quoted 7 lines
Quoted 7 lines

index 766f13f..93d9ce4 100644

src/conf/cards/Echo_Echo3G.conf +0 -0
@@ -50,6 +50,40 @@ Echo_Echo3G.pcm.side.0 {
        subdevice 6
 }
 
Quoted 13 lines

src/conf/cards/Echo_Echo3G.conf Echo_Echo3G.pcm.side.0 { · line 86

Quoted 13 lines
src/conf/cards/Echo_Echo3G.conf +13 -0
+<confdir:pcm/surround21.conf>
+Echo_Echo3G.pcm.surround21.0 {
+       @args [ CARD ]
+       @args.CARD {
+               type string
+       }
+       type multi
+       slaves [
+               {
+                       pcm {
+                               @func concat
+                               strings [
+

"cards.Echo_Echo3G.pcm.front.0:CARD=" $CARD

Quoted 9 lines

src/conf/cards/Echo_Echo3G.conf Echo_Echo3G.pcm.side.0 { · line 86

Quoted 9 lines
src/conf/cards/Echo_Echo3G.conf +9 -0
+                               ]
+                       }
+                       channels 2
+               }
+               {
+                       pcm {
+                               @func concat
+                               strings [
+

"cards.Echo_Echo3G.pcm.center_lfe.0:CARD=" $CARD

Quoted 4 lines
Quoted 4 lines
src/conf/cards/Echo_Echo3G.conf +4 -0
+                               ]
+                       }
+                       channels 2
+               }
Quoted 8 lines

src/conf/cards/Echo_Echo3G.conf Echo_Echo3G.pcm.side.0 { · line 86

Quoted 8 lines
src/conf/cards/Echo_Echo3G.conf +8 -0
+       ]
+       bindings [
+               { slave 0 channel 0 }
+               { slave 0 channel 1 }
+               { slave 1 channel 0 }
+       ]
+}
+

Have you tested with real hardware for surround21 since pulseaudio fail with multi plugin with error -77 ?

http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-November/022670.html

#5 lore raw
In reply to a message not in the archive
Quoted 2 lines

On 18 January 2016 at 00:12, Raymond Yau <[email protected]>

Quoted 8 lines · wrote:
Quoted 8 lines

7>

Quoted 5 lines

There is actually ONE card conf, AACI.conf, that supports surround51 but not surround20/surround41/surround50, but I don't feel like touching it, coz it's in the ideal state of what I proposed here:

http://mailman.alsa-project.org/pipermail/alsa-devel/2016-January/103121.html

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · On 17 January 2016 at 03:05, <[email protected]> wrote:
Quoted 4 lines

From: Tom Yan <[email protected]>

It's the only card conf that make use of surround41.conf and surround50.conf but not surround21.conf; Adding it for consistency,

since

Quoted 43 lines
Quoted 43 lines
Quoted 43 lines
Quoted 43 lines

all three of them are derived from surround51.

src/conf/cards/Echo_Echo3G.conf +13 -0
index 766f13f..93d9ce4 100644
@@ -50,6 +50,40 @@ Echo_Echo3G.pcm.side.0 {
        subdevice 6
 }
 
+<confdir:pcm/surround21.conf>
+Echo_Echo3G.pcm.surround21.0 {
+       @args [ CARD ]
+       @args.CARD {
+               type string
+       }
+       type multi
+       slaves [
+               {
+                       pcm {
+                               @func concat
+                               strings [
+

"cards.Echo_Echo3G.pcm.front.0:CARD=" $CARD

src/conf/cards/Echo_Echo3G.conf +9 -0
+                               ]
+                       }
+                       channels 2
+               }
+               {
+                       pcm {
+                               @func concat
+                               strings [
+

"cards.Echo_Echo3G.pcm.center_lfe.0:CARD=" $CARD

src/conf/cards/Echo_Echo3G.conf +6 -0
+                               ]
+                       }
+                       channels 2
+               }
+       ]
+       bindings [
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

src/conf/cards/Echo_Echo3G.conf Echo_Echo3G.pcm.side.0 { · line 86

Quoted 6 lines
src/conf/cards/Echo_Echo3G.conf +6 -0
+               { slave 0 channel 0 }
+               { slave 0 channel 1 }
+               { slave 1 channel 0 }
+       ]
+}
+

Have you tested with real hardware for surround21 since pulseaudio fail

with

Quoted 3 lines
Quoted 3 lines

multi plugin with error -77 ?

http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-November/022670.html

Quoted 6 lines

Nope, not tested with one that uses a card conf that make use of the multi plugin.

I just happen to have found this particular conf have surround21 missing, so I add it back for consistency:

http://mailman.alsa-project.org/pipermail/alsa-devel/2016-January/103123.html

Quoted 4 lines

But I do wonder why some card conf needs the multi plugin while others doesn't. I wonder if it had been abused. Feels like it is something that should be implemented in the actual driver code instead.

Those cards allow user to play two audio streams to front and rear devices, they need multi plugin for multi channel playback

http://git.alsa-project.org/?p=alsa-plugins.git;a=commit;h=a0693150dfd428fdd4df474efdc6b5e26a41ba21

It seem that playback of some plugins can be started at first write when start threshold is -1

Pulseaudio call snd_pcm_start when pcm state is already running

author
#6 lore raw

Then what about this:
http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/SB-XFi.conf;h=eb2218bfdcc704e4bf39e0e0c21539ee7f9ff8f8;hb=HEAD
It seems to be allow the "multi-streaming" you mentioned but it doesn't need the multi plugin.

Hmm, I feel like definitions for "ttable PCMs" in Echo_Echo3G.conf should be cleaned up...

Quoted 98 lines · Raymond Yau
Quoted 80 lines
Quoted 71 lines · Raymond Yau

7>

Quoted 54 lines

There is actually ONE card conf, AACI.conf, that supports surround51 but not surround20/surround41/surround50, but I don't feel like touching it, coz it's in the ideal state of what I proposed here:

http://mailman.alsa-project.org/pipermail/alsa-devel/2016-January/103121.html

Quoted 46 lines · On 17 January 2016 at 03:05, <[email protected]> wrote:

From: Tom Yan <[email protected]>

It's the only card conf that make use of surround41.conf and surround50.conf but not surround21.conf; Adding it for consistency, since
all three of them are derived from surround51.

src/conf/cards/Echo_Echo3G.conf +13 -0
index 766f13f..93d9ce4 100644
@@ -50,6 +50,40 @@ Echo_Echo3G.pcm.side.0 {
        subdevice 6
 }
 
+<confdir:pcm/surround21.conf>
+Echo_Echo3G.pcm.surround21.0 {
+       @args [ CARD ]
+       @args.CARD {
+               type string
+       }
+       type multi
+       slaves [
+               {
+                       pcm {
+                               @func concat
+                               strings [
+

"cards.Echo_Echo3G.pcm.front.0:CARD=" $CARD

src/conf/cards/Echo_Echo3G.conf +9 -0
+                               ]
+                       }
+                       channels 2
+               }
+               {
+                       pcm {
+                               @func concat
+                               strings [
+

"cards.Echo_Echo3G.pcm.center_lfe.0:CARD=" $CARD

src/conf/cards/Echo_Echo3G.conf +4 -0
+                               ]
+                       }
+                       channels 2
+               }
Quoted 8 lines

src/conf/cards/Echo_Echo3G.conf Echo_Echo3G.pcm.side.0 { · line 86

Quoted 8 lines
src/conf/cards/Echo_Echo3G.conf +8 -0
+       ]
+       bindings [
+               { slave 0 channel 0 }
+               { slave 0 channel 1 }
+               { slave 1 channel 0 }
+       ]
+}
+

Have you tested with real hardware for surround21 since pulseaudio fail with
multi plugin with error -77 ?

Quoted 1 line

http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-November/022670.html

Nope, not tested with one that uses a card conf that make use of the multi plugin.

Quoted 8 lines

I just happen to have found this particular conf have surround21 missing, so I add it back for consistency:

http://mailman.alsa-project.org/pipermail/alsa-devel/2016-January/103123.html

But I do wonder why some card conf needs the multi plugin while others doesn't. I wonder if it had been abused. Feels like it is something that should be implemented in the actual driver code instead.

Those cards allow user to play two audio streams to front and rear devices, they need multi plugin for multi channel playback

http://git.alsa-project.org/?p=alsa-plugins.git;a=commit;h=a0693150dfd428fdd4df474efdc6b5e26a41ba21

It seem that playback of some plugins can be started at first write when start threshold is -1

Pulseaudio call snd_pcm_start when pcm state is already running

#7 lore raw
Quoted 2 lines

Then what about this:

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/SB-XFi.conf;h=eb2218bfdcc704e4bf39e0e0c21539ee7f9ff8f8;hb=HEAD

Quoted 5 lines

It seems to be allow the "multi-streaming" you mentioned but it doesn't need the multi plugin.

Hmm, I feel like definitions for "ttable PCMs" in Echo_Echo3G.conf should be cleaned up...

No, only those creative sound card emu10k1 and ca0106 allow up to four pcm devices

For hda, you need to change the logic of alsa playback stream similar to multiple alsa capture devices, you can use hint "indep_hp=1" to enable multi stream playback (analog and alt analog playback )

Freebsd allow you to use your hda intel as four independent pcm devices

https://www.freebsd.org/cgi/man.cgi?query=snd_hda&sektion=4&manpath=FreeBSD+7.2-RELEASE

author
#8 lore raw

When did I say "hda"? Have you even read the link? I've been talking about X-Fi.

Compare these these two conf:
http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/SB-XFi.conf;h=eb2218bfdcc704e4bf39e0e0c21539ee7f9ff8f8;hb=HEAD
http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/CA0106.conf;h=2f0eaf0afdc8dc826cbd3722b61cdb3310ca07f0;hb=HEAD

BOTH of them shows that the four "stereo" ports they have exist as "device", but the SB-XFi.conf does not use the multi plugin to bind them to provide a surround PCM like CA0106.conf; instead it can simply use the "front" PCM, apparently.

Quoted 21 lines · Raymond Yau
Quoted 9 lines

Then what about this:

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/SB-XFi.conf;h=eb2218bfdcc704e4bf39e0e0c21539ee7f9ff8f8;hb=HEAD
It seems to be allow the "multi-streaming" you mentioned but it doesn't need the multi plugin.

Hmm, I feel like definitions for "ttable PCMs" in Echo_Echo3G.conf should be cleaned up...

No, only those creative sound card emu10k1 and ca0106 allow up to four pcm devices

For hda, you need to change the logic of alsa playback stream similar to multiple alsa capture devices, you can use hint "indep_hp=1" to enable multi stream playback (analog and alt analog playback )

Freebsd allow you to use your hda intel as four independent pcm devices

https://www.freebsd.org/cgi/man.cgi?query=snd_hda&sektion=4&manpath=FreeBSD+7.2-RELEASE

#9 lore raw
Quoted 3 lines

Compare these these two conf:

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/SB-XFi.conf;h=eb2218bfdcc704e4bf39e0e0c21539ee7f9ff8f8;hb=HEAD

Quoted 1 line

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/CA0106.conf;h=2f0eaf0afdc8dc826cbd3722b61cdb3310ca07f0;hb=HEAD

Quoted 5 lines

BOTH of them shows that the four "stereo" ports they have exist as "device", but the SB-XFi.conf does not use the multi plugin to bind them to provide a surround PCM like CA0106.conf; instead it can simply use the "front" PCM, apparently.

These two cards are different, emu10k1 have "rear" device, "centerlfe" and "side" devices

but they use multi plugin instead of surroundxx use pcm.front

SB-XFi.pcm.surround40.0 cards.SB-XFi.pcm.front.0
SB-XFi.pcm.surround51.0 cards.SB-XFi.pcm.front.0
SB-XFi.pcm.surround71.0 cards.SB-XFi.pcm.front.0

author
#10 lore raw

different from what? each other? you mean the confs (yeah that's why I pasted the links) or the actual cards (so that they derserve confs in different from SOMEHOW)?

and emu10k1 doesn't even have "side".

I know some of the confs use multi and some use front. that's my question/doubt, coz that seem to imply that some of their drivers are sort of "incomplete".

and you haven't been really making any point/sense tbh. i don't feel like i should continue any discussion/conversation with you. it's out of the scope of my patch anyway.

Quoted 21 lines · Raymond Yau
Quoted 4 lines

Compare these these two conf:

Quoted 8 lines

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/SB-XFi.conf;h=eb2218bfdcc704e4bf39e0e0c21539ee7f9ff8f8;hb=HEAD

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/CA0106.conf;h=2f0eaf0afdc8dc826cbd3722b61cdb3310ca07f0;hb=HEAD

BOTH of them shows that the four "stereo" ports they have exist as "device", but the SB-XFi.conf does not use the multi plugin to bind them to provide a surround PCM like CA0106.conf; instead it can simply use the "front" PCM, apparently.

These two cards are different, emu10k1 have "rear" device, "centerlfe" and "side" devices

but they use multi plugin instead of surroundxx use pcm.front

SB-XFi.pcm.surround40.0 cards.SB-XFi.pcm.front.0
SB-XFi.pcm.surround51.0 cards.SB-XFi.pcm.front.0
SB-XFi.pcm.surround71.0 cards.SB-XFi.pcm.front.0