Merge 2 sound cards into one virtual driver - macos

currently i am using Macbook Pro and Macosx 10.8.2
3 days ago , i bought a DJ controller soon after i realized that that controller hasnt got any buildin sound card.
i connect that device to macbook through usb port.
Everything is fine , i can do my mix using macbook builtin sound card and 5+1 sound system.But the problem is , Most djs do cue which means another sound output needed for their headphones in order to do a smooth transition between sounds.
so i bought a cheap usb sound card.and i plugged my headphone to that.
Mixing software is so dumb that it doesnt have any ability to manage two sound card at the same time.
So i figured out that if i write a virtual sound card driver that has two virtual stereo outputs , I could merge builtin macos sound card and usb sound card into the that virtual driver.
What i 've done so far :
started to read I/O Kit framework.
what i am planning to do:
actually i dont really understand which I/O Kit family to inherit
i may try first to implement PCI family or USB family inheritance to the driver
Another thing is , What i understood so far , in my virtual driver i must clearify device ids and devices' bus adresses in order to forward builtin card to virtual output1 and usb sound card to virtual output 2
any help would be appreciated
just show me the lights , i can drive by myself.

You don't need to write a driver or do any programming at all. Just create an aggregate device using the audio midi setup utility.
http://support.apple.com/kb/HT3956

Related

OSX Wine program not recognizing USB device

I'm trying to use CSR BlueFlash to dump the firmware/upload new firmware to a JBL Flip 3 speaker. I've put the speaker into DFU mode and it shows up in the OSX ioregistry (see below):
but when I try to run BlueFlash, no USB devices are found. Looking in ~/.wine/dosdevices, there are no COM<number> symlinks. In fact, I don't believe there are any /dev/tty devices corresponding to the USB device. I've tried many different USB port numbers (like idProduct and bcdDevice) but BlueFlash finds no USB devices with that number.
I have seen a project where someone got BlueFlash to recognize the device with a JBL Flip 4 so I am fairly certain that what I am trying to do is possible.
Does anyone know how to get Wine on OSX to recognize a USB device?

Bluetooth MIDI - Windows

I am trying to connect a Bluetooth Low Energy enabled MIDI hardware to wirelessly send data to a Windows PC and get it to detect as a MIDI device in Windows. Currently, the device is able to pair with my Windows 10 laptop and I am able to read the incoming data off of it.
The same hardware is configured and working fine as a wireless MIDI device on Mac and iOS devices(which natively supports MIDI over Bluetooth). I am trying to get this feature implemented on Windows(which doesn't support MIDI over Bluetooth, although it was promised in Windows 10).
The device, when is paired, is showing up in the 'Bluetooth devices' section in device manager, I am trying to make this device showing up as a MIDI device in 'Sound, video and game controllers' section.
Any help/resources somebody can provide to help me crack this problem is highly appreciated.
Following is my current thought process to implement this.
Pair the device and read the data off of it. (Already implemented)
Create a virtual MIDI port. (Don't know how to implement this, I am currently checking out rtpMIDI)
Send the MIDI data which was read from the BLE device to the virtual MIDI port. (Still don't know how to implement this)
Any suggestions/comments on the above thought process as I am absolutely new to Windows Driver Development.

Identify Windows USB Sounddevice by physical USB port connection

When I connect several USB audio devices using the default drivers I usually end up with some kind of friendly device description like "nn- USB Audio codec" or something else, so I have currently no unique property which refers to a specific hardware the e.g. manufacturer ID. I would like to ensure that in case of re-enumerating or replugging the hardware to a different port that my software will automatically identify the changed windows audio device which maps to this hardware. I there a possibility to gather further windows audio device information which can be used to determine the physical hardware ?
Maybe a little clarification is needed:
I have two or more USB audio devices, not necessarily same product or manufacturer. The audio connections have different purposes, so I want to ensure that I my software uses constantly the same physical audio devices for different tasks. This sometimes fails when a re-enumeration occurs ( sometimes without changing the physical USB port connections, it's a windows thing...)
Ideally I would distinguish them by an individual serial number, which usually is only available with storage devices. But what I can retrieve is the "physical" USB topology when I'm looking at the device with a tool such as USBDeview from Nir Sofer. There I have a property like "Hub 3, Port1". If I could map this to a sound device I get from audio audio api like "nn- USB Audio codec" as seen in the sound control panel I would be perfectly happy.
Edit2:
May be this[1] post helps here, but I still have to figure out how to get a USB Port <-> Windwos Sounddevice mapping.
[1]: Can the physical USB port be identified programatically for a device in Windows? "

Directshow - Identify built-in (integrated camera) vs external USB camera

Are there any PC camera hardware experts who happen to know if a built-in (intergrated) camera on a PC has any special identifying features , as opposed to an external USB camera?
I'm looking for anything that would help me ascertain for sure that the device is indeed built-in to the PC and was not connected by the user.
I've gone over every device property in the device manager for both kinds of webcams but could not identify anything helpful.
Even something as simple as a USB connection order (maybe the built-in camera would be "connected" first on boot?)
I'm a USB noob so please bear with me...
I don't think that you can do that. On some laptop models, the "internal camera" is in fact wired to an internal usb hub. This is what I realized when I opened my ASUS EEE 901 a few years ago. I am pretty sure this is a common scheme since many camera dev kits come with usb output

USB Debugging

I'm looking for a very specific USB device for debugging systems that may use USB but not with a regular computer (proprietary hardware). I want a device that has a USB host controller and two USB device connections. The device to be debugged is connected to the USB host controller and one of the device connections is connected to another device with it's own host controller on it. The the other device connection is connected to a pc. The point being that all USB data travelling through the device (from the device connected to the host controller to the device connected to the first device connection) is reported to the pc.
I'll happily write software to do the logging (in fact I want to) but I can't seem to find a board like this anywhere. Can anyone help?
I have an Ellisys USB analyser, which isn't exactly what you describe internally, but does sit between a peripheral and a host and use a separate PC to collect the data.
(i.e. it has two 'B' and one 'A' connectors on it.)
Excellent product, and very helpful company.
Sniffing the USB shouldn't be too hard if you have the right hardware. And that is the tricky question. I haven't seen anything that describes the USB breakout box that you want. However I can say that this is in the realm of the following two magazines:
Nuts and Volts
Circuit Cellar
If they don't have a USB breakout box project in their archives, then at least they will have advertisements for small cheap single board computers that would have multiple USB ports that you can use for buffering the signals and reporting it back to your PC.
Alternatively is it possible to just wire your PC up to the middle of your two devices and write a custom drive that echos data back and forth while sniffing off a stream for you?
Sorry for the long delay in my reply -- I checked out one of our USB developer's toolchain, and he uses a Beagle USB Sniffer. He seems happy with it.
You're looking for a USB device with two upstream outputs. I think according to the USB spec, this is not possible. You will have two USB hosts trying to send messages and control the USB devices at the same time.
What if you were to look for a device which allowed you to view the data going through a hub via something other than a usb output?
If you're building something custom, take a look at this USB chip site. The chips are programmable via a windows application. Once you define how you want it to operate, it's saved on an EPROM on the dev board ($30-$50).
Sorry if this isn't helpful!

Resources