Jump to content

Multiple audio in and out


Technicavolous
 Share

Recommended Posts

Of the boards supported by Armbian, which do you prefer for multiple audio devices and audio related applications?

 

I need to control two audio streams, in and out each and add information to the streams as appropriate. I would like to use as little external hardware as possible so stereo mic or dual mic input and stereo out would be awesome. I'm a little overwhelmed by the choices, so opinions are definitely welcome here.

 

Link to comment
Share on other sites

Donate and support the project!

I've always been using external USB audio adapters for recording audio. Seems many boards have trouble with recording clean sound, or even outputting good sound over the audio jack. 
The NanoPi M4V2 now should have audio in on the jack as audio out(don't think that works yet in armbian). You could use the jack for stereo input, and the hdmi audio for output. There's hdmi connectors that breakout the audio onto a jack. 
Otherwise the boards made for kiosk can do that. I've seen boards with double mic and amplified audio out left and right. Also the Atomic Pi has this. 
Or an audio hat could help too. 

I've got a presonus USB Audio Box. This has 2 channels input. But this is for recording music at low latency.  

Link to comment
Share on other sites

Hi,

 

to get multiple audio in/out channels without a hassle, external USB box is the best choice.

 

Otherwise you will have to deal with some add on board like that one https://www.aliexpress.com/item/32811806978.html

It use an Analog Device AD1938 which has a linux kernel driver support and offer 2 stereo IN/4 stereo OUT

 

But device tree for that has to be written as I didn't find anything from my extensive search through the internet about that and dealing with I2S, and maybe TDM, is a big pain imho, see that post (many thanks to Guidol, I've got a cheap -3 bucks- aliexpress pcm5102 card working on a nanopi K1 plus)

 

Note: https://github.com/ctag-fh-kiel/ctag-face-2-4/tree/master/device-tree-overlays 

could be a starting point for that (it is for beaglebone sbc) 

 

Edited by le51
add a note
Link to comment
Share on other sites

I'm back on this ... they ended up using a Pi and these boards -

http://www.audioinjector.net/rpi-zero

https://fe-pi.com/products/fe-pi-audio-z-v2

 

But they STILL can't beat the heavy lifting that armbian-config does for us.  (thanks!!) 

Multiple USB audio sticks just didn't do the trick, a physical problem I'll leave out of this conversation.

 

I've looked at other posts where people do things with the device tree overlay. Yeah, that's overlay'ed over my head unless someone holds my hand through it.

 

SO - I'll buy someone the boards and a couple beverages or whatever you would like to get one of these or any gpio audio board working with ANY Armbian supported board. We have lots of Armbian supported hardware here and if you choose one we don't then we'll get one or two.

 

I'm at the point to pay someone to get one going for me.  Feel free to send a direct message.

Link to comment
Share on other sites

Hi,

 

I bought a module on aliexpress which is more or less the same as the audioinjector zero : https://www.aliexpress.com/item/1674210328.html

