namespace android_audio_legacy {
+class AudioHardwareInterface;
+
extern "C" {
struct legacy_audio_module {
struct legacy_audio_device {
struct audio_hw_device device;
- struct AudioHardwareInterface *hwif;
+ AudioHardwareInterface *hwif;
};
struct legacy_stream_out {
{
const struct legacy_audio_device *ladev = to_cladev(dev);
return ladev->hwif->getInputBufferSize(config->sample_rate, (int) config->format,
- popcount(config->channel_mask));
+ audio_channel_count_from_in_mask(config->channel_mask));
}
static int adev_open_output_stream(struct audio_hw_device *dev,
audio_devices_t devices,
audio_output_flags_t flags,
struct audio_config *config,
- struct audio_stream_out **stream_out)
+ struct audio_stream_out **stream_out,
+ const char *address __unused)
{
struct legacy_audio_device *ladev = to_ladev(dev);
status_t status;
audio_io_handle_t handle,
audio_devices_t devices,
struct audio_config *config,
- struct audio_stream_in **stream_in)
+ struct audio_stream_in **stream_in,
+ audio_input_flags_t flags __unused,
+ const char *address __unused,
+ audio_source_t source __unused)
{
struct legacy_audio_device *ladev = to_ladev(dev);
status_t status;