Skip to contentSkip to conversation

problems with Terratec Aureon Sky 5.1

DISCUSSION Andreas Bulling 2 participants 6 messages Mar 14, 2004 – Mar 15, 2004

lore
Share & tools
lore
#0 lore raw

Hi folks,

for months now I have big problems getting surround sound to work with my Aureon Sky 5.1 and hope someone on this list can and is willing to help me, now. I would like to put all of the collected information and tips on the alsa wiki afterwards.

That's what I did so far:
I've read all the scanty information concerning the ice1724 chip, the available alsa documentation, postings of different forums and mailinglists and also got in contact with Simon Oosthoeck (-> alsaWiki).
I already posted to alsa-user but the two answers didn't help me... :(

The "handmade" solution I've found so far is the following:

~/.asoundrc:
--------------------------------

pcm.!default {
    type plug
    slave ice1724_S32_LE;
}
pcm.surround {
        type route;
        slave.pcm {
                type hw;
                card 0;
                device 0;
        }
        slave.channels 6
        ttable.0.0 1;
        ttable.1.1 1;
        ttable.0.2 1;
        ttable.1.3 1;
        ttable.0.4 1;
        ttable.1.5 1;
}
pcm_slave.ice1724_S32_LE {
        pcm surround;
        format S32_LE;
}

--------------------------------

Sound out of all 6 speakers but as everybody can imagine I'm not satisfied with this solution because also "real" surround sound (e.g. from dvd) is mixed up.

What should work out of the box is to use the "surround51" device (that's what I thought at the beginning without deeper knowledge of alsa and what I found in xine's config for example) but all I get is the following error message:

-----
andreas@phoenix andreas $ aplay -Dsurround51 /usr/kde/3.2/share/sounds/pop.wav Playing WAVE '/usr/kde/3.2/share/sounds/pop.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
aplay: set_params:827: Sample format non available
-----

The common format problem, but why hasn't it already been fixed in /usr/share/alsa/cards/ICE1724.conf? I looked into the file, changed a little bit but had no success.
Using -Dplug:surround51 instead works, but still without sound out of the rear speakers...

Well, perhaps someone already knows a solution to this problems... nevertheless here are all the other questions I want to find answers and write documentation for.

1) What are the following channels (?) in a{lsa}mixer for: IEC958, IEC958 1, IEC958 Output, Multi Track Peak I can select what I like but can't notice any effect. "Which to use for what purpose"?

2) What are the following options for: PCM Out0, H/W In [0|1], IEC958 I (-nput ?) What are the differences? "Which to use for what purpose"?

3) What is the "right" way to get surround sound with the ice1724 chip? Do exist different or partial solutions to this problem? Should (n't) it work right "out of the box" with the standard configs?

4) Who is the main and "responsible" ice1724 developer? I would like to contact him to fix this, perhaps together, and I think he should know best about questions 1-3), at least I hope so ;)

================================

My setup is the following:

- Terratec Aureon Sky 5.1

0000:00:0d.0 Multimedia audio controller: IC Ensemble Inc ICE1724 [Envy24HT] (rev 01)
Subsystem: TERRATEC Electronic GmbH: Unknown device 1147
Flags: bus master, medium devsel, latency 32, IRQ 17
I/O ports at e400
I/O ports at e000 [size=128]
Capabilities: <available only to root>

- Philipps A3.600 Surround System
- Gentoo Linux, Kernel 2.6.4-mm1
- Alsa Version 1.0.2c (used the kernel modules, not alsa-driver)
- Alsa [Lib|Utils] Version [1.0.3b|1.0.3]
- Alsa Oss Version 1.0.3a

================================

In suspense expectation,
Andreas

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#1 lore raw
Quoted 8 lines · Andreas Bulling

-----
andreas@phoenix andreas $ aplay -Dsurround51 /usr/kde/3.2/share/sounds/pop.wav Playing WAVE '/usr/kde/3.2/share/sounds/pop.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
aplay: set_params:827: Sample format non available
-----

The common format problem, but why hasn't it already been fixed in /usr/share/alsa/cards/ICE1724.conf? I looked into the file, changed a little

Because it's perfectly ok. The applications should use 'plug:surround51' device if they want to enable automatic conversions. So, report this bug to xine developers.

Quoted 4 lines

bit but had no success.

Using -Dplug:surround51 instead works, but still without sound out of the rear speakers...

Are you sure that xine sends six channels to device? It looks like that only two channels are processed and in this case alsa-lib default configuration copies only two channels to output.

If you refer to 'aplay -Dplug:surround51' then it won't work, too. Same problem - you need to override the default policy for the plug plugin:

route_policy STR # route policy for automatic ttable generation
# STR can be 'default', 'average', 'copy', 'duplicate' # average: result is average of input channels # copy: only first channels are copied to destination # duplicate: duplicate first set of channels # default: copy policy, except for mono capture - sum

So, you need something like:

pcm.duplicate {
type plug
slave.pcm "surround51"
route_policy duplicate
}

And now, 'aplay -Dduplicate' will duplicate stream to all six channels.

