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


Groups > linux.debian.user > #167915 > unrolled thread

Plug and Pray; My Life with Linux Sound

Started by"Martin McCormick" <martin.m@suddenlink.net>
First post2016-05-16 20:20 +0200
Last post2016-05-18 23:00 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  Plug and Pray; My Life with Linux Sound "Martin McCormick" <martin.m@suddenlink.net> - 2016-05-16 20:20 +0200
    Re: Plug and Pray; My Life with Linux Sound Jude DaShiell <jdashiel@panix.com> - 2016-05-17 00:20 +0200
    Re: Plug and Pray; My Life with Linux Sound deloptes <deloptes@gmail.com> - 2016-05-17 07:50 +0200
      Re: Plug and Pray; My Life with Linux Sound "Martin McCormick" <martin.m@suddenlink.net> - 2016-05-18 02:40 +0200
        Re: Plug and Pray; My Life with Linux Sound deloptes <deloptes@gmail.com> - 2016-05-18 22:20 +0200
          Re: Plug and Pray; My Life with Linux Sound "Martin McCormick" <martin.m@suddenlink.net> - 2016-05-18 23:00 +0200

#167915 — Plug and Pray; My Life with Linux Sound

From"Martin McCormick" <martin.m@suddenlink.net>
Date2016-05-16 20:20 +0200
SubjectPlug and Pray; My Life with Linux Sound
Message-ID<rzvhw-1ZO-11@gated-at.bofh.it>
	This is a Dell mother board running squeeze which needs
to record from two sound cards simultaneously and it can do that
but things are not rosey or I wouldn't be bugging the rest of you
for suggestions.

	I discovered that the second sound card which was an
ensoniq, apparently is not fully reachable from alsa. It seems to
be impossible to crank up the input gain enough to get full
digital audio. You can set everything full blast (100%) and feed
the Line input to distortion and the output samples reach maybe
60 or 70% of what they should read plus one can twist
all the virtual knobs that should effect recording level and the
result ranges from making things worse to no effect at all.

	I replaced the card with a SoundBlaster AWE64 gold which
thanks to indirection possibly influenced by the Lunar phase or
the direction I face while I work, starts out okay. The dmesg
output shows:

  01:01: card 'CS4236B'
  01:02: card 'Creative SB AWE64 Gold'
 isapnp: 2 Plug & Play cards detected total

That is the way things should be but not how they turn out.

Do nothing at all and aplay -l shows:

**** List of PLAYBACK Hardware Devices ****
card 0: CS4236B [CS4236B], device 0: WSS [CS4236B]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

	It should have also shown something about card 1, the
AWE64 but it's a no-show.

	I tried to help things along with udev rules for both
cards as in the following 2 lines in
/etc/modprobe.d/alsa-base.conf:

#card 0 mother board sound chip
options snd_CS4236 index=0
#card 1 external SBAWE64 gold which looks like SB16 in Linux
options snd-sb16 index=1

No change so let's try making CS4236 card 1 and the SB is card 0.

options snd_CS4236 index=1
options snd-sb16 index=0

**** List of PLAYBACK Hardware Devices ****
card 0: S16 [Sound Blaster 16], device 0: SB16 DSP [DSP v4.16]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

That's interesting. Now we see the SoundBlaster and the CS4236
went poof! What should I look at next?

	Honestly, when Linux sound works, it is fantastic but
there sure are a lot of these non-obvious issues that one can
bang their head on for ever and not really understand. Is ther a
better udev rule for the AWE64 Gold that will finally make things
just work as expected?

	It's possible that there is a jumper in the wrong place
on the card causing a contention issue since PNP sees it but
nothing else seems to run right.

Thanks for any constructive ideas.

Martin McCormick

[toc] | [next] | [standalone]


#167926

FromJude DaShiell <jdashiel@panix.com>
Date2016-05-17 00:20 +0200
Message-ID<rzz1L-4sV-3@gated-at.bofh.it>
In reply to#167915
alsa is probably a subsystem now of pulseaudio unless all of pulseaudio 
is off of your system and out of your $HOME directory structure.  For 
that reason, you may need to use pulseaudio tools and they may or may 
not help you out.  Another possibility would be jack2 which is what 
serious audophiles use on Linux.

