Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ALSA SPDIF not working anymore
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
sebulba128
n00b
n00b


Joined: 02 Feb 2004
Posts: 31

PostPosted: Wed Jan 18, 2006 8:55 am    Post subject: ALSA SPDIF not working anymore Reply with quote

Hi,

for a few time my ALSA digital out SPDIF doesn`t work anymore, i have a via82xx and connected an YAMAHA Ampilfier , it worked correct and perfect for all the time. I don't if it is a problem with the kernel or the ALSA. I ' ve tried alsa 1.0.10 and the unstable 1.0.11-xx , I 'm using gentoo-sources (2.6.15-r1) . Played around with the alsamixer settings but nothing (the card is OK, in Winblows it works)
Another one with this problem ?

thx , sebulba128
Back to top
View user's profile Send private message
eisenmann
n00b
n00b


Joined: 08 Jan 2006
Posts: 31

PostPosted: Sun Jan 22, 2006 9:34 pm    Post subject: Reply with quote

Hello,

After the install of gentoo it works also on my system but since yesterday works only the dvd ac3 sound over the spdif to hi-fi system.
Only the pcm sound is not working over the spdif to the hi-fi system.

But all looks good. Have any an tip vor me.



here is the output from:

Code:

aplay -L

PCM list:
hw {
        @args.0 CARD
        @args.1 DEV
        @args.2 SUBDEV
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars {
                                0 ALSA_PCM_CARD
                                1 ALSA_CARD
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.card'
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars {
                                0 ALSA_PCM_DEVICE
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.device'
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name 'defaults.pcm.subdevice'
                }
        }
        type hw
        card $CARD
        device $DEV
        subdevice $SUBDEV
}
plughw {
        @args.0 CARD
        @args.1 DEV
        @args.2 SUBDEV
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars {
                                0 ALSA_PCM_CARD
                                1 ALSA_CARD
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.card'
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars {
                                0 ALSA_PCM_DEVICE
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.device'
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name 'defaults.pcm.subdevice'
                }
        }
        type plug
        slave.pcm {
                type hw
                card $CARD
                device $DEV
                subdevice $SUBDEV
        }
}
plug {
        @args.0 SLAVE
        @args.SLAVE {
                type string
        }
        type plug
        slave.pcm $SLAVE
}
shm {
        @args.0 SOCKET
        @args.1 PCM
        @args.SOCKET {
                type string
        }
        @args.PCM {
                type string
        }
        type shm
        server $SOCKET
        pcm $PCM
}
tee {
        @args.0 SLAVE
        @args.1 FILE
        @args.2 FORMAT
        @args.SLAVE {
                type string
        }
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default raw
        }
        type file
        slave.pcm $SLAVE
        file $FILE
        format $FORMAT
}
file {
        @args.0 FILE
        @args.1 FORMAT
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default raw
        }
        type file
        slave.pcm null
        file $FILE
        format $FORMAT
}
null {
        type null
}
cards 'cards.pcm'
front 'cards.pcm.front'
rear 'cards.pcm.rear'
center_lfe 'cards.pcm.center_lfe'
side 'cards.pcm.side'
surround40 'cards.pcm.surround40'
surround41 'cards.pcm.surround41'
surround50 'cards.pcm.surround50'
surround51 'cards.pcm.surround51'
surround71 'cards.pcm.surround71'
iec958 'cards.pcm.iec958'
spdif 'cards.pcm.iec958'
modem 'cards.pcm.modem'
phoneline 'cards.pcm.phoneline'
default 'cards.pcm.default'
dmix 'cards.pcm.dmix'
dsnoop 'cards.pcm.dsnoop'


and the output from:

Code:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Live [SBLive! Value [CT4832]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]
  Subdevices: 31/32
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
  Subdevice #8: subdevice #8
  Subdevice #9: subdevice #9
  Subdevice #10: subdevice #10
  Subdevice #11: subdevice #11
  Subdevice #12: subdevice #12
  Subdevice #13: subdevice #13
  Subdevice #14: subdevice #14
  Subdevice #15: subdevice #15
  Subdevice #16: subdevice #16
  Subdevice #17: subdevice #17
  Subdevice #18: subdevice #18
  Subdevice #19: subdevice #19
  Subdevice #20: subdevice #20
  Subdevice #21: subdevice #21
  Subdevice #22: subdevice #22
  Subdevice #23: subdevice #23
  Subdevice #24: subdevice #24
  Subdevice #25: subdevice #25
  Subdevice #26: subdevice #26
  Subdevice #27: subdevice #27
  Subdevice #28: subdevice #28
  Subdevice #29: subdevice #29
  Subdevice #30: subdevice #30
  Subdevice #31: subdevice #31
card 0: Live [SBLive! Value [CT4832]], device 2: emu10k1 efx [Multichannel Capture/PT Playback]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: Live [SBLive! Value [CT4832]], device 3: emu10k1 [Multichannel Playback]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


and the output from:

Code:

 cat /proc/asound/devices

  4: [0- 0]: hardware dependent
  8: [0- 0]: raw midi
 19: [0- 3]: digital audio playback
 18: [0- 2]: digital audio playback
 26: [0- 2]: digital audio capture
 25: [0- 1]: digital audio capture
 16: [0- 0]: digital audio playback
 24: [0- 0]: digital audio capture
  0: [0- 0]: ctl
  1:       : sequencer
  6: [0- 2]: hardware dependent
  9: [0- 1]: raw midi
 10: [0- 2]: raw midi
 33:       : timer


I think it looks all good but i have no sound is i execute :

Code:
aplay -D hw:0,0 /home/eisenmann/Desktop/jamtrack1.wav
Playing WAVE '/home/eisenmann/Desktop/jamtrack1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo


Code:

aplay -D hw:0,2 /home/eisenmann/Desktop/jamtrack1.wav
Playing WAVE '/home/eisenmann/Desktop/jamtrack1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Warning: rate is not accurate (requested = 44100Hz, got = 48000Hz)
         please, try the plug plugin (-Dplug:hw:0,2)


Code:

aplay -D hw:0,3 /home/eisenmann/Desktop/jamtrack1.wav
Playing WAVE '/home/eisenmann/Desktop/jamtrack1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:891: Access type not available



I hope you can help me

rgds eisenmann
Back to top
View user's profile Send private message
sebulba128
n00b
n00b


Joined: 02 Feb 2004
Posts: 31

PostPosted: Mon Jan 23, 2006 7:06 am    Post subject: Reply with quote

Hi, i have installed ALSa like on the Gentoo ALSA Guide. It worked only odver SPDIF when i unmuted IEC98xx in alsamixer and put the Volume to 0%. PCM and Master i have muted, because i don`t want to hear anything on my notebook. Setting in XMMS, Mplayer,.... as ALSA - Device hw0:1 works for me now to play AC3 and PCM over my Yamaha Receiver. I can post you my alsa conf-files , if this works not for you.
Back to top
View user's profile Send private message
xtc35893179
n00b
n00b


