Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Alsa, kernel 2.6.7, S/PDIF, Intel D865GLC and intel8x0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Mon Aug 02, 2004 5:27 pm    Post subject: Alsa, kernel 2.6.7, S/PDIF, Intel D865GLC and intel8x0 Reply with quote

I didn't received any answer to a previous question on another thread, so, I will repeat here with all details in hope someone can help me making my sound system working.

Hardware:



Software:
    Gentoo with kernel 2.6.7

    sys-fs/udev 025-r1

    media-libs/alsa-lib 1.0.5

    media-libs/alsa-oss 1.0.5

    media-plugins/alsa-jack 1.0.5

    media-sound/alsa-tools 1.0.5

    media-sound/alsa-utils 1.0.5



Configuration:
    lsmod:
    Code:

    Module                  Size  Used by
    md5                     3712  1
    ipv6                  226528  24
    rtc                    10424  0
    ivtv_fb                23732  1
    bttv                  143308  0
    video_buf              17156  1 bttv
    btcx_risc               3976  1 bttv
    lirc_i2c                8068  1
    lirc_dev               12552  2 lirc_i2c
    tveeprom               10016  0
    ivtv                  790692  3 ivtv_fb
    tuner                  18064  0
    saa7127                12040  0
    saa7115                12164  0
    msp3400                27812  0
    i2c_algo_bit            8584  2 bttv,ivtv
    snd_intel8x0m          16072  0
    snd_intel8x0           29448  0
    snd_mpu401_uart         6144  1 snd_intel8x0
    snd_rawmidi            20260  1 snd_mpu401_uart
    snd_seq_device          6792  1 snd_rawmidi
    snd_ac97_codec         64644  2 snd_intel8x0m,snd_intel8x0
    snd_pcm_oss            48552  0
    snd_pcm                83592  3 snd_intel8x0m,snd_intel8x0,snd_pcm_oss
    snd_page_alloc          9096  3 snd_intel8x0m,snd_intel8x0,snd_pcm
    snd_timer              21252  1 snd_pcm
    snd_mixer_oss          17792  1 snd_pcm_oss
    snd                    46948  10 snd_intel8x0m,snd_intel8x0,snd_mpu401_uart,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
    i810fb                 29440  0
    cfbcopyarea             3584  1 i810fb
    vgastate                9600  1 i810fb
    cfbimgblt               2944  1 i810fb
    cfbfillrect             3584  1 i810fb
    font                   32768  0
    e1000                  77060  0
    ir_common               4228  0
    dm_mod                 37792  11

    /etc/module.d/alsa content
    Code:

    # Alsa 0.9.X kernel modules' configuration file.
    # $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.1 2003/08/05 21:07:55 johnm Exp $

    # ALSA portion
    alias char-major-116 snd
    # OSS/Free portion
    alias char-major-14 soundcore

    ##
    ## IMPORTANT:
    ## You need to customise this section for your specific sound card(s)
    ## and then run `update-modules' command.
    ## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
    ##
    ##  ALSA portion
    alias snd-card-0 snd-intel8x0
    options snd-intel8x0 mpu_port=0x330
    ## alias snd-card-0 snd-interwave
    ## alias snd-card-1 snd-ens1371
    ##  OSS/Free portion
    alias sound-slot-0 snd-card-0
    alias sound-slot-1 snd-card-0
    ##

    # OSS/Free portion - 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
    ##  OSS/Free portion - card #2
    ## alias sound-service-1-0 snd-mixer-oss
    ## alias sound-service-1-3 snd-pcm-oss
    ## alias sound-service-1-12 snd-pcm-oss

    #alias /dev/mixer snd-mixer-oss
    #alias /dev/dsp snd-pcm-oss
    #alias /dev/midi snd-seq-oss

    options snd-pcm-oss dsp_map=2 adsp_map=2
    # Set this to the correct number of cards.
    options snd cards_limit=1

    amixer result
    Code:

    Simple mixer control 'Master',0
      Capabilities: pvolume pswitch
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 31 [100%] [on]
      Front Right: Playback 31 [100%] [on]
    Simple mixer control 'Master Mono',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 31
      Mono: Playback 31 [100%] [on]
    Simple mixer control 'Master Surround',0
      Capabilities: pvolume pswitch
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 31 [100%] [on]
      Front Right: Playback 31 [100%] [on]
    Simple mixer control 'PCM',0
      Capabilities: pvolume pswitch
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 31 [100%] [on]
      Front Right: Playback 31 [100%] [on]
    Simple mixer control 'Surround',0
      Capabilities: pvolume pswitch
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 31 [100%] [on]
      Front Right: Playback 31 [100%] [on]
    Simple mixer control 'Surround Jack as Input',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Center',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 31
      Mono: Playback 31 [100%] [on]
    Simple mixer control 'Center/LFE Jack as Input',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Center/LFE Jack as Mic',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'LFE',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback 0 - 31
      Mono: Playback 31 [100%] [on]
    Simple mixer control 'Line',0
      Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
      Capture exclusive group: 0
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 31 [100%] [on] Capture [off]
      Front Right: Playback 31 [100%] [on] Capture [off]
    Simple mixer control 'CD',0
      Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
      Capture exclusive group: 0
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 31 [100%] [on] Capture [off]
      Front Right: Playback 31 [100%] [on] Capture [off]
    Simple mixer control 'Mic',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
      Capture exclusive group: 0
      Playback channels: Mono
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Mono: Playback 0 [0%] [off]
      Front Left: Capture [off]
      Front Right: Capture [off]
    Simple mixer control 'Mic Boost (+20dB)',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Mic Select',0
      Capabilities:
      Mono:
    Simple mixer control 'Video',0
      Capabilities: cswitch cswitch-joined cswitch-exclusive
      Capture exclusive group: 0
      Capture channels: Front Left - Front Right
      Front Left: Capture [off]
      Front Right: Capture [off]
    Simple mixer control 'Phone',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
      Capture exclusive group: 0
      Playback channels: Mono
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Mono: Playback 31 [100%] [on]
      Front Left: Capture [off]
      Front Right: Capture [off]
    Simple mixer control 'IEC958',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'IEC958 Playback AC97-SPSA',0
      Capabilities: volume volume-joined
      Playback channels: Mono
      Limits: 0 - 3
      Mono: 3 [100%]
    Simple mixer control 'IEC958 Playback Source',0
      Capabilities:
      Mono:
    Simple mixer control 'PC Speaker',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono


      Limits: Playback 0 - 15
      Mono: Playback 15 [100%] [on]
    Simple mixer control 'Aux',0
      Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
      Capture exclusive group: 0
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 14 [45%] [off] Capture [on]
      Front Right: Playback 14 [45%] [off] Capture [on]
    Simple mixer control 'Mono Output Select',0
      Capabilities:
      Mono:
    Simple mixer control 'Capture',0
      Capabilities: cvolume cswitch
      Capture channels: Front Left - Front Right
      Limits: Capture 0 - 15
      Front Left: Capture 15 [100%] [on]
      Front Right: Capture 0 [0%] [on]
    Simple mixer control 'Mix',0
      Capabilities: cswitch cswitch-joined cswitch-exclusive
      Capture exclusive group: 0
      Capture channels: Front Left - Front Right
      Front Left: Capture [off]
      Front Right: Capture [off]
    Simple mixer control 'Mix Mono',0
      Capabilities: cswitch cswitch-joined cswitch-exclusive
      Capture exclusive group: 0
      Capture channels: Front Left - Front Right
      Front Left: Capture [off]
      Front Right: Capture [off]
    Simple mixer control 'Downmix',0
      Capabilities:
      Mono:
    Simple mixer control 'Exchange Center/LFE',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Exchange Front/Surround',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'External Amplifier',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Spread Front to Surround and Center/LFE',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Stereo Mic',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]

    aplay -l result
    Code:

    **** List of PLAYBACK Hardware Devices ****
    card 0: ICH5 [Intel ICH5], device 0: Intel ICH [Intel ICH5]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: ICH5 [Intel ICH5], device 4: Intel ICH - IEC958 [Intel ICH5 - IEC958]
      Subdevices: 1/1
      Subdevice #0: subdevice #0

    ~/.asoundrc content
    Code:

    # Override the default output used by ALSA.
    # If you do not override the default, your default
    # device is identical to the (unmixed) analog device
    # shown below.  If you prefer mixed and/or digital
    # output, uncomment the appropriate four lines below
    # (only one slave.pcm line).
    #pcm.!default {
    #  type plug
    ## Uncomment the following to use mixed analog by default
    #  slave.pcm "dmix-analog"
    ## Uncomment the following to use unmixed digital by default
    #  slave.pcm "digital-hw"
    ## Uncomment the following to use mixed digital by default
    #  slave.pcm "dmix-digital"
    #}

    # Alias for analog output on the nForce2 (hw:0,0)
    # - This is identical to the device named "default"--which
    # always exists and refers to hw:0,0 (unless overridden)
    # - Therefore, we can specify "hw:0,0", "default", or "analog"
    # to access analog output on the nForce2
    pcm.analog {
      type plug
      slave.pcm "analog-hw"
    }

    # Control device (mixer, etc.) for the nForce2 card
    ctl.analog {
      type hw
     card 0
    }

    # Alias for (rate-converted) mixed analog output on the
    # nForce2 (hw:0,0)
    #  - This will accept audio input--regardless of rate--and
    # convert to the rate required for the dmix plugin
    # (in this case 48000Hz)
    pcm.mixed-analog {
      type plug
      slave.pcm "dmix-analog"
    }

    # Control device (mixer, etc.) for the nForce2 card
    ctl.mixed-analog {
      type hw
      card 0
    }

    # Alias for (rate-converted) digital (S/PDIF) output on the
    # nForce2 (hw:0,2)
    #  - This will accept audio input--regardless of rate--and
    # convert to the rate required for the S/PDIF hardware
    # (in this case 48000Hz)
    pcm.digital {
      type plug
      slave.pcm "digital-hw"
    }

    # Control device (mixer, etc.) for the nForce2 card
    ctl.digital {
      type hw
      card 0
    }

    # Alias for mixed (rate-converted) digital (S/PDIF) output on the
    # nForce2 (hw:0,2)
    #  - This will accept audio input--regardless of rate--and
    # convert to the rate required for the S/PDIF hardware
    # (in this case 48000Hz)
    pcm.mixed-digital {
      type plug
      slave.pcm "dmix-digital"
    }

    # Control device (mixer, etc.) for the nForce2 card
    ctl.mixed-digital {
      type hw
      card 0
    }

    # The following devices are not useful by themselves.  They
    # require specific rates, channels, and formats.  Therefore,
    # you probably do not want to use them directly.  Instead use
    # of of the devices defined above.

    # Alias for analog output on the nForce2 (hw:0,0)
    # Do not use this directly--it requires specific rate,
    # channels, and format
    pcm.analog-hw {
      type hw
      card 0
     # The default value for device is 0, so no need to specify
    }

    # Control device (mixer, etc.) for the nForce2 card
    ctl.analog-hw {
      type hw
      card 0
    }

    # Alias for digital (S/PDIF) output on the nForce2 (hw:0,2)
    # Do not use this directly--it requires specific rate,
    # channels, and format
    pcm.digital-hw {
      type hw
      card 0
      device 4
    }

    # Control device (mixer, etc.) for the nForce2 card
    ctl.digital-hw {
      type hw
      card 0
    }

    # Direct software mixing plugin for analog output on
    # the nForce2 (hw:0,0)
    # Do not use this directly--it requires specific rate,
    # channels, and format
    pcm.dmix-analog {
      type dmix
      ipc_key 1234
      slave {
        pcm "analog-hw"
        period_time 0
        period_size 1024
        buffer_size 4096
        rate 48000
      }
    }

    # Control device (mixer, etc.) for the nForce2 card
    ctl.dmix-analog {
      type hw
      card 0
    }
    # Direct software mixing plugin for digital (S/PDIF) output
    # on the nForce2 (hw:0,2)
    # Do not use this directly--it requires specific rate,
    # channels, and format
    pcm.dmix-digital {
      type dmix
      ipc_key 1235
      slave {
        pcm "digital-hw"
        period_time 0
        period_size 1024
        buffer_size 4096
        rate 48000
      }
    }

    # Control device (mixer, etc.) for the nForce2 card
    ctl.dmix-digital {
      type hw
      card 0
    }