Both use the wm8731 audio codec. It provides stereo line input, and microphone input (Note that uou can't use them simultaneously), headphone and stereo line outputs.

Codec is supported by linux kernel.

 I've managed to get it recognized by armbian on a nanoPi K1 plus with 4.19.83-sunxi64 self build kernel (aplay -L and arecord -L have shown the interface) after some manipulations but unfortunately:

1/ I had no sound output (didn't tried the record feature) , maybe because board is sold without any crystal oscillator soldered on it

2/ I've lost the board :-( 

 

Now some guidelines: the post I've mentioned above is really helpful

- check that the i2s channel you want to use is enabled (status: "okay";)

- see in /lib/modules/YourKernelVersion/kernel/sound/soc/codecs/ if snd-soc-wm8731.ko is there otherwise you will have to compile it

- the dts file I've used for that (you will have to adjust it regarding your hardware) with "armbian-add-overlay wm8731.dts" :

## file wm8731.dts
/dts-v1/;
/plugin/;

/ {
	compatible = "allwinner,sun8i-h3";


    fragment@0 {
        target-path = "/";
        __overlay__ {
            wm8731: wm8731 {
                #sound-dai-cells = <0>;
                compatible = "wlf,wm8731";
                status = "okay";
		wm873x,format = "i2s";
            };
        };
    };

 

	fragment@1 {
		target = <&i2s0>;
		__overlay__ {
			status = "okay";
			pinctrl-0 = <&i2s0_pins>;
			sound-dai = <&wm8731>;
			pinctrl-names = "default";
		};
	};

	fragment@2 {
		target-path = "/";
		__overlay__ {
		
			sound {
				compatible = "simple-audio-card";
				simple-audio-card,name = "wm8731-hifi";
				simple-audio-card,format = "i2s";
				simple-audio-card,bitclock-master = <&codec_master>;
				simple-audio-card,frame-master = <&codec_master>;
				simple-audio-card,widgets =
					"Headphone", "Headphone Jack",
					"Microphone", "Microphone Jack",
					"Line", "Line Jack";
				simple-audio-card,routing =
					"Headphone Jack", "RHPOUT",
					"Headphone Jack", "LHPOUT",
					"LLINEIN", "Line Jack",
					"MICIN", "Mic Bias",
					"Mic Bias", "Microphone Jack";

				simple-audio-card,cpu {
					sound-dai = <&i2s0>;
					system-clock-frequency = <12000000>;
				};
				codec_master: simple-audio-card,codec {
					sound-dai = <&wm8731>;
					system-clock-frequency = <12000000>;
				};
			};
		};
	};
	fragment@3 {
		target = <&i2c0>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			wm8731@1a {
				#sound-dai-cells = <0>;
				compatible = "wlf,wm8731";
				reg = <0x1a>;
				status = "okay";
			};
		};
	};
};

Hope this helps.

Link to comment
Share on other sites

That board has a 12.288 MHz crystal. You'll have to adjust the clock settings accordingly in the dts file.  The sample rate will be 44100 hz.

 

Btw, did you notice that mikroe's proto board only has got one microphone input ?

Link to comment
Share on other sites

18 hours ago, le51 said:

Btw, did you notice that mikroe's proto board only has got one microphone input ?

Yes, after I posted it ... nice though, I learned more about the chip from that board. They printed their schematic and it clearly shows it's only attached to the mic in, but there are left and right line in. So another board with the same chip should handle it.

 

I guess it finally got through my head that the boards I have already use the wm8731.  I broke out my PineH64B and Tinkerboard each of which I think have the Pi2 bus so the pinout should be compatible.

 

On 2/29/2020 at 8:57 AM, le51 said:

the post I've mentioned above is really helpful

Yes I've read @guidol 's post numerous times. It is just now beginning to sink in, thank you for (again) pointing it out to me. Like I said, I'm solid once I learn something, but this is new to me and will take a bit of pounding to get it through my head.

 

On 2/29/2020 at 8:57 AM, le51 said:

- see in /lib/modules/YourKernelVersion/kernel/sound/soc/codecs/ if snd-soc-wm8731.ko is there otherwise you will have to compile it

I'm making this post from my PineH64B and snd-soc-wm8731.ko is not there. Guess I'll learn to compile a ko file.  The wm5824, wm8782 and wm8904 are listed though I couldn't find any board with those chips in a quick search.

 

On 2/29/2020 at 8:57 AM, le51 said:

2/ I've lost the board :-(

If you are willing to do a little hand holding I'll be happy to send you one, PM me your address and I'll have one dropped from Amazon. This project will benefit a bunch of Amateur Radio operators so I'm willing to invest a bit to make it go a little quicker.

Link to comment
Share on other sites

@le51 if you click the 'Reveal Hidden Contents' under one of my posts you will see my sig which has most of the boards I regularly mess with. If there's one on the list you would prefer me to use let me know.

 

I'd like to use the Tinkerboard, PineH64B, C2 and RockPro64.  I'm not sure the C2 has a 'normal' Pi2 header. That's not really a problem though as one can individually jump the I2C and SPI lines. 

 

I have the PineH64B sitting on the desk but it is currently 'No Official Support.' The RockPro64 has a PCIe(?) slot and I have a soundcard for it so I think it best to start with the Tinkerboard.


Current Tinkerboard Download - Bionic Desktop with 5.4 or 4.4 ? I assume 5.4?


Starting from a clean install and update, what to do first?

Link to comment
Share on other sites

I’m new here, and a newby of Armbian.  I would like at least 2 audio inputs and two audio outputs, I have a nanopi neo3 it has I2C and I2S. Do you know if there are some drivers for  audio codec that could work with this board. If yes can you tell me please which could I use, if not please can you tell me some tips to follow to build the software bridge between the soc_rockchip_i2s and tlv320aic31xx (for example) or some other (codec) board available. Best regards.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...