No Line-In sound nor .MID file sound

I’m a little new to this Linux stuff and so am having a hard time comprehending everything needed. I see mention of things like ALSA, PulseAudio, Phonon, Jack, and backends of GStreamer and Xine. I don’t know which is good, best, or necessary. I even downloaded a bunch of good, bad, and ugly things. I don’t know jack about it, but have also downloaded some things called Jack, which haven’t helped much, if any.

I do sort of have sound working some of the time. It does appear I have the issue with one sound stopping any other sounds, but the updated Amarok seems to reset the problem so if I cause a error sound while playing a file, all I have to do is stop the player and the press play. I also see system notifications to the effect of can’t play sound on analog/digital falling back to digital/analog (Don’t remember exactly the message). I can play MP3 files.

My two current questions are, how do I get sound from the Line-In and how do I enable sound from .MID files? I’m using 11.2 but in 11.1, I had something in KMix called Smart5.1. I installed 11.3 fresh on a spare drive and it has it too, but not 11.2 after upgrading from 11.1. If you click the smart5.1 in the right order with Line-In, it works. If it’s turned on, then turning Line-In On, then Off will enable the line-in sound to work. Unfortunately, no other sounds work on the 11.3 install. If I plug headphones in the front and turn OFF Independent HP on KMix, I hear line-in sound in the headphones but nothing from front, side, rear, center jacks in the back. I believe if I could get a Smart5.1 channel displayed, it would work. If I record line-in sound, which I can’t hear, into audacity, it records it and then I can play it back. Is there something better than KMix. It has a bunch of weird things that seem to have no effect (LFE, IEC958, IEC958 Default PCM) and some of the channels seem to work in an unusual way.

I have used a terminal session and used something (I forget - timidity?) to hear .mid files, but when using KMid, it acts like it’s playing a mid file with things blinking, moving, and piano keys pressing, but no sound. This makes me think I have the right “codecs” but might be an issue with other problems.

I really don’t understand my system. The information I get talks about ATI when my Asus M4A785TD-V EVO motherboard manual says I have an integrated VIA VT1708S High Definition Audio. It does have an integrated ATI video card. Does that have something to do with it?

If I have followed the steps correctly here is my information. I’d appreciate any help in solving this. Thanks.
http://www.alsa-project.org/db/?f=64e7c21f8295dbbed908ae0fa0958729c1f83c19

cat /etc/SuSE-release
openSUSE 11.2 (x86_64)
VERSION = 11.2

cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.20.

cat /proc/asound/modules
0 snd_hda_intel
1 snd_hda_intel

cat /proc/asound/cards
0 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0xfe7f4000 irq 16
1 [HDMI ]: HDA-Intel - HDA ATI HDMI
HDA ATI HDMI at 0xfe9e8000 irq 19

(What’s SB and HDMI? Why two? What is the codec - since there’s no “with”?)

rpm -qa ‘alsa
alsa-tools-1.0.21-2.5.x86_64
alsa-plugins-pulse-32bit-1.0.21-3.3.x86_64
alsa-firmware-1.0.20-3.2.noarch
alsa-plugins-1.0.21-3.3.x86_64
alsa-oss-32bit-1.0.17-25.2.x86_64
alsa-utils-1.0.21-3.1.x86_64
alsa-docs-1.0.21-49.1.x86_64
alsa-plugins-jack-1.0.18-6.13.x86_64
alsa-1.0.21-3.2.x86_64
alsa-plugins-pulse-1.0.21-3.3.x86_64
alsamixergui-0.9.0rc1-584.91.x86_64
alsa-oss-1.0.17-25.2.x86_64
alsa-plugins-32bit-1.0.21-3.3.x86_64

rpm -qa ‘pulse
pulseaudio-0.9.19-2.3.x86_64
pulseaudio-module-lirc-0.9.19-2.3.x86_64
alsa-plugins-pulse-32bit-1.0.21-3.3.x86_64
pulseaudio-utils-0.9.19-2.3.x86_64
pulseaudio-module-x11-0.9.19-2.3.x86_64
libpulse0-32bit-0.9.19-2.3.x86_64
libpulse-browse0-0.9.19-2.3.x86_64
pulseaudio-module-bluetooth-0.9.19-2.3.x86_64
pulseaudio-module-zeroconf-0.9.19-2.3.x86_64
alsa-plugins-pulse-1.0.21-3.3.x86_64
libpulse0-0.9.19-2.3.x86_64
libpulse-mainloop-glib0-0.9.19-2.3.x86_64
libxine1-pulse-1.1.18.1-1.pm.38.2.x86_64

