Hi,
The question is : How config alsa to have spdif used by xine and mplayer.
My suspicion: I have no controls IEC958 threw "amixer controls" ???
I just installed last dev release 1.0-pre1 (with alsa-driver-1.0-pre2).
Technical data of my hardware and system configurations are at the end of the
mail.
Compilation and installation worked perfectly.
The only problem I have (and it might not be linked to this release version),
is in configuring my .asoundrc to have spdif work with xine, xmms, or
mplayer.
I expected to run xine and have 5.1 outputs on spdif with divx and the same
with mplayer.
But it is not the case
I tried:
mplayer -ao alsa9:nforce divx.avi
mplayer logs:
---------------
alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit
(Little-Endian)
alsa-init: soundcard set to nforce
alsa9: 44100 Hz/2 channels/4 bpf/16384 bytes buffer/Signed 16 bit Little
Endian
AO: [alsa9] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
But it goes to my analog speakers.
The same with xine:
xine divx.avi
logs:
------
main : d�tection du plugin de sortie audio <alsa>
audio_alsa_out : supported modes are 8bit mono stereo 4-channel 5-channel
5.1-channel a/52 and DTS pass-through
[...]
audio_alsa_out: Audio Device name = default
audio_alsa_out: Number of channels = 2
I test with aplay:
aplay -D plughw:0,0 test.wav: OK. Goes to my analog speakers
aplay -D plughw:0,2 test.wav: OK. Goes to my 5.1 speakers
I have read maybe every post, and docs available, but I didn't reach a config
that enables spdif with 5.1.
My .asoundrc:
------------------
pcm.nforce-hw {
type hw
card 0
}
pcm.!default {
type plug
slave.pcm "nforce"
}
pcm.nforce {
type dmix
ipc_key 1234
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
}
ctl.nforce-hw {
type hw
card 0
}
In fact, I can have results out threw spdif (so with 5.1 speakers) by setting
in .asoundrc the pcm "hw:0,2" instead of "hw:0.0", what means, I think, the
spdif CAN work.
But even though the sound goes to my 5.1 speakers, the system still is not
spdif apparently:
I say that because of this mplayer's logs, after the command:
mplayer -channels 6 -ao alsa9:nforce divx.avi
alsa-init: requested format: 44100 Hz, 6 channels, Signed 16-bit
(Little-Endian)
alsa-init: soundcard set to nforce
alsa-init: unable to set channels: Invalid argument
Could not open/initialize audio device -> no sound.
If I don't specified 6 channels, it works but with 2 channels (that outputs
threw my 5.1 speakers because of my trick on .asoundrc):
alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit
(Little-Endian)
alsa-init: soundcard set to nforce
alsa9: 44100 Hz/2 channels/4 bpf/16384 bytes buffer/Signed 16 bit Little
Endian
AO: [alsa9] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
xine neither works with 6 channels (but the sound still outputs to 5.1
speakers) :
it detects alsa:
main : d�tection du plugin de sortie audio <alsa>
audio_alsa_out : supported modes are 8bit mono stereo 4-channel 5-channel
5.1-channel a/52 and DTS pass-through
[..]
audio_alsa_out: Audio Device name = default
audio_alsa_out: Number of channels = 2
but thinks it is 2 channels.
Moreover, this tricks disabled the volumes controls from xine or xmms, or
alsamixer.
I thought if I didn't have .asoundrc, alsa would work with default
configuration, but I don't know how files from
/usr/share/alsa/cards/NFORCE.conf are involved in setting the configuration.
Yes, you guess I have nforce.
I then terminate with my hardware and system configuration:
*********************************************************************************
*********************************************************************************
Mandrake 9.1 - Linux 2.4.21-0.13mdk - i686
Athlon XP
MSI K7N420D Pro with GPU and APU (Nforce 1)
lspci -v:
------------
00:05.0 Multimedia audio controller: nVidia Corporation: Unknown device 01b0
(rev c2)
Subsystem: Micro-Star International Co., Ltd.: Unknown device 3730
Flags: bus master, 66Mhz, fast devsel, latency 0, IRQ 11
Memory at e3000000 (32-bit, non-prefetchable) [size=512K]
Capabilities: <available only to root>
00:06.0 Multimedia audio controller: nVidia Corporation nForce Audio (rev c2)
Subsystem: Micro-Star International Co., Ltd.: Unknown device 3730
Flags: bus master, 66Mhz, fast devsel, latency 0, IRQ 12
I/O ports at e000 [size=256]
I/O ports at e400 [size=128]
Memory at e3080000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <available only to root>
cat /proc/asound/version:
------------------------------
Advanced Linux Sound Architecture Driver Version 1.0.0pre2.
Compiled on Nov 21 2003 for kernel 2.4.21-0.13mdk with versioned symbols.
cat /proc/asound/devices:
------------------------------
0: [0- 0]: ctl
18: [0- 2]: digital audio playback
25: [0- 1]: digital audio capture
16: [0- 0]: digital audio playback
24: [0- 0]: digital audio capture
33: : timer
cat /proc/asound/cards:
-----------------------------
0 [nForce ]: NFORCE - NVidia nForce
NVidia nForce at 0xe3080000, irq 12
cat /proc/asound/oss/devices:
-------------------------------------
0: [0- 0]: mixer
3: [0- 3]: digital audio
12: [0-12]: digital audio
cat /proc/asound/pcm:
-------------------------------------
00-00: Intel ICH : NVidia nForce : playback 1 : capture 1
00-01: Intel ICH - MIC ADC : NVidia nForce - MIC ADC : capture 1
00-02: Intel ICH - IEC958 : NVidia nForce - IEC958 : playback 1
amixer controls:
------------------
numid=5,iface=MIXER,name='Master Mono Playback Switch'
numid=6,iface=MIXER,name='Master Mono Playback Volume'
numid=1,iface=MIXER,name='Master Playback Switch'
numid=2,iface=MIXER,name='Master Playback Volume'
numid=3,iface=MIXER,name='Headphone Playback Switch'
numid=4,iface=MIXER,name='Headphone Playback Volume'
numid=31,iface=MIXER,name='3D Control - Center'
numid=32,iface=MIXER,name='3D Control - Depth'
numid=28,iface=MIXER,name='3D Control - Switch'
numid=27,iface=MIXER,name='PCM Out Path & Mute'
numid=22,iface=MIXER,name='PCM Playback Switch'
numid=23,iface=MIXER,name='PCM Playback Volume'
numid=14,iface=MIXER,name='Line Playback Switch'
numid=15,iface=MIXER,name='Line Playback Volume'
numid=16,iface=MIXER,name='CD Playback Switch'
numid=17,iface=MIXER,name='CD Playback Volume'
numid=13,iface=MIXER,name='Mic Boost (+20dB)'
numid=30,iface=MIXER,name='Mic Select'
numid=11,iface=MIXER,name='Mic Playback Switch'
numid=12,iface=MIXER,name='Mic Playback Volume'
numid=9,iface=MIXER,name='Phone Playback Switch'
numid=10,iface=MIXER,name='Phone Playback Volume'
numid=18,iface=MIXER,name='Video Playback Switch'
numid=19,iface=MIXER,name='Video Playback Volume'
numid=7,iface=MIXER,name='PC Speaker Playback Switch'
numid=8,iface=MIXER,name='PC Speaker Playback Volume'
numid=20,iface=MIXER,name='Aux Playback Switch'
numid=21,iface=MIXER,name='Aux Playback Volume'
numid=29,iface=MIXER,name='Mono Output Select'
numid=24,iface=MIXER,name='Capture Source'
numid=25,iface=MIXER,name='Capture Switch'
numid=26,iface=MIXER,name='Capture Volume'
numid=34,iface=MIXER,name='Digital Audio Mode'
numid=33,iface=MIXER,name='Digital Mono Direct'
numid=37,iface=MIXER,name='External Amplifier Power Down'
numid=35,iface=MIXER,name='Low Power Mixer'
numid=36,iface=MIXER,name='Zero Fill DAC'
/etc/modules.conf:
---------------------
probeall scsi_hostadapter ide-scsi
probeall usb-interface usb-ohci
alias eth0 nvnet
options nvnet optimization=1
options nvnet optimization=1
alias /dev/nvidia* nvidia
#alias sound-slot-0 nvaudio
# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-intel8x0
# module options should go here
# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-0
# card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
#above snd-intel8x0 snd-pcm-oss
post-install snd-intel8x0 /usr/sbin/alsactl restore
pre-remove snd-intel8x0 /usr/sbin/alsactl store
lsmod:
--------
snd-pcm-oss 42020 0 (autoclean)
snd-mixer-oss 14416 0 (autoclean) [snd-pcm-oss]
parport_pc 25096 1 (autoclean)
lp 8096 0 (autoclean)
parport 34176 1 (autoclean) [parport_pc lp]
snd-intel8x0 21704 0
snd-ac97-codec 52480 0 [snd-intel8x0]
snd-pcm 78336 0 [snd-pcm-oss snd-intel8x0]
snd-timer 18244 0 [snd-pcm]
gameport 3316 0 [snd-intel8x0]
snd-mpu401-uart 4608 0 [snd-intel8x0]
snd-rawmidi 17696 0 [snd-mpu401-uart]
snd-seq-device 5804 0 [snd-rawmidi]
snd-page-alloc 9236 0 [snd-intel8x0 snd-pcm]
snd 44004 0 [snd-pcm-oss snd-mixer-oss snd-intel8x0
snd-ac97-codec snd-pcm snd-timer snd-mpu401-uart snd-rawmidi snd-seq-device]
nfsd 74256 8 (autoclean)
af_packet 14952 1 (autoclean)
sr_mod 16920 0 (autoclean)
floppy 55132 0
nvnet 30720 1 (autoclean)
ntfs 76812 1 (autoclean)
nls_iso8859-15 4092 3 (autoclean)
nls_cp850 4316 2 (autoclean)
vfat 11820 2 (autoclean)
fat 37944 0 (autoclean) [vfat]
supermount 15296 2 (autoclean)
ide-cd 33856 0
cdrom 31648 0 [sr_mod ide-cd]
tuner 11744 1 (autoclean)
tvaudio 15068 0 (autoclean) (unused)
bttv 78496 0
videodev 7872 2 [bttv]
i2c-algo-bit 9064 1 [bttv]
i2c-core 21192 0 [tuner tvaudio bttv i2c-algo-bit]
soundcore 6276 0 [snd bttv]
ide-scsi 11280 0
scsi_mod 103284 2 [sr_mod ide-scsi]
usbmouse 2936 0 (unused)
keybdev 2720 0 (unused)
mousedev 5268 1
hid 20900 0 (unused)
input 5664 0 [usbmouse keybdev mousedev hid]
printer 8448 0
usb-ohci 20584 0 (unused)
usbcore 72992 1 [usbmouse hid printer usb-ohci]
rtc 8060 0 (autoclean)
ext3 59916 13
jbd 38972 13 [ext3]
If you need further data, just reply.
N.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user