Joined: 27 Nov 2005
Posts: 6

PostPosted: Mon Jan 23, 2006 10:45 am    Post subject: Reply with quote

Hi everyone,
I'm having the same problem as described since the last emerge. I'm using an Asus A8N-E board with n-force 4 chipset. I also looked through my config files, but all seemed fine. I had a look at settings that sebula128 described, but they where already set, the only thing is that i have only an hw0:0 and hw0:2. But this was till the last emerge no problem, xmms and the other applications worked fine with the alsa default device.

Here you can see my devices:

Code:
 
aplay -l
   **** List of PLAYBACK Hardware Devices ****
   card 0: CK804 [NVidia CK804], device 0: Intel ICH [NVidia CK804]
     Subdevices: 1/1
     Subdevice #0: subdevice #0
   card 0: CK804 [NVidia CK804], device 2: Intel ICH - IEC958 [NVidia CK804 - IEC958]
     Subdevices: 0/1
     Subdevice #0: subdevice #0


Someone a different hint?
Back to top
View user's profile Send private message
xtc35893179
n00b
n00b


Joined: 27 Nov 2005
Posts: 6

PostPosted: Mon Jan 23, 2006 4:40 pm    Post subject: Reply with quote

Hi again,
i partly fixed my prob, even if it's not really satisfying. I also worked through the Gentoo Alsa Guide, but no changes. So I looked around on Gentoo-Wiki an found an article about HowTo Dolby Digital, so i tryed as discribed to run a videa-dvd with an ac3 audio stream using the mplay application with the following paramateres:

Code:

mplayer dvd:// -ao alsa:device=spdif -ac hwac3


The film started, still no sound. Then suddenly an icq contact wrote a message and i heard the icq sound. So i started xmms and there's also sound, the only prob is, as soon as i exit the mplayer, the speakers mute.

Anyone a good idea howto solve this prob? Maybe I have to change my sound.state again?
Back to top
View user's profile Send private message
eisenmann
n00b
n00b


Joined: 08 Jan 2006
Posts: 31

PostPosted: Tue Jan 24, 2006 1:29 pm    Post subject: Reply with quote

