Discussion:
Android x86 8.1 rc2 and Intel Nuc USB Audio card issue
Gabriel M
2018-09-07 13:09:04 UTC
Permalink
Hello, I am using an Intel NUC 7i3BNH with Android x86 8.1 rc2.

I am 100% sure that the USB audio card works (because it works with Android
x86 7.1 r2). But I can't figure how I can make it working with the 8.1.

With the 7.1, I boot and it works. With the 8.1 I have to go to the
terminal and types theses commands to have the audio output working:

setprop hal.audio.out pcmC2D0p
killall audioserver

I tried this for the input :

setprop hal.audio.in pcmC2D0c
killall audioserver

But it does not work.

What am I doing wrong please ?

Thank you !

Here is some commands output:

logcat
<https://docs.google.com/document/d/e/2PACX-1vRQTxKeix3HzNFo0_-TiirRFgw8vIFRL05J_CTE3IyqYfRF1ruTsoq4sKTW6GJTARuhN8zby1BVTYAD/pub>
ls -l /dev/snd
<https://docs.google.com/document/d/e/2PACX-1vSQBYrDgYyGSGndbTfsoo3wIUGJgxJeiae42SCRbfGLetPaDAtEhOhjtav2Sn5eCHlCBTPMsAjDnYzt/pub>
alsa aplay -l
<https://docs.google.com/document/d/e/2PACX-1vRn5lSpKEld1TxROivxpY5jLPx53OjCvwNaYvV--pzMpdiNGw1xoSaaGO6FA9-bCjTwT8Jawir_zyf2/pub>
alsa_amixer -c 1
<https://docs.google.com/document/d/e/2PACX-1vQAP7hnuFAPGxYtUBlxgXuTYrMQcnnFPfvtO3axC8OLKt4WUxnVFLIR5E602KRxUGQn8PF6kGseFxKf/pub>
alsa_amixer -c 1 controls
<https://docs.google.com/document/d/e/2PACX-1vRDziI3pkah9UPc5DV86cBhy9KEwN4CFdGMZPxtuJXeESqaXVgGgV1I0lk3l-NiOzhwQUpIY_ifY1hD/pub>
alsa_amixer -c 1 contents
<https://docs.google.com/document/d/e/2PACX-1vSr_LXcZcrcDC2mpIHBC7JDjJnD6SIa6Wkuzqd9kZ4wxR5AV5_ORYxWrgXQx71U6YueVgFxoK96adj6/pub>
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Gabriel M
2018-09-14 13:04:33 UTC
Permalink
The solution is:

You need to add AUDIO_DEVICE_OUT_USB_HEADSET and
AUDIO_DEVICE_IN_USB_HEADSET in the file : /system/etc/audio_policy.conf.
Like this :


# Global configuration section: lists input and output devices always
present on the device
# as well as the output device selected by default.
# Devices are designated by a string that corresponds to the enum in audio.h

global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
default_output_device AUDIO_DEVICE_OUT_SPEAKER
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC
}

# audio hardware module section: contains descriptors for all audio hw
modules present on the
# device. Each hw module node is named after the corresponding hw module
library base name.
# For instance, "primary" corresponds to audio.primary.<device>.so.
# The "primary" module is mandatory and must include at least one output
with
# AUDIO_OUTPUT_FLAG_PRIMARY flag.
# Each module descriptor contains one or more output profile descriptors
and zero or more
# input profile descriptors. Each profile lists all the parameters
supported by a given output
# or input stream category.
# The "channel_masks", "formats", "devices" and "flags" are specified using
strings corresponding
# to enums in audio.h and audio_policy.h. They are concatenated by use of
"|" without space or "\n".

audio_hw_modules {
primary {
outputs {
primary {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|
AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|
AUDIO_DEVICE_OUT_AUX_DIGITAL
flags AUDIO_OUTPUT_FLAG_PRIMARY
}
}
inputs {
primary {
sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_BUILTIN_MIC|
AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
}
}
}
a2dp {
outputs {
a2dp {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_ALL_A2DP
}
}
}
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|AUDIO_DEVICE_IN_USB_HEADSET
}
}
inputs {
usb_device {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_USB_DEVICE|AUDIO_DEVICE_IN_USB_HEADSET
}
}
}
}
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
adérito
2018-09-14 13:14:56 UTC
Permalink
Hello, how do I install android in a virtual machine?
Enviado do Correio para Windows 10

