Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.hardware > #2727 > unrolled thread

Troubleshooting soundcard distortion

Started byHaines Brown <haines@engels.histomat.net>
First post2015-02-13 13:49 -0500
Last post2015-02-20 22:21 +0100
Articles 7 — 2 participants

Back to article view | Back to comp.os.linux.hardware


Contents

  Troubleshooting soundcard distortion Haines Brown <haines@engels.histomat.net> - 2015-02-13 13:49 -0500
    Re: Troubleshooting soundcard distortion Clemens Ladisch <clemens@ladisch.de> - 2015-02-16 21:40 +0100
      Re: Troubleshooting soundcard distortion Haines Brown <haines@engels.histomat.net> - 2015-02-16 17:19 -0500
        Re: Troubleshooting soundcard distortion Haines Brown <haines@engels.histomat.net> - 2015-02-17 07:10 -0500
        Re: Troubleshooting soundcard distortion Clemens Ladisch <clemens@ladisch.de> - 2015-02-17 19:56 +0100
          Re: Troubleshooting soundcard distortion Haines Brown <haines@engels.histomat.net> - 2015-02-17 17:13 -0500
            Re: Troubleshooting soundcard distortion Clemens Ladisch <clemens@ladisch.de> - 2015-02-20 22:21 +0100

#2727 — Troubleshooting soundcard distortion

FromHaines Brown <haines@engels.histomat.net>
Date2015-02-13 13:49 -0500
SubjectTroubleshooting soundcard distortion
Message-ID<87sie9fxzt.fsf@engels.histomat.net>
I took a day off from work to get an old Audigy SE sound card to work,
and ultimately concluded the card was broken. So yesterday I replaced it
with an Asus Xonar DS PCI Express 7.1. It played beautifully on my
Debian Wheezy out of the box. So I removed the lines in
/etc/modprobe.d/alsa/alsa-base.config that I tried to correct the old
card's priority problem. Today sound is hopeless distorted.

When I play a CD disk with mplayer, the sound stutters. More accurately
the sound is amplitude modulated by a sinewave at about 8Hz/sec. When I
play a .wav file with aply, the sound is a screech. I installed
pulseaudio and it produced no sound at all and so removed it.

I'm uncertain about what driver is loaded. $ dmesg tells me nothing. I
grepped its return for snd_virtuoso, Virtuoso, Ausus and snd. Because
snd_intel.hda surely most have loaded, I can't figure this out. So I
turn to # /var/log/boot | grep virtuosos, Asus, Xonar and see nothing.
A grep snd returns:

  Thu Feb 12 14:23:18 2015: Loading kernel module snd-ctxfi.          

And yet lsmod suggests the module is loaded:

  # lsmod
  ...
  snd_ctxfi              62598  0 
  ...
  snd_hda_codec_hdmi     26352  1 
  snd_virtuoso           33765  2 
  snd_oxygen_lib         27905  1 snd_virtuoso
  snd_mpu401_uart        13299  1 snd_oxygen_lib
  snd_usb_audio          71436  0 
  snd_usbmidi_lib        18801  1 snd_usb_audio
  snd_seq_midi           12744  0 
  snd_seq_midi_event     13124  1 snd_seq_midi
  snd_rawmidi            22472  3 \
    snd_seq_midi,snd_usbmidi_lib,snd_mpu401_uart 
  ...
  snd_hda_intel          21786  1 
  snd_hda_codec          63477  2 snd_hda_intel,snd_hda_codec_hdmi  
  ...
  snd_hwdep              12943  2 snd_hda_codec,snd_usb_audio
  snd_pcm                53461  7 \
  snd_hda_codec,snd_hda_intel,snd_usb_audio,\ 
    snd_oxygen_lib,snd_hda_codec_hdmi,snd_ctxfi
  ...
  snd_page_alloc         12867  3 snd_pcm,snd_hda_intel,snd_ctxfi
  ...
  snd_seq                39512  2 snd_seq_midi_event,snd_seq_midi
  snd_seq_device         13016  3 snd_seq,snd_rawmidi,snd_seq_midi
  snd_timer
  ...
  snd                    42761  19
    snd_timer,snd_seq_device,snd_seq,snd_pcm,snd_hwdep,snd_hda_codec,\
    snd_hda_intel,snd_rawmidi,snd_usbmidi_lib,snd_usb_audio, \
    snd_mpu401_uart,snd_oxygen_lib,snd_virtuoso,snd_hda_codec_hdmi,\
    snd_ctxfi 