rpm -q libasound2
libasound2-1.0.23-73.1.x86_64

uname -a
Linux Xxxxx 2.6.31.5-0.1-desktop #1 SMP PREEMPT 2009-10-26 15:49:03 +0100 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/modprobe.d/sound
cat: /etc/modprobe.d/sound: No such file or directory

cat /etc/modprobe.d/50-sound.conf
options snd slots=snd-hda-intel,snd-hda-intel

5Dex.Llr7zS2YqdE:SBx00 Azalia (Intel HDA)

alias snd-card-0 snd-hda-intel

l4dC.BNDDV4NB020:ATI Technologies Inc

alias snd-card-1 snd-hda-intel

Well, could someone tell me what codec is being used and maybe I can search for info on it?

A .MID file is a midi file, which is not strictly speaking an audio format, so you’re not really looking for a codec. A MIDI file is like instructions for a computer program to produce an audio file from–you could think of it as a musical score that gets played by the program that reads it. Different programs, with different instrument files can have very different results. I don’t know anything about kmid. timidity is ok and easy to use from the command line. I use a few different synth programs (qsynth/fluidsynth, linuxsampler, and hydrogen mostly) connected with jack, but that is more for making music since jack does not really play nice with other audio programs (flash, etc.) Actually I don’t know that I have ever needed to play one in an entertainment context, not sure what I would use.

Take a read of this wiki that I wrote some time back, and hopefully it ‘might’ clear up some of the mystery: SDB:Sound concepts - openSUSE

Linux is notorious for having one application seize the sound device and not share it with other applications. The two ways around that I know of are to either (1) use the ALSA API for one’s desktop and one’s application (which works for some but not all hardware) or (2) use pulse audio to work around this (and I known next to nothing about pulse audio and I can not help there in configuring pulse - but purportedly it is possible to configure pulse to allow this).

Plug in the device to your line in, set the external device to output audio to your openSUSE Line-in, and tune your mixer to allow the sound to enter.

The output you provided is for openSUSE-11.2. But you state you installed 11.3. I have no idea as to your config now.

I can say that your PC was running a 64-bit openSUSE-11.2 with the 2.6.31.5-0.1-desktop and a mix of the 1.0.20/1.0.21 version of alsa that comes with openSUSE-11.2. Your hardware audio codec is a VIA VT1708S. If I had to guess, I would guess your desktop is Gnome, based on the massive number of pulse applications you have installed.

Note the alsa driver (version 1.0.23) in openSUSE-11.3 is much more recent and mostly superior to that in openSUSE-11.2. In addition, the openSUSE packager for sound has even more updates to the 1.0.23 version of alsa in openSUSE-11.3, that one can install if necessary.

That behaviour reads to be strange. Its possible you will need to update the alsa in openSUSE-11.3 to the latest version that the openSUSE packager for sound has created. If necessary, I can point you to the rpms for that update (they are NOT on the nominal OSS nor UPDATE repositories).

mid files are always a bit of a pain to get working nicely in Linux from what I recall.

The output you provided is for openSUSE-11.2. But you state you installed 11.3. I have no idea as to your config now. ]

I’m using 11.2. I have tried 11.3, but from my last upgrade from 11.1 to 11.2, I’m afraid of going through the hassle. Lot’s of things stopped working and required great effort to get back. Probably the upgrade didn’t upgrade just right. It was suggested a clean install, but then I have to start from square one. When I get time, I will try to ask for the best way to go from 11.2 to 11.3. I installed the 11.3 on a spare drive to test. I was happy to see the ATI graphics worked and didn’t have any of the problems I had when I started with 11.1 and upgraded to 11.2. Yeah! Even though I’ve compiled many programs in the past, something just seems uncanny about compiling the kernel, if that’s what I really did. :open_mouth:

Take a read of this wiki that I wrote some time back, and hopefully it ‘might’ clear up some of the mystery: SDB:Sound concepts - openSUSE

Thank you! That was very informative and I hadn’t come across that before. I see now I probably wasted my effort to go to the library and download all the GStreamer stuff.

Plug in the device to your line in, set the external device to output audio to your openSUSE Line-in, and tune your mixer to allow the sound to enter.

That’s the problem, there’s nothing on the mixer that turns it on. I’d be happy if there was a command line interface that would turn on select things like “Smart5.1”. But, if they don’t exist, can they be turned on. It existed in 11.1 and exists in my 11.3 test system (in which I haven’t installed a bunch of unneeded things).

Your hardware audio codec is a VIA VT1708S.