The problem
I am able to play sound using the front panel jack for headphones, but I was not able to get decent sound from the backplane jacks using the Logitech Z-5300 5.1 capabilities and the motherboard 5.1 capabilities.

Since there is a lot of confusing informations on the web, some apply to 2.4 kernels, other to 0.9 alsa versions, etc. And other are taking for granted I am an audio-engineer (what I am not, of course!), I am just overwhelm by this problem.

I tried different configurations, switching alsamixer controls on/off, using the analog, mixed-analog, digital, mixed-digital and spdif device while trying to play some sound with mplayer.

So, anybody can help me understand what is going on? (Yes, I read the Gentoo Alsa Handbook, it didn't help much after I had the headphone front-panel jack working).
_________________
Achille Talon Hop!
Back to top
View user's profile Send private message
remne
n00b
n00b


Joined: 30 Aug 2002
Posts: 23

PostPosted: Wed Aug 04, 2004 5:53 pm    Post subject: Reply with quote

I have the same problem. Cannot get the SPDIF to work. XMMS, aplay etc kind of "freezes" when I point them to play to spdif playback (hw:0,4 @ my computer).. sucks....

Anyone got spdif to work with Intel ich5??!

Maybe intel8x0 alsa driver hasnt got 100% support for ich5 chipset?
_________________
jag har en datamaskin.
Back to top
View user's profile Send private message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Mon Aug 30, 2004 4:00 pm    Post subject: Reply with quote

I succeeded in having some output from the back-plane jacks. I don't know if the software upgrades have something to do with it, however, here is my configuration:

HW: Same as above, look at my first post.

SW: Kernel 2.6.8.1
alsa-lib 1.0.5-r3
alsa-tools 1.0.5-r1
alsa-jack 1.0.5
alsa-oss 1.0.5
alsa-headers 1.0.5a
alsa-utils 1.0.5

With alsamixer, unmute "Exchange Front/Surround" and IEC958.

I am getting sound (not sure channels are properly played on the right output speakers) except with the front speakers which still produce a lot of statics.

I am testing with the following command:

aplay -Dspdif something.wav

You can also use -Diec958 or any other device properly defined in your .asoundrc.
_________________
Achille Talon Hop!
Back to top
View user's profile Send private message
rmoerlan
n00b
n00b


Joined: 18 Aug 2005
Posts: 5

PostPosted: Sat Aug 20, 2005 3:22 am    Post subject: Reply with quote

Okay, so this thread hasn't been touched in a year and using parts of it was able to get S/PDIF working from the ICH5.

Most everything I've been trying to do has centered around Amarok, though some of this will probably translate over to xine or xmms. I've only tested it so far using GStreamer/alsasink and xine.

One lesson learned: if you pipe the output of a wav straight to iec958 using the Xine engine the sample rate is too high. The key to sampling it down is nicely provided in Achille Talon's asoundrc file through the dmix-digital device.

My mixer settings are pretty much what has been shown here. You should be able to mute 'Master', 'Master Mono' and 'PCM' as they don't seem to come into play with directly piping data out. In fact all I have turned on is 'iec958' and have 'iec958 Playback' turned up to 100%.

One other thing I found usefull came from http://www.flaterco.com/kb/audio.html where you can merge in sox and then add this line to /etc/profile

Code:
function play {
  { sox $1 -r 48000 -t wav -c 2 - polyphase || sox $1 -t wav -c 2 -; } | aplay -Dhw:0,4
}


and by typing something like
Code:
play /usr/kde/3.4/share/sounds/KDE_Startup.wav


you should get some sort of output.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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