WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ALSA problems in PCem  (Read 4160 times)

Offline Dacicus

  • WikiUser
  • *
  • Posts: 5
ALSA problems in PCem
« on: August 14, 2019, 11:37:00 PM »
Hello,

I've been experimenting with Core--mostly 7.0 but also 9.0--as a guest OS in PCem v14 and v15, and I can't get ALSA to work with the Ensoniq AudioPCI (ES1371) / Sound Blaster PCI 128 device.  After installing alsa-config.tcz and alsa.tcz as per the guide on the wiki, alsactl init gives this output:
Code: [Select]
alsactl: init:1757: No soundcards found...
lsmod | grep snd produces:
Code: [Select]
snd_ens1371            16384  0
snd_rawmidi            20480  1 snd_ens1371
snd_seq_device         12288  1 snd_rawmidi
gameport               12288  1 snd_ens1371
snd_ac97_codec         77824  1 snd_ens1371
snd_pcm                49152  2 snd_ens1371,snd_ac97_codec
snd_timer              20480  1 snd_pcm
snd                    36864  6 snd_ens1371,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm,snd_timer
soundcore              12288  1 snd
ac97_bus               12288  1 snd_ac97_codec

but aplay -l yields:
Code: [Select]
aplay: device_list:272: no soundcards found...
After a forum search, I tried /usr/local/etc/init.d/alsasound start and got:
Code: [Select]
/usr/local/etc/init.d/alsasound: line 7: can't create /opt/alsa/.alsadriver: nonexistent directory
rmmod: can't unload module 'snd_seq': Resource temporarily unavailable
rmmod: can't unload module 'snd_timer': Resource temporarily unavailable
rmmod: can't unload module 'snd_seq_device': Resource temporarily unavailable
rmmod: can't unload module 'snd': Resource temporarily unavailable
amixer: Mixer attach default error: No such file or directory
Something went wrong, sound was not set up.

I also tried modprobe -r snd_ens1371 followed by modprobe snd_ens1371 and noted this in dmesg:
Code: [Select]
snd_ens1371 0000:00:12.0: found PCI INT A -> IRQ 10
snd_ens1371 0000:00:12.0: AC'97 0 access is not valid [0x0], removing mixer.
snd_ens1371: probe of 0000:00:12.0 failed with error -5

Of note, I can get sound using OSS, but the programs I hope to run depend on libasound.tcz, which leads me to believe that they require ALSA.

Any help will be greatly appreciated.

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: ALSA problems in PCem
« Reply #1 on: August 15, 2019, 04:32:20 AM »
1)*https://www.linuxsecrets.com/tinycorelinux-wiki/wiki:setting_up_sound.html

2) http://forum.tinycorelinux.net/index.php?topic=9733.15

3) http://forum.tinycorelinux.net/index.php?topic=11224.0

:)
« Last Edit: August 15, 2019, 04:34:02 AM by Pats »

Offline Dacicus

  • WikiUser
  • *
  • Posts: 5
Re: ALSA problems in PCem
« Reply #2 on: August 17, 2019, 11:06:18 AM »
Thank you.  Further testing leads me to believe that the problem is with PCem's emulation of the Ensoniq AudioPCI (ES1371).  VMware apparently emulates the same type of card, and I can get sound working with ALSA using the "install alsa-config.tcz followed by alsa.tcz" process.

I did some tests in PCem based on your links.  Using oss_alsa.tcz for ALSA emulation did get sound working, but it is spotty in the target programs.

Based on your third link, I tried alsaconf.  Had to go back to version 5.x in order to find the extension; I used Core-5.1.iso for testing.  alsaconf did find the card, and it generated this modprobe.conf:
Code: [Select]
# /etc/modprobe.conf: Modprobe config file.
#
# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.27.1 ---
alias snd-card-0 snd-ens1371
alias sound-slot-0 snd-ens1371
# --- END: Generated by ALSACONF, do not edit. ---

