Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
snd_intel_hda and alsa problem.
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
Shopro
l33t
l33t


Joined: 12 May 2004
Posts: 678
Location: Dayton, OH, USA

PostPosted: Sat Nov 04, 2006 5:58 pm    Post subject: snd_intel_hda and alsa problem. Reply with quote

I can play one sound at a time. In amarok the sound is really good, but for example in skype its really choppy and really poor quality.

Edit: Tried using the latest alsa-drivers but the result is the same as the in kernel ones.

.config
Code:
# Sound
#
CONFIG_SOUND=y

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
# CONFIG_SND_PCM_OSS_PLUGINS is not set
CONFIG_SND_SEQUENCER_OSS=y


/etc/modules.d/alsa
Code:
# Alsa kernel modules' configuration file.

# ALSA portion
# OSS/Free portion

##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `modules-update' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
##  ALSA portion
## 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-1
##

# OSS/Free portion - card #1
##  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

# Set this to the correct number of cards.

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.13 ---
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd-hda-intel position_fix=2
# --- END: Generated by ALSACONF, do not edit. ---


If the sound is in use. I get this.
mpg123 some.mp3
Code:
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59s-r11 (2000/Oct/27). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Can't open /dev/dsp!


Also aplay some.wav gives out this error if something is playing.
Code:
ALSA lib pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave
aplay: main:550: audio open error: Device or resource busy


lspci -vv
Code:
00:1b.0 Class 0403: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
        Subsystem: Dell Unknown device 01bd
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 0, Cache Line Size 10
        Interrupt: pin A routed to IRQ 20
        Region 0: Memory at efffc000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [60] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express Unknown type IRQ 0
                Device: Supported: MaxPayload 128 bytes, PhantFunc 0, ExtTag-
                Device: Latency L0s <64ns, L1 <1us
                Device: Errors: Correctable- Non-Fatal- Fatal- Unsupported-
                Device: RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
                Device: MaxPayload 128 bytes, MaxReadReq 128 bytes
                Link: Supported Speed unknown, Width x0, ASPM unknown, Port 0
                Link: Latency L0s <64ns, L1 <1us
                Link: ASPM Disabled CommClk- ExtSynch-
                Link: Speed unknown, Width x0
        Capabilities: [100] Virtual Channel
        Capabilities: [130] Unknown (5)

_________________
Just because I have nothing to say is no reason why you shouldn't listen.


Last edited by Shopro on Mon Nov 06, 2006 11:37 am; edited 1 time in total
Back to top
View user's profile Send private message
Shopro
l33t
l33t


Joined: 12 May 2004
Posts: 678
Location: Dayton, OH, USA

PostPosted: Mon Nov 06, 2006 11:00 am    Post subject: Reply with quote