On Mon, 16 May 2016, Martin McCormick wrote:

> Date: Mon, 16 May 2016 13:39:33
> From: Martin McCormick <martin.m@suddenlink.net>
> To: debian-user@lists.debian.org
> Cc: debian-user@lists.debian.org
> Subject: Plug and Pray; My Life with Linux Sound
> Resent-Date: Mon, 16 May 2016 18:18:07 +0000 (UTC)
> Resent-From: debian-user@lists.debian.org
>
> 	This is a Dell mother board running squeeze which needs
> to record from two sound cards simultaneously and it can do that
> but things are not rosey or I wouldn't be bugging the rest of you
> for suggestions.
>
> 	I discovered that the second sound card which was an
> ensoniq, apparently is not fully reachable from alsa. It seems to
> be impossible to crank up the input gain enough to get full
> digital audio. You can set everything full blast (100%) and feed
> the Line input to distortion and the output samples reach maybe
> 60 or 70% of what they should read plus one can twist
> all the virtual knobs that should effect recording level and the
> result ranges from making things worse to no effect at all.
>
> 	I replaced the card with a SoundBlaster AWE64 gold which
> thanks to indirection possibly influenced by the Lunar phase or
> the direction I face while I work, starts out okay. The dmesg
> output shows:
>
>  01:01: card 'CS4236B'
>  01:02: card 'Creative SB AWE64 Gold'
> isapnp: 2 Plug & Play cards detected total
>
> That is the way things should be but not how they turn out.
>
> Do nothing at all and aplay -l shows:
>
> **** List of PLAYBACK Hardware Devices ****
> card 0: CS4236B [CS4236B], device 0: WSS [CS4236B]
>  Subdevices: 1/1
>  Subdevice #0: subdevice #0
>
> 	It should have also shown something about card 1, the
> AWE64 but it's a no-show.
>
> 	I tried to help things along with udev rules for both
> cards as in the following 2 lines in
> /etc/modprobe.d/alsa-base.conf:
>
> #card 0 mother board sound chip
> options snd_CS4236 index=0
> #card 1 external SBAWE64 gold which looks like SB16 in Linux
> options snd-sb16 index=1
>
> No change so let's try making CS4236 card 1 and the SB is card 0.
>
> options snd_CS4236 index=1
> options snd-sb16 index=0
>
> **** List of PLAYBACK Hardware Devices ****
> card 0: S16 [Sound Blaster 16], device 0: SB16 DSP [DSP v4.16]
>  Subdevices: 1/1
>  Subdevice #0: subdevice #0
>
> That's interesting. Now we see the SoundBlaster and the CS4236
> went poof! What should I look at next?
>
> 	Honestly, when Linux sound works, it is fantastic but
> there sure are a lot of these non-obvious issues that one can
> bang their head on for ever and not really understand. Is ther a
> better udev rule for the AWE64 Gold that will finally make things
> just work as expected?
>
> 	It's possible that there is a jumper in the wrong place
> on the card causing a contention issue since PNP sees it but
> nothing else seems to run right.
>
> Thanks for any constructive ideas.
>
> Martin McCormick
>
>

-- 

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


#167935

Fromdeloptes <deloptes@gmail.com>
Date2016-05-17 07:50 +0200
Message-ID<rzG3g-u1-5@gated-at.bofh.it>
In reply to#167915
Martin McCormick wrote:

> It's possible that there is a jumper in the wrong place
> on the card causing a contention issue since PNP sees it but
> nothing else seems to run right.
> 
> Thanks for any constructive ideas.

/etc/modprobe.d/alsa-base.conf

## ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-usb-audio

and then the rest

regards

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


#167986

From"Martin McCormick" <martin.m@suddenlink.net>
Date2016-05-18 02:40 +0200
Message-ID<rzXGO-3dg-17@gated-at.bofh.it>
In reply to#167935
deloptes <deloptes@gmail.com> writes:
> /etc/modprobe.d/alsa-base.conf
> 
> ## ALSA portion
> alias char-major-116 snd
> alias snd-card-0 snd-hda-intel
> alias snd-card-1 snd-usb-audio

	Thank you. While researching what these lines do, I ran
