[SOLVED] HDMI out + USB Mic in + OK Google

Moderators: mdrjr, odroid

[SOLVED] HDMI out + USB Mic in + OK Google

Unread postby OldGaf » Thu Jan 19, 2017 12:54 am

Hi,

I am using my C2 as an android media box and it works great!
I would like to add a mic and get voice search / commands working.

I think I have 2 USB sound adapters somewhere in storage.
My questions are:
1. Can I use the USB sound adapter without interfering with the sound out of the HDMI?
2. Are we able to get things like "OK Google" working via USB mic?

Thanks,
-OG-
Last edited by OldGaf on Sun Mar 19, 2017 3:16 am, edited 2 times in total.
Thanks,
-OG-
User avatar
OldGaf
 
Posts: 72
Joined: Fri Sep 25, 2015 11:06 pm
languages_spoken: english
ODROIDs: U3 C2

Re: HDMI out + USB Mic in + OK Google

Unread postby OldGaf » Thu Jan 19, 2017 6:55 am

OK... so I got voice search working, but as feared, the sound no longer goes through HDMI as it expects to have sound through the USB adapter.
Is there some terminal commands I can use to tell it to use HDMI for sound out?
Thanks,
-OG-
User avatar
OldGaf
 
Posts: 72
Joined: Fri Sep 25, 2015 11:06 pm
languages_spoken: english
ODROIDs: U3 C2

Re: HDMI out + USB Mic in + OK Google

Unread postby Tungmeister » Fri Jan 20, 2017 11:31 pm

I'd like to know this as well, being able to use the HDMI out for audio (with a converter) and the USB for mic would be ideal for me as it gets around the audio issues with USB devices for my car setup.
Tungmeister
 
Posts: 27
Joined: Wed Oct 19, 2016 3:06 am
languages_spoken: english

Re: HDMI out + USB Mic in + OK Google

Unread postby odroid » Sat Jan 21, 2017 10:52 am

We are trying to find a solution now. But it doensn't seem to be easy to disable the audio output function with keeping the audio input function in a single USB sound card.
Android audio framework layer is not so flexible. Anyway, we will keep trying to find a solution.

BTW, I remember the USB webcam microphone input with HDMI audio output worked well.
But it might not be a solution for you guys.
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: HDMI out + USB Mic in + OK Google

Unread postby Luke.go » Mon Jan 23, 2017 3:43 pm

Hi there!
You can do it by editing some lines in the audio_policy.conf file.
First of all, you should edit files by cli.

Here is commnads.

On Odroid.
Code: Select all
$ adb shell mount -o remount,rw /system
$ cd /system/etc
$ vi audio_policy.conf


Please comment out a few lines.

/system/etc/audio_policy.conf
Code: Select all
.
.
.
  usb {
#    outputs {
#      usb_accessory {
#        sampling_rates 44100
#        channel_masks AUDIO_CHANNEL_OUT_STEREO
#        formats AUDIO_FORMAT_PCM_16_BIT
#        devices AUDIO_DEVICE_OUT_USB_ACCESSORY
#      }
#      usb_device {
#        sampling_rates 44100
#        channel_masks AUDIO_CHANNEL_OUT_STEREO
#        formats AUDIO_FORMAT_PCM_16_BIT
#        devices AUDIO_DEVICE_OUT_USB_DEVICE
#      }
#    }
    inputs {
      usb_device {
        sampling_rates 8000|11025|16000|22050|32000|44100|48000
        channel_masks AUDIO_CHANNEL_IN_MONO
        formats AUDIO_FORMAT_PCM_16_BIT
        devices AUDIO_DEVICE_IN_USB_DEVICE
     }
   }
  }
.
.
.


As you can see, comment out the output lines.

I hope it works out!
Luke.go
 
Posts: 236
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english

Re: HDMI out + USB Mic in + OK Google

Unread postby OldGaf » Tue Jan 24, 2017 1:51 am

Awesome!

I am away for a next few days but will try this once I get home.

Thanks :)
Thanks,
-OG-
User avatar
OldGaf
 
Posts: 72
Joined: Fri Sep 25, 2015 11:06 pm
languages_spoken: english
ODROIDs: U3 C2

Re: HDMI out + USB Mic in + OK Google

Unread postby odroid » Sat Feb 04, 2017 11:06 am

@OldGaf
Could you confirm if it works or not?
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: HDMI out + USB Mic in + OK Google

Unread postby OldGaf » Sun Mar 19, 2017 2:57 am

odroid wrote:@OldGaf
Could you confirm if it works or not?


Very sorry for the long delay... I have been side tracked trying to find a way to change the mouse courser.