bumb... :(
_________________
Just because I have nothing to say is no reason why you shouldn't listen.
Back to top
View user's profile Send private message
irondog
l33t
l33t


Joined: 07 Jul 2003
Posts: 715
Location: Voor mijn TV. Achter mijn pc.

PostPosted: Mon Nov 06, 2006 1:18 pm    Post subject: Reply with quote

You should use Dmix and Dmix only as your sound driver / hardware doesn't support hardware mixing.

Dmix is a software mixer that works in userspace (it's in alsa lib). The dmix device is the default output device if your kernel and alsa lib are recent enough. If you want proper software mixing, make sure you only use ALSA based apps. Your apps will use DMIX without further configuration needed. So, if you make sure you only use ALSA apps, you will have no troubles.

All recent apps have ALSA support, even Adobe Flash and Skype. So, get rid of OSS soon. To avoid any app to fall-back on OSS, you might even want to disable it in the kernel configuration.

Summary:
  • Never use OSS (open sound system) on an ALSA Desktop if your soundcard has no hardware mixing support.
  • Never use a hw:x,y device directly
  • Have you got an ~/.asoundrc? Delete it.

_________________
Alle dingen moeten onzin zijn.
Back to top
View user's profile Send private message
Shopro
l33t
l33t


Joined: 12 May 2004
Posts: 678
Location: Dayton, OH, USA

PostPosted: Mon Nov 06, 2006 1:23 pm    Post subject: Reply with quote

I've tried it with and without .asoundrc, no go there. As alsa should enable dmix automatically for sound cards that doesn't support hw mixing in the drivers I don't know why I get so bad sound.

I'll try to disable oss completely once I get home again, but doubt it'll work. As I've already set all applications that support alsa to use it. Only one sound at a time and few of them are really poor in quality, sox for example.
_________________
Just because I have nothing to say is no reason why you shouldn't listen.
Back to top
View user's profile Send private message
irondog
l33t
l33t


Joined: 07 Jul 2003
Posts: 715
Location: Voor mijn TV. Achter mijn pc.

PostPosted: Mon Nov 06, 2006 1:36 pm    Post subject: Reply with quote

It looks like mpg123 is an OSS app? Get rid of it, really!

Test with multiple instances of /usr/bin/aplay. And make sure all other apps keep their hands off the "hw" devices or /dev/dsp. Configuring your system for this behavior isn't actually any problem.

If you want problem-less sound, use a Soundblaster live 1024 or better or buy MS Windows. Dmixing works here without many problems, but some things (like dmixing different sample rates) is just impossible.
_________________
Alle dingen moeten onzin zijn.
Back to top
View user's profile Send private message
Shopro
l33t
l33t


Joined: 12 May 2004
Posts: 678
Location: Dayton, OH, USA

PostPosted: Mon Nov 06, 2006 1:44 pm    Post subject: Reply with quote

Don't really see the point in suggesting to move to windows.

And changing the sound card just ain't gonna work, since it's a laptop.
On my other laptop mpg123 works just fine when running multiple instances.

For example I've configured Skype to use alsa instead of oss and the sound is really bad. On the other hand amarok using xine works perfectly.
_________________
Just because I have nothing to say is no reason why you shouldn't listen.
Back to top
View user's profile Send private message
irondog
l33t
l33t


Joined: 07 Jul 2003
Posts: 715
Location: Voor mijn TV. Achter mijn pc.

PostPosted: Mon Nov 06, 2006 10:08 pm    Post subject: Reply with quote

Shopro wrote:
Don't really see the point in suggesting to move to windows.
I'm not suggesting you to move to Windows. You just shouldn't expect any hardware to work like it does in Windows. Because 1) Windows has a better sound system and 2) hardware designers write Windows drivers. They make their stuff work in Windows and forget to write linux drivers. What happens more than often is, that soundcards which CAN do harware mixing, are not capable to do so in Linux (because of missing information about the hardware internals to ALSA devs).

Quote:
And changing the sound card just ain't gonna work, since it's a laptop.
On my other laptop mpg123 works just fine when running multiple instances.
For me it doesn't work either. This program is using OSS, so it's a piece of junk, which I will uninstall after making this post.

Quote:
For example I've configured Skype to use alsa instead of oss and the sound is really bad. On the other hand amarok using xine works perfectly.
You gotta live with a broken Skype (keep using ALSA) or with a non-mixing audio setup (using OSS). It's a matter of bugging the creators of Skype I guess.
_________________
Alle dingen moeten onzin zijn.
Back to top
View user's profile Send private message
Shopro
l33t
l33t


Joined: 12 May 2004
Posts: 678
Location: Dayton, OH, USA

PostPosted: Mon Nov 06, 2006 10:40 pm    Post subject: Reply with quote

irondog wrote:
I'm not suggesting you to move to Windows. You just shouldn't expect any hardware to work like it does in Windows. Because 1) Windows has a better sound system and 2) hardware designers write Windows drivers. They make their stuff work in Windows and forget to write linux drivers. What happens more than often is, that soundcards which CAN do harware mixing, are not capable to do so in Linux (because of missing information about the hardware internals to ALSA devs).


Yes I'm fully aware of this. But it shouldn't be the reason for not to ask help. There's no way for me or anyone else in that matter to keep an close eye on all of the new things happening around linux, i.e which sound cards are fully supported and which aren't. That's why these forums are so great, help goes both ways. In example someone has gotten Intel HDA to work and happens to stumble on my problem could shred some light on it. Or if I happen to stumble on a post that I happen to know the fix for.

Anyhow, I got some progress so far, now I can at least play to sounds at the same time. But again skype for example isn't working that well, the sound just is really crappy. And in my opinion this isn't a bug in skype itself, because it happens on other apps also.
_________________
Just because I have nothing to say is no reason why you shouldn't listen.
Back to top
View user's profile Send private message
irondog
l33t
l33t