De: Gabriel M
Enviado: 14 de setembro de 2018 14:04
Para: Android-x86
Assunto: Re: Android x86 8.1 rc2 and Intel Nuc USB Audio card issue

The solution is:

You need to add AUDIO_DEVICE_OUT_USB_HEADSET and AUDIO_DEVICE_IN_USB_HEADSET in the file : /system/etc/audio_policy.conf. Like this :


# Global configuration section: lists input and output devices always present on the device
# as well as the output device selected by default.
# Devices are designated by a string that corresponds to the enum in audio.h

global_configuration {
  attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
  default_output_device AUDIO_DEVICE_OUT_SPEAKER
  attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC
}

# audio hardware module section: contains descriptors for all audio hw modules present on the
# device. Each hw module node is named after the corresponding hw module library base name.
# For instance, "primary" corresponds to audio.primary.<device>.so.
# The "primary" module is mandatory and must include at least one output with
# AUDIO_OUTPUT_FLAG_PRIMARY flag.
# Each module descriptor contains one or more output profile descriptors and zero or more
# input profile descriptors. Each profile lists all the parameters supported by a given output
# or input stream category.
# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".

audio_hw_modules {
  primary {
    outputs {
      primary {
        sampling_rates 48000
        channel_masks AUDIO_CHANNEL_OUT_STEREO
        formats AUDIO_FORMAT_PCM_16_BIT
        devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL
        flags AUDIO_OUTPUT_FLAG_PRIMARY
      }
    }
    inputs {
      primary {
        sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
        channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
        formats AUDIO_FORMAT_PCM_16_BIT
        devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
      }
    }
  }
  a2dp {
    outputs {
      a2dp {
        sampling_rates 44100
        channel_masks AUDIO_CHANNEL_OUT_STEREO
        formats AUDIO_FORMAT_PCM_16_BIT
        devices AUDIO_DEVICE_OUT_ALL_A2DP
      }
    }
  }
  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|AUDIO_DEVICE_IN_USB_HEADSET
      }
    }
    inputs {
      usb_device {
        sampling_rates 44100
        channel_masks AUDIO_CHANNEL_IN_STEREO
        formats AUDIO_FORMAT_PCM_16_BIT
        devices AUDIO_DEVICE_IN_USB_DEVICE|AUDIO_DEVICE_IN_USB_HEADSET
      }
    }
  }
}
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Gabriel M
2018-09-14 13:06:25 UTC
Permalink
The solution is:

You need to add AUDIO_DEVICE_OUT_USB_HEADSET and
AUDIO_DEVICE_IN_USB_HEADSET in the file : /system/etc/audio_policy.conf.
Like this :


# Global configuration section: lists input and output devices always
present on the device
# as well as the output device selected by default.
# Devices are designated by a string that corresponds to the enum in audio.h

global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
default_output_device AUDIO_DEVICE_OUT_SPEAKER
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC
}

# audio hardware module section: contains descriptors for all audio hw
modules present on the
# device. Each hw module node is named after the corresponding hw module
library base name.
# For instance, "primary" corresponds to audio.primary.<device>.so.
# The "primary" module is mandatory and must include at least one output
with
# AUDIO_OUTPUT_FLAG_PRIMARY flag.
# Each module descriptor contains one or more output profile descriptors
and zero or more
# input profile descriptors. Each profile lists all the parameters
supported by a given output
# or input stream category.
# The "channel_masks", "formats", "devices" and "flags" are specified using
strings corresponding
# to enums in audio.h and audio_policy.h. They are concatenated by use of
"|" without space or "\n".

audio_hw_modules {
primary {
outputs {
primary {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|
AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|
AUDIO_DEVICE_OUT_AUX_DIGITAL
flags AUDIO_OUTPUT_FLAG_PRIMARY
}
}
inputs {
primary {
sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_BUILTIN_MIC|
AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
}
}
}
a2dp {
outputs {
a2dp {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_ALL_A2DP
}
}
}
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|AUDIO_DEVICE_OUT_USB_HEADSET
}
}
inputs {
usb_device {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_USB_DEVICE|AUDIO_DEVICE_IN_USB_HEADSET
}
}
}
}
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Loading...