However, setup seems to have failed at the /usr/local/etc/init.d/alsasound step.  I tried the command manually and got:
Code: [Select]
amixer: Mixer attach default error: No such file or directory
Something went wrong, sound was not set up.  Since we are using the results of the last run of alsaconf make sure that your /etc/modprobe.conf file was properly backed up or has not been corrupted.  You need to run alsaconf again or restore a working /etc/modprobe.conf.

alsactl init and aplay -l again gave the message about no soundcard being found.

The result of modprobe -r snd_ens1371 followed by modprobe snd_ens1371 had one extra line but still resulted in a failure:
Code: [Select]
snd_ens1371 0000:00:13.0: found PCI INT A -> IRQ 9
snd_ens1371 0000:00:13.0: setting latency timer to 64
AC'97 0 access is not valid [0x0], removing mixer.
snd_ens1371: probe of 0000:00:13.0 failed with error -5

I'll take this up with the PCem folks.

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6830
Re: ALSA problems in PCem
« Reply #3 on: August 17, 2019, 11:24:59 AM »
Hi Dacicus
These instructions are a bit more current:
http://forum.tinycorelinux.net/index.php/topic,22145.msg138620.html#msg138620

Offline Dacicus

  • WikiUser
  • *
  • Posts: 5
Re: ALSA problems in PCem
« Reply #4 on: August 17, 2019, 12:29:30 PM »
I did try that sequence already but gave it another shot with Core-9.0.iso and a fresh configuration in PCem v15.
  • Steps 1 and 2 went well.
  • I skipped step 3.
  • For step 4, I verified that sound was not muted on my host OS.
  • Step 5 produced the "No soundcards found" error that I've already posted above.  I tried step 5 again as sudo alsactl init with the same result.
  • Tried step 6 anyway and got a series of error messages that began with
    Quote
    ALSA lib confmisc.c:767:(parse_card) cannot find card '0'


Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: ALSA problems in PCem
« Reply #5 on: August 17, 2019, 08:30:28 PM »
Hi thl04, Can it be due to your h/w specs ?

 Some quotes from the PCem forum : 
Quote
...Think with that spec PC, the lag is because of it.
..
Quote
..PCem seems to run very well with a CPU running at 4 Ghz or more. I ran system tests on the i7 8750H and i7 9750H CPUs, and the latter is much more PCem-friendly, while the former could run most 166 MMX tasks well.


1)*https://pcem-emulator.co.uk/phpBB3/viewtopic.php?f=2&t=3290

Offline Dacicus

  • WikiUser
  • *
  • Posts: 5
Re: ALSA problems in PCem
« Reply #6 on: August 18, 2019, 08:27:23 AM »
Yes, the hardware likely plays a role in sound lag that I experience.  I don't care so much about that as about getting ALSA to work, though.

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: ALSA problems in PCem
« Reply #7 on: August 18, 2019, 10:52:51 AM »
@Dacicus ,
1) Have you checked , how much RAM is available after loading PCem software and also after loading alsa exts ?
2) Have you tried increasing size of swap partition and enabling it ?

Offline Dacicus

  • WikiUser
  • *
  • Posts: 5
Re: ALSA problems in PCem
« Reply #8 on: August 22, 2019, 01:46:05 PM »
Per your request, here's the output of free:
Code: [Select]
             total       used       free     shared    buffers     cached
Mem:        122928      72408      50520      12668       9240      40668
-/+ buffers/cache:      22500     100428
Swap:        25548          0      25548

I'm not sure what this has to do with getting ALSA to work, though.

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: ALSA problems in PCem
« Reply #9 on: August 22, 2019, 07:21:30 PM »
Hi Dacicus,
I hope you have dnloaded all deps of oss.tcz and alsa.tcz from repo. Because oss.tcz.dep and alsa.tcz.dep both have a wrong entry. I am talking abt TC10.0