Joined: 07 Jul 2003
Posts: 715
Location: Voor mijn TV. Achter mijn pc.

PostPosted: Mon Nov 06, 2006 11:22 pm    Post subject: Reply with quote

The latest Skype has some serious problems on my computer as well (HDA Intel / ALSA). I'm using an older, ALSA enabled beta (1.3.0.50) at the moment without any problems.

You can get the older beta version 1.3.0.50 here:
http://www.skype.com/go/getskype-linux-beta-dynamic
And here:
http://www.skype.com/go/getskype-linux-beta-static

The Gentoo version net-im/skype-1.3.0.53-r1 in portage is crappy for me also. However, I have recording issues instead of crappy playback, so I don't know if this will be your fix :)

Quote:
Anyhow, I got some progress so far, now I can at least play to sounds at the same time.
That's nice :)
_________________
Alle dingen moeten onzin zijn.
Back to top
View user's profile Send private message
Shopro
l33t
l33t


Joined: 12 May 2004
Posts: 678
Location: Dayton, OH, USA

PostPosted: Tue Nov 07, 2006 10:53 am    Post subject: Reply with quote

Thanks for the heads up. I tried 1.3.0.50 version of skype last night and unfortunately it gave the same result. But the odd part is that if I set skype using oss I can hear it clearly and even record. When setting it to Alsa I do hear but its really choppy and I can't record anything.
_________________
Just because I have nothing to say is no reason why you shouldn't listen.
Back to top
View user's profile Send private message
aitch
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2005
Posts: 88
Location: New Zealand

PostPosted: Tue Nov 07, 2006 11:31 am    Post subject: Reply with quote

I'm not sure if I'm having exactly the same problem, but when I try to view flash videos in Firefox while playing music in Amarok it won't play sound from them.
if I pause Amarok to play the flash video sound works, but if I then unpause Amarok while the video is playing the sound output becomes really broken, all stuttery and choppy. hard to describe. not sure when it started happening, but it's kinda frustrating.
I'm using alsa-driver with my intel8x0-compatible CK804 nForce 4 chipset, and have removed my asound.rc at the advice of a forum member.
I'm not sure when it started happening, but previously Firefox and Amarok had been co-operating fine using instructions from the dmix wiki page.
any ideas?
Back to top
View user's profile Send private message
Shopro
l33t
l33t


Joined: 12 May 2004
Posts: 678
Location: Dayton, OH, USA

PostPosted: Tue Nov 07, 2006 9:13 pm    Post subject: Reply with quote

Maybe I just need to wait until the intel-hda driver evolves and matures more. The odd thing is that I've seen people successfully using it.
_________________
Just because I have nothing to say is no reason why you shouldn't listen.
Back to top
View user's profile Send private message
rada
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 202
Location: Ottawa, Canada

PostPosted: Sat Nov 11, 2006 9:45 pm    Post subject: Reply with quote

aitch wrote:
I'm not sure if I'm having exactly the same problem, but when I try to view flash videos in Firefox while playing music in Amarok it won't play sound from them.
if I pause Amarok to play the flash video sound works, but if I then unpause Amarok while the video is playing the sound output becomes really broken, all stuttery and choppy. hard to describe. not sure when it started happening, but it's kinda frustrating.
I'm using alsa-driver with my intel8x0-compatible CK804 nForce 4 chipset, and have removed my asound.rc at the advice of a forum member.
I'm not sure when it started happening, but previously Firefox and Amarok had been co-operating fine using instructions from the dmix wiki page.
any ideas?


There is a solution to this: What you need to do is
Code:
emerge alsa-oss
and in the /usr/bin/firefox script change the line that says
Code:
exec /usr/libexec/mozilla-launcher "$@"
to
Code:
exec aoss /usr/libexec/mozilla-launcher "$@"
Back to top
View user's profile Send private message
rada
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 202
Location: Ottawa, Canada

PostPosted: Sat Nov 11, 2006 9:46 pm    Post subject: Reply with quote

Shopro wrote:
Maybe I just need to wait until the intel-hda driver evolves and matures more. The odd thing is that I've seen people successfully using it.


Have you tried removing position_fix=2? I believe this bug was fixed long ago.
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