CMI8738 audio not working on uA1 with 4.1u4? [SOLVED]

A forum for general AmigaOS 4.x support questions that are not platform-specific
amigaonefan
Posts: 43
Joined: Fri Sep 16, 2011 9:20 pm

CMI8738 audio not working on uA1 with 4.1u4? [SOLVED]

Post by amigaonefan »

I have noticed some oddities with my audio since installing Os4.1 update 4 on my uA1-c. I went and checked prefs/AHI prefs and discovered to my surprise that none of the cmi audio drivers work, only the unit 0 non cmi drivers. So I booted from my vanilla OS4.1 update 3 partition and found that all of the cmi drivers work perfectly there, unit 0, unit 1, unit 2 etc.
I have verified the audio drivers and even replaced them, tried deleting the audio prefs in env-arc to no avail.
I also tried not using my user-startup to see if something else was conflicting. No change.
Any idea what might be wrong? Again, all the cmi drivers work fine with update 3, but with update 4 none of them work.
Deniil
Posts: 108
Joined: Mon Jul 11, 2011 6:59 pm

Re: CMI8738 audio not working on uA1 with 4.1u4?

Post by Deniil »

Strange. I have had a CMI8738-based card since about OS4.1 and it has always worked fine in my A1-XE, also with upd4.

Have you checked the number of channels and the volume for the AHI units where you have CMI selected, and that output is what you expect (analog or digital)?
I have CMI on Units Music, 0, 1, 2. Both analog and digital output works, if I select that. I have unit 3 configured for on-board AC97.
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: CMI8738 audio not working on uA1 with 4.1u4?

Post by xenic »

How are you guys testing the audio output? On my system, AHI prefs doesn't make any sound by pressing the "Play a test sound" if Music Unit, Unit 0,Unit 1, Unit 2, Unit 3 are all set to CS4281 (SAM builtin sound chip). However, if I have "Music Unit" set to Unit 0 (a setting only available with device.audio installed) and Unit 0, Unit 1, Unit 2, Unit 3 all set to CS4281 then "Play a test sound" works for "Music Unit" but not for Unit 0, Unit 1, Unit 2 and Unit 3.

Since I think datatypes sound play defaults to Unit 0 and most music programs default to Unit 0 or low level API, I don't see how you can tell if the other Units are working. I've never been able to get a PCI sound card to work on my SAM and I have to wonder if it's the card or my inability to get the settings right.

amigaonefan: Sorry I'm not of much help but the AHI prefs never made much sense to me. By the way, I'm using Update 4 on a SAM Flex but I seem to remember AHI acting the same way on my µA1 when I was using it.
AmigaOne X1000 with 2GB memory - OS4.1 FE
amigaonefan
Posts: 43
Joined: Fri Sep 16, 2011 9:20 pm

Re: CMI8738 audio not working on uA1 with 4.1u4?

Post by amigaonefan »

It acts like Xenic says, only the non CMI channels work, the CMI driver doesn;t seem to work at all when I play a test sound. As a result, I do not hear sound in many games such as quake 2, quake 3, and other games that use AHI. However, I can use the CD Player that comes with OS4.1 u 4 with the tooltype set to USEAHI and I DO get sound played from the CD. But as soon as I quite CD Player my AmigaOne always locks up hard. Always. Only a physical reset using the reset button allows me to reboot.
So what ridiculously idiotic thing might I have done to cause the AHI CMI8738 driver to stop working on update 4, while it works fine with update 3? As I said, I tried looking at the audio drivers, even replaced every file I could find by copying the "working" version of each file from my update 3 partition to my update 4 partition.

Any ideas? Can I reinstall update 4 without starting from scratch - that is, reinstall it over an existing update 4 installation?

Scott
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: CMI8738 audio not working on uA1 with 4.1u4?

Post by xenic »

@amigaonefan
Since I read your post I have been testing some things on my system and discovered some things that may or may not relate to what's happening on your system. First, I discovered that if you have "device.audio" installed in SYS:Devs/AHI/ and "DEVICE" installed in DH0:Devs/AudioModes/ then you get the effect I described in my earlier post even if the device.audio isn't being used. The test sound works for "Music Unit" but not for Unit0, Unit1 etc. However, if I remove "device.audio" and "DEVICE" and reboot, then the test sound works for "Music Unit" and all the numbered units. I might add though that even though the sound tests in AHI prefs are affected by "device.audio" it never affected sound playing on my system. The fact that I've only been using the SAM builtin player may have some bearing on the issue.

I have found a way to test the sound output for all music units on my system. I change the default AHI unit for datatype sound play and play a short sound to see if I get any audio output. Even though the test sound in AHI prefs doesn't work with "device.audio" installed and used, all my music units produce sound when I test them with datatype sound. You can change the default AHI music unit for datatype sound by entering "SevEnv SAVE Classes/DataTypes/sound/AHI #" where # is the unit number you want datatypes to use. You have to do a warm reboot for it to take effect though.