Yes.... this works like a charm... very easy fix.
Thanks Luke.go!! :)
Thanks,
-OG-
User avatar
OldGaf
 
Posts: 72
Joined: Fri Sep 25, 2015 11:06 pm
languages_spoken: english
ODROIDs: U3 C2

Re: HDMI out + USB Mic in + OK Google

Unread postby OldGaf » Sun Mar 19, 2017 3:00 am

Luke.go wrote:Hi there!
You can do it by editing some lines in the audio_policy.conf file.
First of all, you should edit files by cli.

Here is commnads.

On Odroid.
Code: Select all
$ adb shell mount -o remount,rw /system
$ cd /system/etc
$ vi audio_policy.conf




Please comment out a few lines.

/system/etc/audio_policy.conf
Code: Select all
.
.
.
  usb {
#    outputs {
#      usb_accessory {
#        sampling_rates 44100
#        channel_masks AUDIO_CHANNEL_OUT_STEREO
#        formats AUDIO_FORMAT_PCM_16_BIT
#        devices AUDIO_DEVICE_OUT_USB_ACCESSORY
#      }
#      usb_device {
#        sampling_rates 44100
#        channel_masks AUDIO_CHANNEL_OUT_STEREO
#        formats AUDIO_FORMAT_PCM_16_BIT
#        devices AUDIO_DEVICE_OUT_USB_DEVICE
#      }
#    }
    inputs {
      usb_device {
        sampling_rates 8000|11025|16000|22050|32000|44100|48000
        channel_masks AUDIO_CHANNEL_IN_MONO
        formats AUDIO_FORMAT_PCM_16_BIT
        devices AUDIO_DEVICE_IN_USB_DEVICE
     }
   }
  }
.
.
.


As you can see, comment out the output lines.

I hope it works out!



Works!
Thanks much, you rock!
Thanks,
-OG-
User avatar
OldGaf
 
Posts: 72
Joined: Fri Sep 25, 2015 11:06 pm
languages_spoken: english
ODROIDs: U3 C2

Re: <Resolved> HDMI out + USB Mic in + OK Google

Unread postby OldGaf » Sun Mar 19, 2017 3:15 am

BTW... I just used the app "Root Explorer" and edited the file.
Now to get the new assistant working.... :P
Thanks,
-OG-
User avatar
OldGaf
 
Posts: 72
Joined: Fri Sep 25, 2015 11:06 pm
languages_spoken: english
ODROIDs: U3 C2

Re: HDMI out + USB Mic in + OK Google

Unread postby Droidzilla » Sat Apr 22, 2017 8:43 am

Luke.go wrote:Hi there!
You can do it by editing some lines in the audio_policy.conf file.
First of all, you should edit files by cli.

Here is commnads.

On Odroid.
Code: Select all
$ adb shell mount -o remount,rw /system
$ cd /system/etc
$ vi audio_policy.conf


Please comment out a few lines.

/system/etc/audio_policy.conf
Code: Select all
.
.
.
  usb {
#    outputs {
#      usb_accessory {
#        sampling_rates 44100
#        channel_masks AUDIO_CHANNEL_OUT_STEREO
#        formats AUDIO_FORMAT_PCM_16_BIT
#        devices AUDIO_DEVICE_OUT_USB_ACCESSORY
#      }
#      usb_device {
#        sampling_rates 44100
#        channel_masks AUDIO_CHANNEL_OUT_STEREO
#        formats AUDIO_FORMAT_PCM_16_BIT
#        devices AUDIO_DEVICE_OUT_USB_DEVICE
#      }
#    }
    inputs {
      usb_device {
        sampling_rates 8000|11025|16000|22050|32000|44100|48000
        channel_masks AUDIO_CHANNEL_IN_MONO
        formats AUDIO_FORMAT_PCM_16_BIT
        devices AUDIO_DEVICE_IN_USB_DEVICE
     }
   }
  }
.
.
.


As you can see, comment out the output lines.

I hope it works out!



Can something be changed here to enable 5.1 or 7.1 out?
Droidzilla
 
Posts: 74
Joined: Thu Oct 20, 2016 2:12 am
Location: USA
languages_spoken: english
ODROIDs: Xu4

Re: [SOLVED] HDMI out + USB Mic in + OK Google

Unread postby OldGaf » Wed Apr 26, 2017 10:37 pm

In order to have 5.1 or 7.1 audio out, you need to have the hardware to support it.
In other words besides needing the chipset on the board, you would need a place to plug in all those speakers.
User avatar
OldGaf
 
Posts: 72
Joined: Fri Sep 25, 2015 11:06 pm
languages_spoken: english
ODROIDs: U3 C2


Return to Android

Who is online

Users browsing this forum: No registered users and 1 guest