For eq: alsa.tcz.dep have an entry like alsa-modules-KERNEL.tcz. Actually it should be alsa-modules-4.19.10-tinycore.tcz and  likewise in oss dep . Pl check this problem exists in your TC ver or not.

 But I guess you must be aware of it. ... Since I have not worked with your soundcard type, I cannot comment on it.

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6830
Re: ALSA problems in PCem
« Reply #10 on: August 22, 2019, 07:52:49 PM »
Hi Pats
... Because oss.tcz.dep and alsa.tcz.dep both have a wrong entry. I am talking abt TC10.0

For eq: alsa.tcz.dep have an entry like alsa-modules-KERNEL.tcz. Actually it should be alsa-modules-4.19.10-tinycore.tcz and likewise in oss dep .  ...
Actually  alsa-modules-KERNEL.tcz  is correct. The  KERNEL  part of the extension name is resolved by  tce-load.  This allows you to
dual boot  core  and  core64  using the same  tce/optional  directory containing both 32 and 64 bit versions of modules and the
same  onboot.lst file.

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: ALSA problems in PCem
« Reply #11 on: August 22, 2019, 09:15:55 PM »
Rich:
Quote
.
Actually  alsa-modules-KERNEL.tcz  is correct. The  KERNEL  part of the extension name is resolved by  tce-load.


. Pvsly , I had also read abt this - may be in curagas ans to someone. 
.. But in reality, when tried sometime back,  I saw this * Error , not found* while dnloading thru Apps.
 ..And I had to dnload oss-modules.*  and alsa-modules.* etc saperately with relevent changes in .dep.

Luckily I had this scrshot on my disk.. May be this problem is resolved there-after.

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6830
Re: ALSA problems in PCem
« Reply #12 on: August 22, 2019, 10:04:36 PM »
Hi Pats
The error shown in your screen shot occurred because  oss-modules  does not exist in the TC10 repository. See for yourself:
http://tinycorelinux.net/10.x/x86/tcz/

If you select  alsa.tcz  in the  Apps  utility and click on the  Size  tab it displays correctly. The  .dep  looks like this:
Code: [Select]
alsa-modules-KERNEL.tcz
libasound.tcz
ncursesw.tcz
Found here:
http://tinycorelinux.net/10.x/x86/tcz/alsa.tcz.dep

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: ALSA problems in PCem
« Reply #13 on: August 22, 2019, 11:42:33 PM »
Rich:
Quote
.The error shown in your screen shot occurred because  oss-modules  does not exist in the TC10 repository.

Thanks !
 ... I have already mentioned abt TC10 ver in the begining of my post abt oss.dep error. ..jaunito had already mentioned somewhere abt oss disconti after TC9 , IIRC . :)

.. My oss in older ver of TC and alsa both working ok.
 .. I just cautioned Dacicus abt posible problems while setting alsa in TC in general, considering his perticular soundcard support.
... By the way, what is your view abt solving  Dacicus  problem abt alsa - not abt PCem support, any clue ?

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6830
Re: ALSA problems in PCem
« Reply #14 on: August 23, 2019, 05:35:45 AM »
Hi Pats
Rich:
Quote
.The error shown in your screen shot occurred because  oss-modules  does not exist in the TC10 repository.
...  .. I just cautioned Dacicus abt posible problems while setting alsa in TC in general, considering his perticular soundcard support. ...
What you wrote was that the dependency file was wrong because it used the word  KERNEL  instead of the kernel version number:
... Because oss.tcz.dep and alsa.tcz.dep both have a wrong entry. I am talking abt TC10.0

For eq: alsa.tcz.dep have an entry like alsa-modules-KERNEL.tcz. Actually it should be alsa-modules-4.19.10-tinycore.tcz and likewise in oss dep .  ...
and that is not true.

... ... By the way, what is your view abt solving  Dacicus  problem abt alsa - not abt PCem support, any clue ?
According to the PCem site support for the  ES1371  was added in version 13 so maybe something broke in a later version.
The OP states:
Thank you.  Further testing leads me to believe that the problem is with PCem's emulation of the Ensoniq AudioPCI (ES1371).  VMware apparently emulates the same type of card, and I can get sound working with ALSA using the "install alsa-config.tcz followed by alsa.tcz" process. ...
and I'm inclined to agree.