Hello sebulba128,

can you post your settings please. I have test the alsamixer settings but with out resault.

rgds eisenmann
Back to top
View user's profile Send private message
sebulba128
n00b
n00b


Joined: 02 Feb 2004
Posts: 31

PostPosted: Wed Jan 25, 2006 12:20 pm    Post subject: Reply with quote

i late sorry, here is my alsa.state in /etc:
You can use alsaconf to configure your soundcard and with alsamixer i have set IEC958, IEC958 Output, External Amplifier and all the VIA DXS to UNMUTE. Setting in all applications as hardware device to hw0:1 worked for me perfectley. And remeber to put the Output volume to 0% at IEC958 . This works vor the VIA Chips don't if it is the same with others.
here is my alsa.state in /etc:

Code:
state.V8235 {
        control.1 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'Master Playback Switch'
                value true
        }
        control.2 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 63'
                iface MIXER
                name 'Master Playback Volume'
                value.0 32
                value.1 32
        }
        control.3 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'Headphone Playback Switch'
                value true
        }
        control.4 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 63'
                iface MIXER
                name 'Headphone Playback Volume'
                value.0 47
                value.1 47
        }
        control.5 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'Master Mono Playback Switch'
                value true
        }
        control.6 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 1
                comment.range '0 - 31'
                iface MIXER
                name 'Master Mono Playback Volume'
                value 23
        }
        control.7 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'PC Speaker Playback Switch'
                value false
        }
        control.8 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 1
                comment.range '0 - 15'
                iface MIXER
                name 'PC Speaker Playback Volume'
                value 0
        }
        control.9 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'Phone Playback Switch'
                value false
        }
        control.10 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 1
                comment.range '0 - 31'
                iface MIXER
                name 'Phone Playback Volume'
                value 0
        }
        control.11 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'Mic Playback Switch'
                value false
        }
        control.12 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 31'
                iface MIXER
                name 'Mic Playback Volume'
                value.0 0
                value.1 0
        }
        control.13 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'Mic Boost (+20dB)'
                value false
        }
        control.14 {
               comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'Line Playback Switch'
                value false
        }
        control.15 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 31'
                iface MIXER
                name 'Line Playback Volume'
                value.0 0
                value.1 0
        }
        control.16 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'CD Playback Switch'
                value false
        }
        control.17 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 31'
                iface MIXER
                name 'CD Playback Volume'
                value.0 0
                value.1 0
        }
        control.18 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'Aux Playback Switch'
                value false
        }
        control.19 {
                comment.access 'read write'
                comment.type INTEGE               comment.count 2
                comment.range '0 - 31'
                iface MIXER
                name 'Aux Playback Volume'
                value.0 0
                value.1 0
        }
        control.20 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'PCM Playback Switch'
                value true
        }
        control.21 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 31'
                iface MIXER
                name 'PCM Playback Volume'
                value.0 17
                value.1 17
        }
        control.22 {
                comment.access 'read write'
                comment.type ENUMERATED
                comment.count 2
                comment.item.0 Mic
                comment.item.1 CD
                comment.item.2 Video
                comment.item.3 Aux
                comment.item.4 Line
                comment.item.5 Mix
                comment.item.6 'Mix Mono'
                comment.item.7 Phone
                iface MIXER
                name 'Capture Source'
                value.0 Mic
                value.1 Mic
        }
        control.23 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.cou               iface MIXER
                name 'Capture Switch'
                value true
        }
        control.24 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 15'
                iface MIXER
                name 'Capture Volume'
                value.0 0
                value.1 0
        }
        control.25 {
                comment.access 'read write'
                comment.type ENUMERATED
                comment.count 1
                comment.item.0 'pre 3D'
                comment.item.1 'post 3D'
                iface MIXER
                name 'PCM Out Path & Mute'
                value 'pre 3D'
        }
        control.26 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name '3D Control - Switch'
                value false
        }
        control.27 {
                comment.access 'read write'
                comment.type ENUMERATED
                comment.count 1
                comment.item.0 Mic1
                comment.item.1 Mic2
                iface MIXER
                name 'Mic Select'
                value Mic1
        }
        control.28 {
                comment.access read
                comment.type IEC958
                comment.count 1
                iface MIXER
                name 'IEC958 Playback Con Mask'
                value '0fff000f000000000000000000000000000000000000000000000000$
        }
        control.29 {
                comment.access read
                comment.type IEC958
                comment.count 1
                iface MIXER
                name 'IEC958 Playback Pro Mask'
                value cf0000000000000000000000000000000000000000000000000000000$
        }
        control.30 {
                comment.access 'read write'
                comment.type IEC958
                comment.count 1
                iface MIXER
                name 'IEC958 Playback Default'
                value '00820000000000000000000000000000000000000000000000000000$
        }
        control.31 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'IEC958 Playback Switch'
                value true
        }
        control.32 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 1
                comment.range '0 - 3'
                iface MIXER
                name 'IEC958 Playback AC97-SPSA'
                value 0
        }
        control.33 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'External Amplifier'
                value true
        }
        control.34 {
                comment.access 'read write'
                comment.type ENUMERATED
                comment.count 1
                comment.item.0 Input1
                comment.item.1 Input2
                iface MIXER
                name 'Input Source Select'
                value Input1
        }
        control.35 {
                comment.access 'read write'
                comment.type ENUMERATED
                comment.count 1
                comment.item.0 Input1
                comment.item.1 Input2
                iface MIXER
                name 'Input Source Select'
                index 1
                value Input1
        }
        control.36 {
                comment.access 'read write'
                comment.type BOOLEAN
                comment.count 1
                iface MIXER
                name 'IEC958 Output Switch'

                value true
        }
        control.37 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 31'
                iface MIXER
                name 'VIA DXS Playback Volume'
                value.0 31
                value.1 31
        }
        control.38 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 31'
                iface MIXER
                name 'VIA DXS Playback Volume'
                index 1
                value.0 31
                value.1 31
        }
        control.39 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 31'
                iface MIXER
                name 'VIA DXS Playback Volume'
               index 2
                value.0 31
                value.1 31
        }
        control.40 {
                comment.access 'read write'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 31'
                iface MIXER
                name 'VIA DXS Playback Volume'
                index 3
                value.0 31
                value.1 31
        }


