You are not logged in.

#1 2012-04-15 00:10:47

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Sound card has no Mix device. Can alsa simmulate one?

Hey,

As the subject says, my sound card

00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)

doesn't have a "Mix" device from which to record "what-you-hear" sound. I've read into the subject, and keep seeing Pulse mentioned. However, I'd like to avoid switching to Pulse, if at all possible. Is alsa capable of creating a "virtual mix device" or some such contraption?


Fear me! I have root! Sometimes...

Offline

#2 2012-04-15 00:24:23

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Sound card has no Mix device. Can alsa simmulate one?

I think you mean "Mic" - a short version of "microphone".

Does your soundcard have a microphone, or not?

Offline

#3 2012-04-15 00:43:55

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: Sound card has no Mix device. Can alsa simmulate one?

I actually mean "mix", which is a device sound cards carry to allow recording of sound output. Essentially, it's an input device that feeds whatever you hear on the speakers.


Fear me! I have root! Sometimes...

Offline

#4 2012-04-15 00:53:15

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Sound card has no Mix device. Can alsa simmulate one?

As far as I know, that Mix you refer is sometimes called "What you hear" in other OS's and I suppose that is always virtual (implemented at the driver level, nothing to do with the hardware). If you use only alsa you may be interested in this [1].

If you use pulseaudio its just a matter of selecting the monitor of the output you want to record.

[1] https://bbs.archlinux.org/viewtopic.php?pid=765075


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2012-04-15 15:50:42

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: Sound card has no Mix device. Can alsa simmulate one?

I had read that, and the loopback concept came off as rather interesting. Besides being fairly complex, it seems that if you expect to hear what you are recording, then only on application can be sending sound to the card at a time, which might come in the way.

I suppose if that's the only thing there is, I'll have to bite the pulseaudio bullet.

Thanks for your suggestions smile


Fear me! I have root! Sometimes...

Offline

#6 2012-04-15 20:35:14

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Sound card has no Mix device. Can alsa simmulate one?

Only one? Hopefully dmix and dsnoop can help.

Offline

#7 2012-04-15 20:51:03

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: Sound card has no Mix device. Can alsa simmulate one?

kazuo wrote:

you cant use dmix with multi, so with this setup only one app can output sound.

Or such he claims.


Fear me! I have root! Sometimes...

Offline

#8 2012-04-17 23:18:45

pigiron
Member
From: USA
Registered: 2009-07-14
Posts: 150

Re: Sound card has no Mix device. Can alsa simmulate one?

After spending a whole bunch of time, I was able to create a hardware loopback using ALSA that allows recording all of "what-you-hear".

Like most modern motherboards, mine also had a "HDA Intel" audio controller, but that's only half the hardware. You should also have a "codec" chip that the HDA Intel chip controls.

My codec chip is a  Realtek ALC662. So it all started by using some google-fu to download the PDF datasheet for this chip. Looking at the block diagram in that document showed that there were indeed "virtual wires" that connected the audio outputs (play) back to the audio inputs (capture).

Downloading, compiling, and firing up the "hda-analyzer" program showed that those "virtual wires" simply were not turned on. So I used that same program to "connect" the wires, unmute some of the newly connected nodes, then messed with alsamixer until it all worked.

The "hda-analyzer" program has a great feature that can create a Python script of the changes you've made. This is super because your changes will disappear on a reboot (unless you jump through even more hoops).

I found that sometimes if I left the hardware loopback device connected for a somewhat long period of time, a minor "hummmm..." could be heard from my speakers when no music was playing. So I'm totally guessing this is the reason why the ALSA developers don't have this loopback "wired" by default. So I simply created one Python script that turns on the loopback, and then another that turns it off.

Anyway, it works great, and if you're lucky (your codec chip has virtual "loopback" wires), and you roll up your sleeves and get really, really "dirty" in the ALSA and audio hardware mud, you just may be able to do the same thing on your system.

Last edited by pigiron (2012-04-17 23:26:45)

Offline

#9 2012-04-18 02:17:23

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: Sound card has no Mix device. Can alsa simmulate one?

Well yes, it makes sense that this kind of consumer grade hardware is a little cut short in terms of "advanced" functionality. After all, most people will only ever use it to listen to youtube videos anyway.

I'll be looking into this program you mention. It sounds very interesting. Thanks for bringing it up!


Fear me! I have root! Sometimes...

Offline

Board footer

Powered by FluxBB