across what is most likely the true nature of this problem although
I am not there yet. I ran across the following on a wiki posting
about setting up alsa-base.conf:

___________________________________________________________________________
Applications written for OSS can be made to work with ALSA by means of
   either userspace emulation (using the aoss program loader) or
   kernelspace emulation (the snd-*-oss drivers). However, you cannot use
   both ALSA and OSS drivers at the same time.
___________________________________________________________________________

	I jumped when I read that as both the sound-crippled
systems have both OSS and alsa. OSS creates /dev/dspx which I do
use for some programs I wrote in C that process audio. The
mplayer program also uses /dev/dsp so when it doesn't work,
that's really a bad deal.

	When both OSS and alsa modules are active, bad things
happen so one should make sure the OSS modules aren't being
loaded at the same time as the alsa snd- modules. On these
systems, they are both present. The way to get rid of the OSS
modules is to add a blacklist directive to
alsa-base-blacklist.conf which reads as follows:

install soundcore /bin/false

I put that in and, voila, all the sound modules went away
including the alsa modules.

$aplay -l
aplay: device_list:252: no soundcards found...

Always expect the worst and you'll never be disappointed.

	It could be that the two aliases I have for the sound
cards are not pointing to the right module names and when they
do, the modules will be pulled in.

	Despite the fact that neither system has yet to see a
single sound card after blocking the OSS modules, I think I am on
the trail to resolving the issue.

Here are the alsa-base.conf contents.

## ALSA portion
alias char-major-116 snd
#the two actual sound cards on this system
alias snd_card-0 snd-cs4236
alias snd-card-1 snd-sbawe
#Also tried snd_cs4236 with no change.
        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
#
#   Then the access to an OSS device file such as /dev/dsp0 triggers to
#   load the necessary module via KMOD.
#
#   For auto-loading the secondary card device like /dev/dsp1, the
#   following aliases are necessary in addition:
        alias sound-service-1-0 snd-mixer-oss
        alias sound-service-1-3 snd-pcm-oss
        alias sound-service-1-12 snd-pcm-oss
#part of original alsa-base.conf
# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }

# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
#using module names that are known to exist
options snd_cs4236 index=0
options snd_sbawe index=1

lsmod shows no sound modules at all.

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


#168041

Fromdeloptes <deloptes@gmail.com>
Date2016-05-18 22:20 +0200
Message-ID<rAg6K-6L0-9@gated-at.bofh.it>
In reply to#167986
Martin McCormick wrote:

> deloptes <deloptes@gmail.com> writes:
>> /etc/modprobe.d/alsa-base.conf
>> 
>> ## ALSA portion
>> alias char-major-116 snd
>> alias snd-card-0 snd-hda-intel
>> alias snd-card-1 snd-usb-audio
> 
> Thank you. While researching what these lines do, I ran
> across what is most likely the true nature of this problem although
> I am not there yet. I ran across the following on a wiki posting
> about setting up alsa-base.conf:
> 
>
___________________________________________________________________________
> Applications written for OSS can be made to work with ALSA by means of
>    either userspace emulation (using the aoss program loader) or
>    kernelspace emulation (the snd-*-oss drivers). However, you cannot use
>    both ALSA and OSS drivers at the same time.
>
___________________________________________________________________________
> 
> I jumped when I read that as both the sound-crippled
> systems have both OSS and alsa. OSS creates /dev/dspx which I do
> use for some programs I wrote in C that process audio. The
> mplayer program also uses /dev/dsp so when it doesn't work,
> that's really a bad deal.
> 
> When both OSS and alsa modules are active, bad things
> happen so one should make sure the OSS modules aren't being
> loaded at the same time as the alsa snd- modules. On these
> systems, they are both present. The way to get rid of the OSS
> modules is to add a blacklist directive to
> alsa-base-blacklist.conf which reads as follows:
> 
> install soundcore /bin/false
> 
> I put that in and, voila, all the sound modules went away
> including the alsa modules.