That’s what I would guess, but don’t find much information for VIA or VT when I go through the steps for Audio Troubleshooting. The HD-Audio-Models.txt file doesn’t have any VIA or VT in it if I need to put a “model=” statement in. Then I see this SB and ATI and Azalia in my configuration files and don’t understand if that’s a brand, sub-brand, chipset, or what.

If I had to guess, I would guess your desktop is Gnome, based on the massive number of pulse applications you have installed.

I’m using KDE. I had read something about needing something so I downloaded and installed. I realize that is probably not very intelligent, but thought I’d try it. Maybe the one giving advice was using Gnome? Now I see GStreamer is for Gnome and probably need to delete all the stuff. I tried using Yast and selected delete and it gave me a message about 900+ other messages about uninstalling it. I’ve seen some KDE programs which also require/include Gnome portions so don’t know if that’s true with GStreamer?

mid files are always a bit of a pain to get working nicely in Linux from what I recall.
Sorry to hear that. I have seen messages such as “Midi devices: NOT ENABLED IN CONFIG”. Don’t know how to enable them or if it’s related to mid files. But, maybe I’ve messed my system up so much one problem is interfering with another?

I’d like a clean slate, but that means all my existing stuff doesn’t work until I install and set them up again. And I can’t remember what things I’ve installed nor how I’ve set them up. I suppose that could be a good thing if what I did before caused problems with my system…

Note if you are using kmix as your mixer, you can add extra controls to it under the kmix > settings > configure channels menu control.

I don’t think it hurts to have both gstreamer sound engine and the libxine1 (xine) sound engine installed at the same time. It should add some extra flexibility, albeit at the cost of extra complexity.

I had added all of them and tried many permutations trying to get line-in sound to work. The Smart5.1 channel is not there.

I was trying playmidi and get “open /dev/sequencer: No such file or directory”. Maybe 11.2 uses a different device name and it wasn’t upgraded correctly? I have a /dev/snd/seq if that means anything. aplaymidi just sets there, maybe like it’s playing? I saw a program file called alsaconf so ran it (without thinking I changed anything) and now aplaymid says “open /dev/sequencer: No such file or directory”. playmidi still says can’t open /dev/sequencer.

Now when I look at my Multimedia system settings, the HDA ATI SB (VT1708S Analog) is grayed out and of course KMix has nothing in it. alsaconf must have deleted something. Will try rebooting and see what happens. Never understood if it’s analog or digital I should have. I’m starting to wonder if IEC958, SPDIF, HDMI are even things to concern me if I have my monitor connected with a DVI cable?

I came across alsaconf -P and get:
opl3sa2 cs4236 cs4232 cs4231 es18xx es1688 sb16 sb8

Would those be these “modules” to try in /etc/modprobe.d/50-sound.conf with a model= option? Or does that have anything to do with not getting the right channel available in KMix?

Just to back up for a second,

if you install qjackctl and jack ( a dependency of qjackctl I think), start qjackctl, start the jack server by hitting the play button, and connect “system” to “system” in the audio tab of the menu you get from clicking on “connection” of qjackctl, do you get full duplex audio?

If so there are several jack based audio mixers you can use instead of kmix, and audacity supports jack (preferences → devices maybe, I don’t know I’m not in front of my linux box.) This might or might not make sense depending what you want to do, but anyway you would have ruled out a hardware problem.

alsaconf is depreciated and should NOT be used with openSUSE-11.2 or later.

alsaconf creates an /etc/modprobe.d/sound.conf file that is NO LONGER USED in openSUSE-11.2 and later. Instead the file name has been changed to 50-sound.conf and alsaconf does not support that.

Do NOT use alsaconf.

I recommend you do not blindly run applications that you do not know what they do without either sufing to get the LATEST information, or simply asking on the forum.

MIDI playback can be a bit fiddly. A linux midi player application expects that it’s output will go to either 1) a physical midi port on a hardware midi device, such as an external synth OR 2) a software synth.

I think that you can play midi files directly from fluidsynth - have a look at this blog: My EeePC Blog: Play MIDI with fluidsynth in my EeePC

Paul

Yes, I figured it probably wasn’t a good idea. And now that you mention it, I seem to vaguely recall something about not running alsaconf elsewhere. Fortunately, rebooting seemed to take care of it and there’s no sound.conf file created. No line-in sound, but my system is back like it was.

I have installed some programs based upon the description and many times I’m just sitting there asking, now what. I find nothing in the menu list, no recently installed programs, nor searching through all items, there is nothing listed. For instance, the comment about fluidsynth, I looked through Yast and saw it was already installed previously. There is nothing on the menu, most likely because it’s not GUI. But, with it and others, looking at the file list in Yast, gives me a clue to what program to run. While some things I install is because I have instructions of how to run it, there’s others I look through the package groups and install (games, utilities, etc) and nothing happens afterwards even for some GUI applications. But, I do suppose when that happens, a good thing to do is find out what should be run.