By the way, I have "device.audio" installed because I set "Music Unit" to "Unit 0" to prevent programs that use the low level AHI API from locking out other sound output. I don't know if you have it installed on your system but one thing you could try is removing it to see if your system returns to normal.
AmigaOne X1000 with 2GB memory - OS4.1 FE
amigaonefan
Posts: 43
Joined: Fri Sep 16, 2011 9:20 pm

Re: CMI8738 audio not working on uA1 with 4.1u4?

Post by amigaonefan »

Hmmm...this one has me stumped! I have tried removeing the devs:ahi/device.audio and devs:audiomodes/device files and rebooted. Still the exact same problem. I then removed all #?.audio in devs:ahi except the cmi8738.audio, and all files in devs:audiomodes except cmi8738 and rebooted. Still no difference.
I have set the line in my startup-sequence immeditely after unset kickstart to C:Assign > NIL: SYS: DHV: (which is my working OS4.1 update 3 partition - the one where the cmi8738 audio works) and rebooted. Behaves exactly the same- no cmi audio!
This leaves, if I am correct, only the kickstart files or kicklayout. I have checked these and see no issues. File sizes are okay, all files present between my OS4: partition that doesn't allow CMI audio and my DHV: partition that does allow CMI audio.

I have also tried using thecommand C:addaudiomodes per the docs for AHI. Makes no difference. Oh, the device.audio and device files are both present by default on the OS4.1 update 1 CD. They are also in my OS4.1 update 3 devs: directory - the one in which the cmi8738 works fine.

Any other ideas?
amigaonefan
Posts: 43
Joined: Fri Sep 16, 2011 9:20 pm

Re: CMI8738 audio not working on uA1 with 4.1u4?

Post by amigaonefan »

Aha! Got it!

I had to remove the devs:dosdrivers/speak device to get the CMI8738 audio to work.

For some reason, the two became incompatible at some point - not sure eactly when, possibly OS4.1 update 1.
Anyway, when I boot up without the speak device mounted, the CMI8738 AHI audio modes all work for all units as expected. As soon as I double click on speak to mount the narrator device, I lose my AHI CMI8738 audio - but the narrator device does work from that point on. Guess they are mutually exclusive!
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: CMI8738 audio not working on uA1 with 4.1u4?

Post by xenic »

amigaonefan wrote:Aha! Got it!
I had to remove the devs:dosdrivers/speak device to get the CMI8738 audio to work.
That might present you with another problem. In the past, using the old "Say" command would cause a crash when it finished and closed narrator.device or audio.device. The speak device keeps the devices open and avoids the crash. Maybe that issue has been fixed; not sure.
For some reason, the two became incompatible at some point - not sure eactly when, possibly OS4.1 update 1. Anyway, when I boot up without the speak device mounted, the CMI8738 AHI audio modes all work for all units as expected. As soon as I double click on speak to mount the narrator device, I lose my AHI CMI8738 audio - but the narrator device does work from that point on. Guess they are mutually exclusive!
I finally got a sound card to work by installing it in a different PCI slot but that's a story for another topic.
I did some searching with my Hex editor and found that the speak device uses L/speak-handler which opens narrator.device which opens audio.device which uses ahi.device. I did some experimenting with the old Play16 command which opens a requester to select an output device when you specify AHI output. With my sound card installed, it is assigned to Unit 0,1,2 while the builtin sound is assigned to Unit 3. However, Play16 produces no sound if I specify the internal sound in the Play16 requester. I suspect that audio.device and Play16 are opening/using AHI in a way that may not be compatable with the way AHI is set up for OS4.

I'm glad you tracked down your problem so now I need to resolve some sound card issues of my own.
AmigaOne X1000 with 2GB memory - OS4.1 FE
Deniil
Posts: 108
Joined: Mon Jul 11, 2011 6:59 pm

Re: CMI8738 audio not working on uA1 with 4.1u4? [SOLVED]

Post by Deniil »

Right! I use a tool to keep AHI open such that no application is allowed to change the volume. Then I use Mixer to change the volume, and since AHI cannot change the volume because of my app keeping the unit open, the Mixer settings are not forgotten, but remain permanent :-)

Same must have happened to you by this speak device, but in silent mode and you didn't use Mixer.
amigaonefan
Posts: 43
Joined: Fri Sep 16, 2011 9:20 pm

Re: CMI8738 audio not working on uA1 with 4.1u4? [SOLVED]

Post by amigaonefan »

Hmmm.. not sure if I am fully understanding this. Are you saying that your keepAHIopen program (saw you just put it up on OS4 depot - thanks!) will allow me to mount my SPEAK device AND use my AHI channels at with no conflicts?
I don't know a lot about how OS4 reroutes what was once Paula audio to the AHI units. Is there a good "simple" writeup anywhere about how this all works?

Glad I have my problem solved, but if keepAHIopen allows me to use both narrator.device AND my OS4 AHI units, please let me know!

Thanks!
Post Reply