mt6735 支持44.1K和48K等采样率的USB Speaker
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
用48K的usb speaker播放音乐无声,看log发现usb hal层不支持这种采样率能力,所以
需要在HAL层支持各种采样率的usb speaker。
[SOLUTION]
audio_policy.conf
usb {
global_configuration {
audio_hal_version 2.0
}
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 //把44100修改成dynaMIC
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_DEVICE
}
}
inputs {
usb_device {
sampling_rates 44100//把44100修改成dynamic
channel_masks AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_USB_DEVICE
}
}
}
用48K的usb speaker播放音乐无声,看log发现usb hal层不支持这种采样率能力,所以
需要在HAL层支持各种采样率的usb speaker。
[SOLUTION]
audio_policy.conf
usb {
global_configuration {
audio_hal_version 2.0
}
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 //把44100修改成dynaMIC
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_DEVICE
}
}
inputs {
usb_device {
sampling_rates 44100//把44100修改成dynamic
channel_masks AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_USB_DEVICE
}
}
}
顶一顶