It is also possible that you can do duplication at hardware level, but I don't remember the ICE1724 datasheet....

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#2 lore raw

Thanks for your answer!

On Sun, Mar 14, 2004 at 05:59:38PM +0100, Jaroslav Kysela wrote:

| Because it's perfectly ok. The applications should use 'plug:surround51' 
| device if they want to enable automatic conversions. So, report this bug 
| to xine developers.

I will do that.

| Are you sure that xine sends six channels to device? It looks like that 
| only two channels are processed and in this case alsa-lib default 
| configuration copies only two channels to output.
| 
| If you refer to 'aplay -Dplug:surround51' then it won't work, too. Same 
| problem - you need to override the default policy for the plug plugin:
| 
|   route_policy STR      # route policy for automatic ttable generation
|                         # STR can be 'default', 'average', 'copy', 'duplicate'
|                         # average: result is average of input channels
|                         # copy: only first channels are copied to destination
|                         # duplicate: duplicate first set of channels
|                         # default: copy policy, except for mono capture - sum
| 
| So, you need something like:
| 
| pcm.duplicate {
| 	type plug
| 	slave.pcm "surround51"
| 	route_policy duplicate
| }
| 
| And now, 'aplay -Dduplicate' will duplicate stream to all six channels.

-> slave.pcm "surround51":
That means that the standard surround51 device should also work right out of the box with the ice1724 chip?
I was surprised that the format problem has gone ;)

Hm... I tried that but it doesn't work - still sound only out of the front speakers with xmms and the duplicate output device. Do I need anything else?

Andreas

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#3 lore raw
Quoted 5 lines · Andreas Bulling

| And now, 'aplay -Dduplicate' will duplicate stream to all six channels.

-> slave.pcm "surround51":
That means that the standard surround51 device should also work right out of the box with the ice1724 chip?

Yes, but you must use 32-bit samples. Otherwise the plug plugin will do the automatic conversion.

Quoted 1 line

I was surprised that the format problem has gone ;)

Yes, because the plug plugin is used in my pcm definition.

Quoted 2 lines

Hm... I tried that but it doesn't work - still sound only out of the front speakers with xmms and the duplicate output device. Do I need anything else?

If you have volumes up, then it should work.

What does say command 'aplay -v -Dduplicate <somefile>'?

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#4 lore raw

On Sun, Mar 14, 2004 at 06:21:32PM +0100, Jaroslav Kysela wrote:

| > Hm... I tried that but it doesn't work - still sound only out of the front speakers with
| > xmms and the duplicate output device. Do I need anything else?
| 
| If you have volumes up, then it should work.
| 
| What does say command 'aplay -v -Dduplicate <somefile>'?

------------------------------
andreas@phoenix andreas $ aplay -v -Dduplicate /usr/kde/3.2/share/sounds/KDE_Startup_new.wav Playing WAVE '/usr/kde/3.2/share/sounds/KDE_Startup_new.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Stereo Plug PCM: Linear conversion PCM (S32_LE)
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 22050
exact rate : 22050 (22050/1)
msbits : 16
buffer_size : 11024
period_size : 2756
period_time : 124988
tick_time : 1000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 2756
xfer_align : 2756
start_threshold : 11024
stop_threshold : 11024
silence_threshold: 0
silence_size : 0
boundary : 1444937728
Slave: Route conversion PCM
Transformation table:
0 <- 0
1 <- 1
2 <- 4
3 <- 5
4 <- 2
5 <- 3
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S32_LE
subformat : STD
channels : 2
rate : 22050
exact rate : 22050 (22050/1)
msbits : 32
buffer_size : 11024
period_size : 2756
period_time : 124988
tick_time : 1000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 2756
xfer_align : 2756
start_threshold : 11024
stop_threshold : 11024
silence_threshold: 0
silence_size : 0
boundary : 1444937728
Slave: Hardware PCM card 0 'Terratec Aureon 5.1-Sky' device 0 subdevice 0

Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S32_LE
subformat : STD
channels : 2
rate : 22050
exact rate : 22050 (22050/1)
msbits : 24
buffer_size : 11024
period_size : 2756
period_time : 124988
tick_time : 1000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 2756
xfer_align : 2756
start_threshold : 11024
stop_threshold : 11024
silence_threshold: 0
silence_size : 0
boundary : 1444937728

-----------------------------------------

To tell the truth, I'm totally confused by all the different postings and answers, now... *headshaking*