If snd_virtuoso is my driver, then it seems to be loaded. I don't know
that oxygen and ctxfi refer to, unless a failed attempt to install a
Creative X-Fi Titaniam left it behind. Oxygen seems an M-Audio driver.

Other information:

    $ uname -a
    Linux engels 3.2.0-4-686-pae #1 SMP Debian 3.2.65-1 i686 GNU/Linux

    # lspci -v
    06:04.0 Multimedia audio controller: C-Media Electronics Inc CMI8788 \
            [Oxygen HD Audio]
    Subsystem: ASUSTeK Computer Inc. Virtuoso 100 (Xonar DX)
    Flags: bus master, medium devsel, latency 32, IRQ 19
    I/O ports at d000 [size=256]
    Capabilities: <access denied>
    Kernel driver in use: snd_virtuoso



    

[toc] | [next] | [standalone]


#2728

FromClemens Ladisch <clemens@ladisch.de>
Date2015-02-16 21:40 +0100
Message-ID<ckf2umFe0r8U1@mid.individual.net>
In reply to#2727
Haines Brown wrote:
> ... an Asus Xonar DS PCI Express 7.1. It played beautifully on my
> Debian Wheezy out of the box. So I removed the lines in
> /etc/modprobe.d/alsa/alsa-base.config that I tried to correct the old
> card's priority problem. Today sound is hopeless distorted.

I don't guess you can fix it by re-adding those lines?

> When I play a CD disk with mplayer, the sound stutters. More accurately
> the sound is amplitude modulated by a sinewave at about 8Hz/sec.

This sounds as if some other program might play with the mixer.
If you have alsamixer open, does anything happen with the sliders?

Also check the power connection.

> I'm uncertain about what driver is loaded. $ dmesg tells me nothing.

Only errors get logged; successful execution is silent.

>   snd_virtuoso           33765  2
>   snd_oxygen_lib         27905  1 snd_virtuoso
>
> If snd_virtuoso is my driver, then it seems to be loaded. I don't know
> that oxygen and ctxfi refer to, unless a failed attempt to install a
> Creative X-Fi Titaniam left it behind. Oxygen seems an M-Audio driver.

The chip named "CMI8788" on your sound card is called "OxygenHD", but
Asus decided to call its name "AV100".


Regards,
Clemens

[toc] | [prev] | [next] | [standalone]


#2729

FromHaines Brown <haines@engels.histomat.net>
Date2015-02-16 17:19 -0500
Message-ID<87h9ulv6sp.fsf@engels.histomat.net>
In reply to#2728
Clemens Ladisch <clemens@ladisch.de> writes:

> Haines Brown wrote:
>> ... an Asus Xonar DS PCI Express 7.1. It played beautifully on my
>> Debian Wheezy out of the box. So I removed the lines in
>> /etc/modprobe.d/alsa/alsa-base.config that I tried to correct the old
>> card's priority problem. Today sound is hopeless distorted.
>
> I don't guess you can fix it by re-adding those lines?

Unfortunately I didn't make a backup of the config file because I just
added an isolated line. In any case, I purged and reinstalled alsa-utils
and should be back to the default. 

>> When I play a CD disk with mplayer, the sound stutters. More accurately
>> the sound is amplitude modulated by a sinewave at about 8Hz/sec.
>
> This sounds as if some other program might play with the mixer.
> If you have alsamixer open, does anything happen with the sliders?