First time I tried, I got several error message about not being able to open .so files which did exist. It said something about an undefined “init” symbol making me think a mismatch of versions? I downloaded the latest version and now those errors don’t happen. It does give messages about not locking down memory.

On the Audio tab, I have capture_1 and 2 for the output ports and playback_1 through 8 on the input ports. Connecting connects the first two of both lists. Nothing on the midi clients. The Alsa tab has “14:Midi Through Port-0” on both. KMid still produces no sound though looking like it’s playing.

Following Paul’s link, and starting fluidsynth from the command line also complains about not locking down memory and says errors with real-time scheduling, AcquireRealTime error and there’s no sound from midi files.

You mentioned other mixers? What are they called?

I suppose you know your mixer, as you posted in an early post, is not setup for line in. I note this:
Simple mixer control ‘Input Source’,0
Capabilities: cenum
Items: ‘Stereo Mixer’ ‘Mic’ ‘Front Mic’ ‘Line’
Item0: **‘Mic’**According to that it is setup for your Mic and NOT for Line-in.

I have hinted at this question a few times, but now I’m just going to ask it: what are you trying to do?

It sounds to me like you’re trying to set up a karaoke type deal, where you can sing over midi playback, and have it all come out of the speaker jack of your computer, but that is just a wild guess.

If what you are trying to do is much simpler, there probably is a way to do it that is much simpler than the instructions here. I would look into using fluidsynth with the -F option, you will still need a soundfont (see below.)

But, if that is what you are going for, here goes:

As a quick fix for this you can run it as root, but the better solution is to use the audio group and fix up your /etc/security/limits.conf. Actually, I wrote a blog post about this when I finally got this stuff up and running, it’s at Malcolm’s Piano Stuff: How to get Rosegarden/Jack/Fluidsynth working on openSUSE. Only the text that actually goes into limits.conf isn’t good there, I am currently using:


@audio - rtprio 90
@audio - nice -10
@audio - memlock unlimited

On the Audio tab, I have capture_1 and 2 for the output ports and playback_1 through 8 on the input ports. Connecting connects the first two of both lists.

Did this work? It should have caused the mic to get played out to the speakers.

Nothing on the midi clients. The Alsa tab has “14:Midi Through Port-0” on both. KMid still produces no sound though looking like it’s playing.

I don’t know if KMid can be made to work with this set up, I might check it out at some point this weekend though (I am looking for something more light weight than Rosegarden for some instances.) Basically you should be able to follow the directions in the above, and use Rosegarden sort of as a gui for the .mid files by using it to import midi files. But to be honest I don’t know how that would work, I’ve always started from scratch. Anyway running fluidsynth from the terminal to play the midi file will probably work.

Following Paul’s link, and starting fluidsynth from the command line also complains about not locking down memory and says errors with real-time scheduling, AcquireRealTime error and there’s no sound from midi files.

This should get fixed along with jack for the memory lockdown, as for the timing you are probably not running a realtime kernel. I suggest trying the desktop kernel, it works for me.

You mentioned other mixers? What are they called?
There is a whole list of jack applications at Applications using JACK | JACK, all of them that I have looked at have worked on linux (jack also works on OS X). There is a mixer section there, to be honest I haven’t used one because most of what I’ve done so far has been too simple to really require it.

Is there any way to make it set up for Line-In? I do notice on KMix it has two “capture” sliders.
There is also an Input Source option that allows you to choose Stereo Mixer, Mic, Front Mic, Line which probably is what the above shows. Choosing any of them does not appear to be useful. Even when I have the headphones plugged in the front which I can hear the sound through, changing the Input source has no effect.

No karaoke here. I would like to hear the stereo from the other room on my computer speakers. I would also like to record sound from records and tapes.

As far as the midi playback goes, I had downloaded Rosegarden wishing to create music, but finding it didn’t do anything, I tried a few others and NoteEdit. After it dawned on me that all of these were using something with midi, and since midi files never have played, I decided the problem wasn’t with Rosegarden.

As a quick fix for this you can run it as root, but the better solution is to use the audio group and fix up your /etc/security/limits.conf. Actually, I wrote a blog post about this when I finally got this stuff up and running, it’s at Malcolm’s Piano Stuff: How to get Rosegarden/Jack/Fluidsynth working on openSUSE. Only the text that actually goes into limits.conf isn’t good there, I am currently using:


@audio - rtprio 90
@audio - nice -10
@audio - memlock unlimited