To summarize (please correct me if I'm wrong):
If I have a stereo source I have to mix up or route the two channels to all of the six channels. This is done with the route and ttable config I posted and should also be possible with your duplicate setup.

If I have a real surround source I have to
use the surround51 device, perhaps also with
your duplicate config

???

Thanks a lot for your patience!
Andreas

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#5 lore raw
In reply to Jaroslav Kysela

On Sun, Mar 14, 2004 at 05:59:38PM +0100, Jaroslav Kysela wrote:

| [...] 
| So, you need something like:
| 
| pcm.duplicate {
| 	type plug
| 	slave.pcm "surround51"
| 	route_policy duplicate
| }
| 
| And now, 'aplay -Dduplicate' will duplicate stream to all six channels.
|| On Sun, 14 Mar 2004, Andreas Bulling wrote:
|| > Hm... I tried that but it doesn't work - still sound only out of the front speakers with
|| > xmms and the duplicate output device. Do I need anything else?
||
|| If you have volumes up, then it should work.

Well, as I reported it didn't. But I made progress in the meanwhile:
Using "copy" didn't work either but adding "slave.channels 6" to your config results in output also from the two rear speakers. YEAH! ;) That means I can use this smaller config instead of my old and bigger "ttable one" for stereo sources (device duplicate in xmms) Problem fixed: YES [X]

Nevertheless, playing real 5.1 sound still doesn't work. I was able to get it by using
"gmplayer dvd://1 -v -aid 128 -ao oss -channels 6" but I would like to get it to work also with alsa.

What I tried next was using the following config and "gmplayer dvd://1 -v -aid 128 -ao alsa9:default -channels 6"

---------------------------

pcm.!default {
    type plug
    slave ice1724_S32_LE;
}
pcm_slave.ice1724_S32_LE {
        pcm surround51;
        format S32_LE;
}

---------------------------

Also a little progress: Sound out of all 6 speakers without further configuration. But unfortunately the channels got mixed up:
Gandalf is talking out of the left rear channel, now :( Without "-channels 6" no more sound out of both rear speakers...

How can I check the assignment of channels and speakers and how can I modify them?

That's the output using the "-channels 6" option:
---------------------------
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
dec_audio: Allocating 3840 bytes for input buffer.
dec_audio: Allocating 18432 + 65536 = 83968 bytes for output buffer. Using SSE optimized IMDCT transform
AC3: 5.1 (3f+2r+lfe) 48000 Hz 448,0 kbit/s
A52 flags before a52_frame: 0x37
A52 flags after a52_frame: 0x17
Using MMX optimized resampler
AUDIO: 48000 Hz, 6 ch, 16 bit (0x10), ratio: 56000->576000 (448,0 kbit) Selected audio codec: [a52] afm:liba52 (AC3-liba52)
==========================================================================
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred csp: Mpeg PES)
Trying filter chain: vo
Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale vo
The selected video_out device is incompatible with this codec. VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1 Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
Checking audio filter chain for 48000Hz/6ch/16bit -> 48000Hz/6ch/16bit... [libaf] Adding filter dummy
[dummy] Was reinitialized, rate=48000Hz, nch = 6, format = 0x00000001 and bps = 2
AF_pre: af format: 2 bps, 6 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 6ch Signed 16-bit (Little-Endian)
alsa-init: requested format: 48000 Hz, 6 channels, Signed 16-bit (Little-Endian)
alsa-init: compiled for ALSA-1.0.3
alsa-init: soundcard set to default
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: current val=11, fragcount=11
alsa-init: unable to set periods: Das Argument ist ungültig
alsa-init: got buffersize=131040
alsa9: 48000 Hz/6 channels/12 bpf/131040 bytes buffer/Signed 16 bit Little Endian
AO: [alsa9] 48000Hz 6ch Signed 16-bit (Little-Endian) (2 bps)
AO: Description: ALSA-0.9.x audio output
AO: Author: Alex Beregszaszi, Joy Winter <[email protected]>
AO: Comment: under developement
Building audio filter chain for 48000Hz/6ch/16bit -> 48000Hz/6ch/16bit... [dummy] Was reinitialized, rate=48000Hz, nch = 6, format = 0x00000001 and bps = 2 [dummy] Was reinitialized, rate=48000Hz, nch = 6, format = 0x00000001 and bps = 2 Starting playback...
alsa-space: free space = 131040, status=141277936, prepared --
==> Found audio stream: 129
==> Found audio stream: 130
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12) Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
VO Config (720x576->1024x576,flags=0,'MPlayer',0x32315659)
VO: [xv] 720x576 => 1024x576 Planar YV12
VO: Description: X11/Xv
VO: Author: Gerd Knorr <[email protected]> and others Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 70 for hw scaling
[xv] dx: 0 dy: 0 dw: 1024 dh: 614
*** [vo] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes [xv] dx: 0 dy: 0 dw: 1024 dh: 576
alsa-control: unable to find simple control 'PCM',0 0% 0% 0,0% 0 0 23% *** [vo] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
alsa-control: unable to find simple control 'PCM',0 0% 0% 0,0% 0 0 22% *** [vo] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
alsa-control: unable to find simple control 'PCM',0 0% 0% 0,0% 0 0 21%
alsa-control: unable to find simple control 'PCM',0 0% 0% 0,0% 0 0 21%
alsa-control: unable to find simple control 'PCM',0 0% 0% 0,0% 0 0 21%
alsa-control: unable to find simple control 'PCM',0 0% 0% 0,0% 0 0 21%
alsa-control: unable to find simple control 'PCM',0 0% 0% 0,0% 0 0 21%
alsa-control: unable to find simple control 'PCM',0 0% 0% 0,0% 0 0 21%
alsa-control: unable to find simple control 'PCM',0 0% 0% 0,0% 0 0 21% [and so on...]
---------------------------

Thanks,
Andreas

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click