Since I rebooted, my audio card is no longer default, and so alsamixer
has no effect. 

> Also check the power connection.

Before rebooting just now, I mplayer had no problem playing an .flv file
and producing sound. Since rebooting, my card is no longer the default
device, and mplayer produces no sound as the result. Power connections
thus worked a few minutes ago.  

I now realize that a lot of garbage from dmesg is related to this sound
problem.

  ...
  input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:0$
  input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:0$
  Adding 31249404k swap on /dev/sda10.  Priority:-1 extents:1 across:31249404k
  EXT4-fs (sda1): re-mounted. Opts: (null)
  sr 4:0:0:0: [sr0]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
  sr 4:0:0:0: [sr0]  Sense Key : Illegal Request [current]
  ILI
  sr 4:0:0:0: [sr0]  Add. Sense: Illegal mode for this track
  sr 4:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
  end_request: I/O error, dev sr0, sector 0
  Buffer I/O error on device sr0, logical block 0

The set of lines beginning with sr 4:0:0:0 repeats at least a hundred
times. I find this used to show up as a udev bug that affected sound.

I ran # udevadm test /class/block/sr0 but don't see anything obviously
wrong in the return.

What is the proper method to set my sound card to be default rather than
HDA Intel? If I were to make it default I probably can recover sound
with mplayer, which would be instructive. 
 

[toc] | [prev] | [next] | [standalone]


#2730

FromHaines Brown <haines@engels.histomat.net>
Date2015-02-17 07:10 -0500
Message-ID<87r3ton3gz.fsf@engels.histomat.net>
In reply to#2729
Now when I reboot, ALSA doesn't even see my video card even though it
seems to be on the PCI bus. I can't use dmesg because it is filled with
the garbage (udev bug?) described in my last post.

At least it seems the Asus card is seen by the PCI bus:

    # lspci -vvv | grep Xonar
    Subsystem: ASUSTeK Computer Inc. Virtuoso 100 (Xonar DX)

The driver used to be reported by #lshw:

    # lshw | more
             *-multimedia
                   description: Multimedia audio controller
                   product: CMI8788 [Oxygen HD Audio]
                   ...
                   capabilities: pm bus_master cap_list  
                   configuration: driver=snd_virtuoso latency=32 
			maxlatency=24 mingnt=2
                   resources: irq:19 ioport:d000(size=256)  

   but no more, even though all I've done is to have added the line

     options snd_virtuoso index=0

   at top of /etc/modprobe.d/alsa-base.conf. The # lsmod command now
   returns:

                   ...
                   capabilities: pm bus_master cap_list
                   configuration: latency=32 maxlatency=24 mingnt=2

     the virtuoso driver missing and so no resources are found.

even though the alsa virtuoso driver is loaded:

    $ lsmod | grep virtuoso
    snd_virtuoso           33765  0 
    snd_oxygen_lib         27905  1 snd_virtuoso
    snd                    42761  17 snd_timer,snd_seq_device,snd_seq, \
                                  snd_pcm,snd_rawmidi,snd_hwdep, \
                                  snd_mpu401_uart,snd_usbmidi_lib, \
                                  snd_usb_audio,snd_hda_codec, \
                                  snd_hda_intel,snd_oxygen_lib, \
                                  snd_virtuoso, \
                                  snd_hda_codec_hdmi,snd_ctxfi