The thing is that if one program uses oss, it blocks the rest - you should
use an oss wrapper - there is how to on the alsa wiki.

> 
> $aplay -l
> aplay: device_list:252: no soundcards found...
> 
> Always expect the worst and you'll never be disappointed.
> 
> It could be that the two aliases I have for the sound
> cards are not pointing to the right module names and when they
> do, the modules will be pulled in.
> 
> Despite the fact that neither system has yet to see a
> single sound card after blocking the OSS modules, I think I am on
> the trail to resolving the issue.
> 
> Here are the alsa-base.conf contents.
> 
> ## ALSA portion
> alias char-major-116 snd
> #the two actual sound cards on this system
> alias snd_card-0 snd-cs4236

I think dash is ok. You can try in addition some of the following - read the
docs about different options for your driver(s)

options snd-hda-intel index=0 model=ref enable_msi=1 enable=0,1
#options snd-hda-intel index=0 model=hp-dv5 enable_msi=1 position_fix=1
options snd-usb-audio index=1


> alias snd-card-1 snd-sbawe
> #Also tried snd_cs4236 with no change.
>         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
> #
> #   Then the access to an OSS device file such as /dev/dsp0 triggers to
> #   load the necessary module via KMOD.
> #
> #   For auto-loading the secondary card device like /dev/dsp1, the
> #   following aliases are necessary in addition:
>         alias sound-service-1-0 snd-mixer-oss
>         alias sound-service-1-3 snd-pcm-oss
>         alias sound-service-1-12 snd-pcm-oss
> #part of original alsa-base.conf
> # autoloader aliases
> install sound-slot-0 /sbin/modprobe snd-card-0
> install sound-slot-1 /sbin/modprobe snd-card-1
> install sound-slot-2 /sbin/modprobe snd-card-2
> install sound-slot-3 /sbin/modprobe snd-card-3
> install sound-slot-4 /sbin/modprobe snd-card-4
> install sound-slot-5 /sbin/modprobe snd-card-5
> install sound-slot-6 /sbin/modprobe snd-card-6
> install sound-slot-7 /sbin/modprobe snd-card-7
> # Cause optional modules to be loaded above generic modules
> install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe
> --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; } install
> snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && {
> /sbin/modprobe --quiet snd-seq-midi ; : ; } install snd-emu10k1
> /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet
> snd-emu10k1-synth ; : ; }
> 
> # Prevent abnormal drivers from grabbing index 0
> options bt87x index=-2
> options cx88_alsa index=-2
> options snd-atiixp-modem index=-2
> options snd-intel8x0m index=-2
> options snd-via82xx-modem index=-2
> # Keep snd-pcsp from beeing loaded as first soundcard
> options snd-pcsp index=-2
> # Keep snd-usb-audio from beeing loaded as first soundcard
> options snd-usb-audio index=-2
> #using module names that are known to exist
> options snd_cs4236 index=0
> options snd_sbawe index=1
> 
> lsmod shows no sound modules at all.

I think you should setup oss wrapper in your asoundrc

regards

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


#168042

From"Martin McCormick" <martin.m@suddenlink.net>
Date2016-05-18 23:00 +0200
Message-ID<rAgJs-6ZU-23@gated-at.bofh.it>
In reply to#168041
deloptes <deloptes@gmail.com> writes:
. . . Much good information. Many thanks.

> use an oss wrapper - there is how to on the alsa wiki.

I certainly will look in to that as there are still many things
going on that shouldn't be but things are better at least on the
wheezy system.

For the first time since July 15 of last year, I now have the
cs4236 operating as Card 0 and a usb sound Card as Card 1. I
would be happy except for more weirdness.

	First, I removed the blacklist for soundcore as this is
not necessary. The conflict between oss and ALSA modules no
longer exists as what I had stumbled across is outdated
information.

	After a reboot, there is no Card 0 but the usb Card 1. If
I manually call modprobe as in modprobe snd-cs4236, the OS takes
it and suddenly, there's Card 0 and Card 1 in aplay -l as well as
arecord -l. Obviously, I shouldn't have to re-run the attempt to
setup Card 0.

	Thank you.

Martin McCormick

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web