After the memory lock messages, I thought I had tried as root, but still the same. I got a mic and plugged it into the back and then into the front but nothing out the speakers.

You had asked:

start the jack server by hitting the play button, and connect “system” to “system” in the audio tab of the menu you get from clicking on “connection” of qjackctl, do you get full duplex audio?
Did this work? It should have caused the mic to get played out to the speakers.

It connected lines from the two capture ports to two of the eight playback ports, but no sound from line in, full duplex or otherwise.

When I start up qjackctl, I get error messages
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started

When I try qsynth, sometimes I see it blink and other times it shows an error (when run before qjackctl?).
Qsynth1: Failed to create the audio driver (jack). Cannot continue without it.
jack_client_new: deprecated
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
fluidsynth: error: Jack server not running?

I tricked it and loaded qsynth before qjackctl and canceled the error message. Then I loaded qjackctl. Then I pressed start on qsynth and it disappeared.

If I run fluidsynth from the command line, I get
lash_open_socket: could not connect to host ‘localhost’, service ‘14541’
lash_comm_connect_to_server: could not create server connection
Connected to JACK server with client name ‘LASH_Server’
Opened ALSA sequencer with client ID 129
Listening for connections
Created project project-1 in directory xxxxxx/project-1
Added client 7065f81b-638b-4628-a92c-f9449ad0564b of class fluidsynth to project project-1
jack_client_new: deprecated
fluidsynth: warning: Jack sample rate mismatch, expect tuning issues (synth.sample-rate=44100, jackd=48000)
Client 7065f81b-638b-4628-a92c-f9449ad0564b removed from project project-1
Project project-1 removed

I installed Rosegarden again and tried following the steps. But when it says
“Make sure that your synth is going where you want it to go, for playback send it to system”
I don’t know what that means. On the audio tab, there is fluidsynth not connected to anything, rosegarden with master L & R connected to system playback 1 & 2, system capture ports connected to rosegarden record in 1 L & R. Is that right?

The Alsa tab has 14:Midi Through connected to itself on the right, 130:rosegarden 3: out1 and 4: out2 both connected to 129:FLUID Synth (6200).

I haven’t a clue on any of this let alone whether it is where I want it to go.

On Windows (and not saying I want to go back to that), I just double clicked a .mid file and it played. All this synthesizers, ports, sound fonts and connections seem very confusing to me and I don’t grasp the concept. I suppose windows may have some of this built in? Like I think I’ve said, I used timidity or something of the sort and could play a mid file from the command line, but fluidsynth didn’t. It’d be nice to play it in a player. If I should ever get this working, will I have to load two or three different programs before playing a mid file, but playing an mp3 I only have to double click it?

dt30:

Are you able to post some screen-shots of your qjackctl connections. For me, at least, it will be easier to make suggestions if I can see the layout of your sound devices. (Hint - try the Print Screen button on your keyboard)

I have Rosegarden working to play back midi files. I use qsynth (graphic front-end for fluidsynth), which you need to have set up with a sound font (sf2). That said, I am no expert in Rosegarden or with midi in general.

I start the programs in this sequence: qjackctl (to get jackd started), qsynth, then Rosegarden.

I find it is helpful to think of the pieces of software as actual pieces of hardware equipment (like a pro-sound set up). You need a player/composer (Rosegarden), a synthesizer (qsynth) and an amplifier with speakers (your ALSA sound card output).

jackd (with the graphic qjackctl front-end) provides you with the “wires” to connect all the pieces, and you therefore need to correctly connect the inputs and outputs to get sound at the end.

This is certainly not a single-click playback solution for midi (and I am not sure that one actually exists for Linux). However, it is very powerful and well suited to the needs of the musician or sound engineer.

Paul

You can play midi with the Audacious audio player, available through Packman repo.

I don’t have time to write comprehensive instructions right now, but you basically need these packages:

audacious
audacious-plugins
audacious-plugins-input-fluidsynth
other audacious support libraries (may automatically select).

(I don’t think that you actually need to install the stand-alone fluidsynth package. As I do have fluidsynth installed, I can’t actually say. Try installing audacious as described and see how you get on.)

You will need a sound font. There are many available for free download - google is your friend.

Start audacious. Click on File -> Preferences -> Plugins. Select the AMIDI plugin and click Preferences.

Click the AMIDI tab, and click FluidSynth Backend.
Click the FluidSynth Backend tab to configure it with the Sound Font that you have somewhere.

After all that, midi files should play as desired. jack is not needed here.

You can configure your desktop to make audacious the default playback program for your midi. Of course, audacious plays all kinds of other audio as well.

Hopefully that will get you going. Paul