Before rebooting, I had
 
        # cat /var/log/boot | grep card
        Thu Feb 12 14:23:35 2015: [....] Setting up ALSA...warning: \
  	  'alsactl restore' failed with error message 'No state is \
	  present for card DX 
        Thu Feb 12 14:23:36 2015: No state is present for card \
	  DX'...^[[?25l^[[?1c^[7^[[1G[^[[32m ok ^[[39;49m^[8^[[?25h^[[?0cdone.

	But subsequently nothing is returned for "card" but I do have:

	# cat /var/log/boot | grep ALSA
	Tue Feb 17 05:46:13 2015: [....] Setting up
	ALSA...^[[?25l^[[?1c^[7^[[1G[^[ \
		[32m ok ^[[39;49m^[8^[[?25h^[[?0cdone.

[toc] | [prev] | [next] | [standalone]


#2731

FromClemens Ladisch <clemens@ladisch.de>
Date2015-02-17 19:56 +0100
Message-ID<ckhh7vF2p1bU1@mid.individual.net>
In reply to#2729
Haines Brown wrote:
> I now realize that a lot of garbage from dmesg is related to this sound
> problem.
>
>   sr 4:0:0:0: [sr0]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
>   sr 4:0:0:0: [sr0]  Sense Key : Illegal Request [current] ILI
>   sr 4:0:0:0: [sr0]  Add. Sense: Illegal mode for this track
>   sr 4:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
>   end_request: I/O error, dev sr0, sector 0
>   Buffer I/O error on device sr0, logical block 0

Your CD/DVD drive is telling you that somebody tried to read data from
a track that does not contain the right kind of data.

> What is the proper method to set my sound card to be default rather than
> HDA Intel?

Do not set the index option of the driver, unless you set all the index
values for all possible drivers.

Use something like this:

    options snd slots=snd-virtuoso,snd-hda-intel,snd-hda-intel


Regards,
Clemens

[toc] | [prev] | [next] | [standalone]


#2732

FromHaines Brown <haines@engels.histomat.net>
Date2015-02-17 17:13 -0500
Message-ID<87egpochjy.fsf@engels.histomat.net>
In reply to#2731
Clemens Ladisch <clemens@ladisch.de> writes:

Clemens, your help very much appreciated. I've got my music back!

> Haines Brown wrote:
>> I now realize that a lot of garbage from dmesg is related to this sound
>> problem.
>>
>>   sr 4:0:0:0: [sr0]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
>>   sr 4:0:0:0: [sr0]  Sense Key : Illegal Request [current] ILI
>>   sr 4:0:0:0: [sr0]  Add. Sense: Illegal mode for this track
>>   sr 4:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
>>   end_request: I/O error, dev sr0, sector 0
>>   Buffer I/O error on device sr0, logical block 0
>
> Your CD/DVD drive is telling you that somebody tried to read data from
> a track that does not contain the right kind of data.

It seems I had been listening to this commercial disk before the
problems came up, but in any case I booted without any disk, then
inserted a different disk. No error messags in dmesg and the drive
plays. Admittedly the prevous disk was produced by Channel Classics,
which is not a cd manufacturer familiar to me.

>> What is the proper method to set my sound card to be default rather than
>> HDA Intel?
>
> Do not set the index option of the driver, unless you set all the index
> values for all possible drivers.
>
> Use something like this:
>
>     options snd slots=snd-virtuoso,snd-hda-intel,snd-hda-intel

This works! I was unable to acquire this knowledge on my own, so your
help much appreciated. I infer the only drivers I worry about here are
the ALSA "snd" drivers.

A question: could I have placed that line into a ~/.asoundrc file?
I would just try it out if booting were not so painful.

Haines

[toc] | [prev] | [next] | [standalone]


#2740

FromClemens Ladisch <clemens@ladisch.de>
Date2015-02-20 22:21 +0100
Message-ID<ckpmqhF6kkeU1@mid.individual.net>
In reply to#2732
Haines Brown wrote:
> Clemens Ladisch <clemens@ladisch.de> writes:
>>     options snd slots=snd-virtuoso,snd-hda-intel,snd-hda-intel
>
> could I have placed that line into a ~/.asoundrc file?

No; kernel driver and the ALSA library are different components.


Regards,
Clemens

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.hardware


csiph-web