and my alsasound config file in /etc/conf.d/
Code:

# ENABLE_OSS_EMUL:
# Do you want to enable in-kernel oss emulation?
# no - Do not load oss emul drivers
# yes - Load oss emul drivers if they're found

ENABLE_OSS_EMUL="yes"

# RESTORE_ON_START:
# Do you want to restore your mixer settings?  If not, your cards will be
# muted.
# no - Do not restore state
# yes - Restore state

RESTORE_ON_START="yes"

# SAVE_ON_STOP:
# Do you want to save changes made to your mixer volumes when alsasound
# stops?
# no - Do not save state
# yes - Save state

SAVE_ON_STOP="yes"
Back to top
View user's profile Send private message
eisenmann
n00b
n00b


Joined: 08 Jan 2006
Posts: 31

PostPosted: Thu Jan 26, 2006 12:04 pm    Post subject: Reply with quote

No change with your config. But i have figured out that is only a config problem. But at this time i dont know how i can solve it.

If i make the following command i hear the DD5.1 sound:
Code:

mplayer dvd:// -ao alsa:device=spdif -ac hwac3


and if i make this command
i hear pcm sound over spdif:
Code:

mplayer dvd:// -ao alsa:device=spdif


But i can't not use this command:
Code:

mplayer dvd:// -ao alsa:device=hw:0,2 -ac hwac3


This device can i use beause of the routing spdif to cards.pcm.iec958 this can you see with the command:

Code:

aplay -L


also can i use the device iec958 because it is also routed to cards.pcm.iec958 you can see it in the command
Code:
 aplay -L



The problem is that i cant use this defice in alsa-xmms here can i only use hw:0,0 ; hw:0,2 or hw:0,2
Also i would like to hear my oss sound from games over the spdif.



Have any some ideas how i can solve this problem??
Back to top
View user's profile Send private message
gilesjuk
Guru
Guru


Joined: 11 Feb 2003
Posts: 412
Location: Staffordshire, UK

PostPosted: Sun Jan 29, 2006 4:09 pm    Post subject: Reply with quote

I have had loads of problems getting SPDIF playback going, the solution was to use plug:spdif as the output device. This seems to work great.
_________________
^<^>^<^>^
G. Jones
-=-=-=-=-=-
Back to top
View user's profile Send private message
xtc35893179
n00b
n00b


Joined: 27 Nov 2005
Posts: 6

PostPosted: Sun Jan 29, 2006 11:13 pm    Post subject: Reply with quote

Hi it's me again,
i fixed my prob by by adding the following code to my /etc/modules.d/alsa:

Code:

# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-intel8x0
# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
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
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
# Set this to the correct number of cards.
options snd cards_limit=1


As mentioned before, i'm using an Asus A8N-E, copied the code from Gentoo-Wiki.com, which at the moment seems to be down. I hope that this helps you...

Cya
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum