Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Groovyarcade installed to disk = No ALSA?  (Read 2055 times)

0 Members and 1 Guest are viewing this topic.

Sonny_Jim

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:June 19, 2012, 08:39:53 am
Groovyarcade installed to disk = No ALSA?
« on: February 22, 2012, 11:27:24 pm »
Hi all,

I'm a long time AdvanceCD user and I thought I'd give groovymame a try.  So far so good, I've got it running nicely on the AVGA card but I have an issue with ALSA.

If I boot from the LiveCD, I can switch to ALSA and it works fine, but when I've done the HDD install, ALSA no longer works?  I've tried /etc/init.d/alsasound start but it just tells me it can't find any sound cards, even though OSS works?

The reason I wish to switch to ALSA is because of the huge sound lag in some games, it's especially noticeable in Hypersports during the skeet shooting, the gunshot is delayed by about 100ms which wrecks my timing!

EDIT:  after reading the thread here I did a bit of investigating:
http://forum.arcadecontrols.com/index.php?topic=113337.0

It appears that I have no alsa drivers installed in /lib/modules/, only OSS.  Could someone walk me through copying the alsa drivers off the livecd?
« Last Edit: February 22, 2012, 11:41:43 pm by Sonny_Jim »

Ansa89

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 377
  • Last login:December 09, 2016, 10:40:11 am
Re: Groovyarcade installed to disk = No ALSA?
« Reply #1 on: February 23, 2012, 02:30:11 am »
The sound modules should be in "/lib/modules/`uname -r`/kernel/sound".
I guess you can safely copy all the content if this directory from the live system to your hard disk install.
Earth could be the hell of another world

Sonny_Jim

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:June 19, 2012, 08:39:53 am
Re: Groovyarcade installed to disk = No ALSA?
« Reply #2 on: February 24, 2012, 01:18:40 am »
Ok, so I booted the livecd, copied the contents of /lib/modules/3.0.2+/kernel/sound across (via tar archive) to a usb key and booted up the hard disc install.

I looked in /lib/modules/3.0.2+/kernel/sound on the HDD install and it's non-existent, which is odd but expected.  I untarred the archive in there, being careful to make sure I kept permissions/folder structure correct.  All good, so I run "update-modules" and tried /etc/rc.d/alsasound start, which gave me no dice.

Scratching my head a little, I tried modprobe soundcore, which responded with that it didn't know where soundcore was.  This was odd, as I definitely ran update-modules and put it in the right place.  I could insmod soundcore if I gave it the specific location, so I know that at least it's compatible.  I also tried alsaconf but it came back as no cards.  I'd like to point out that under OSS or using the LiveCD, my soundcard gets detected just fine.

Now here's the really odd part, when I had rebooted, the folder in /lib/modules/3.0.2+/kernel/sound had disappeared!   Is /lib/modules/3.0.2+ being created on boot or copied from a filesystem image somewhere?

Ansa89

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 377
  • Last login:December 09, 2016, 10:40:11 am
Re: Groovyarcade installed to disk = No ALSA?
« Reply #3 on: February 24, 2012, 05:01:08 am »
Ok, that's really strange.
The only thought (at the moment) is look at the startup/shutdown script, searching if there is something messed up.
As a workaround you can create/modify a startup script which copy the "sound/" directory every system boot:
Code: [Select]
#!/bin/bash
if ! [ -d /lib/modules/`uname -r`/kernel/sound ]; then
   cp -a /path/to/saved/sound_dir /lib/modules/`uname -r`/kernel/sound
   chown -R root:root /lib/modules/`uname -r`/kernel/sound
   depmod -a `uname -r`
fi

Sadly bitbytebit is really busy in this period...You can try to contact ves (or Calamity), hoping he has a better answer for that.
Earth could be the hell of another world

Sonny_Jim

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:June 19, 2012, 08:39:53 am
Re: Groovyarcade installed to disk = No ALSA?
« Reply #4 on: March 03, 2012, 11:28:49 pm »
Hmmrph, I take it that no one uses ALSA then?

I managed to fix my problem by changing the sound latency option in mame.ini from 3 to 1.

Ansa89

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 377
  • Last login:December 09, 2016, 10:40:11 am
Re: Groovyarcade installed to disk = No ALSA?
« Reply #5 on: March 04, 2012, 04:47:40 am »
Everybody should use ALSA, since OSS is deprecated; but you also must remember you are on gentoo...(yes, is a flame/ironic comment because I don't like very much gentoo).

What I can tell you is that on slackware ALSA works fine, so I think there is something wrong with gentoo scripts/sound management.
Earth could be the hell of another world

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6539
  • Last login:Today at 05:15:47 am
Re: Groovyarcade installed to disk = No ALSA?
« Reply #6 on: March 04, 2012, 05:17:35 am »
Everybody should use ALSA, since OSS is deprecated; but you also must remember you are on gentoo...(yes, is a flame/ironic comment because I don't like very much gentoo).

BTW, in case you want to give it a try, Ves has realeased a new GroovyArcade iso based on ArchLinux: http://www.retrovicio.org/foro/showthread.php?14969-GroovyArcade-Por-fin-100-Pixel-Perfect-y-mucho-mas&p=184957&viewfull=1#post184957

I'm wondering if the sound latency option could remove the latency issue you were experiencing, Ansa89, since then I've seen it repored by other people too, including Ves.

Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead or pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

Ansa89

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 377
  • Last login:December 09, 2016, 10:40:11 am
Re: Groovyarcade installed to disk = No ALSA?
« Reply #7 on: March 04, 2012, 07:32:17 am »
I'm wondering if the sound latency option could remove the latency issue you were experiencing, Ansa89, since then I've seen it repored by other people too, including Ves.
I'll check, but is also important understand why of this behavior (maybe is related to your groovymame changes in sound core?).
Earth could be the hell of another world

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6539
  • Last login:Today at 05:15:47 am
Re: Groovyarcade installed to disk = No ALSA?
« Reply #8 on: March 04, 2012, 08:11:39 am »
I'll check, but is also important understand why of this behavior (maybe is related to your groovymame changes in sound core?).

Yes, definitely. But the interesting part is that I didn't change anything in the sound core. What this patch does is to adjust the emulation speed to the one forced by the refresh rate of our video card. This is performed by updating m_speed with the current speed percent value, dynamically (this is done in \emu\video.c). On its own side, the sound core uses this m_speed value to adjust the sound output to the current emulation speed, but I didn't add this feature, it was already built-in in MAME, though only used by the almost useless -refreshspeed option. So, I'm guessing the issue is that at some point during normal game execution, some speed percent values are read that when translated into m_speed values somewhat corrupt the sound buffer from there on, causing lag or even worse stuff (if you pause the game the sound gets noise on resume). For some reason, this only happens in Linux. So that's where we need to look for, I believe.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead or pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

Ansa89

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 377
  • Last login:December 09, 2016, 10:40:11 am
Re: Groovyarcade installed to disk = No ALSA?
« Reply #9 on: March 04, 2012, 09:04:09 am »
Just a couple of guesses:
- the m_speed value change too rapidly to let sound be setted correctly
- the m_speed is casted in some obscure way with precision loss.
- the mame sound core driver on linux is bugged (but I think mame uses sdl libraries also for sound)
Earth could be the hell of another world

Sonny_Jim

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:June 19, 2012, 08:39:53 am
Re: Groovyarcade installed to disk = No ALSA?
« Reply #10 on: March 05, 2012, 01:25:18 am »
My problem was spelled out above, it seems for whatever reason the install didn't copy across the ALSA modules.  I've spent a couple of weeks setting up and tweaking wahcade so I'm thinking about reinstalling again using ArchLinux.  Don't get me wrong, I used to love Gentoo, then I realised spending 4 hours recompiling something just to get a minimal speed increase just wasn't worth it.