diff options
Diffstat (limited to 'cras/src/server/cras_iodev.h')
-rw-r--r-- | cras/src/server/cras_iodev.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cras/src/server/cras_iodev.h b/cras/src/server/cras_iodev.h index db16a0f8..18a0962c 100644 --- a/cras/src/server/cras_iodev.h +++ b/cras/src/server/cras_iodev.h @@ -184,6 +184,8 @@ struct cras_ionode { * audio thread can sleep before serving this playback dev the next time. * Not implementing this ops means fall back to default behavior in * cras_iodev_default_frames_to_play_in_sleep(). + * support_noise_cancellation - (Optional) Checks if the device supports noise + * cancellation. * format - The audio format being rendered or captured to hardware. * rate_est - Rate estimator to estimate the actual device rate. * area - Information about how the samples are stored. @@ -274,6 +276,7 @@ struct cras_iodev { unsigned int (*frames_to_play_in_sleep)(struct cras_iodev *iodev, unsigned int *hw_level, struct timespec *hw_tstamp); + int (*support_noise_cancellation)(const struct cras_iodev *iodev); struct cras_audio_format *format; struct rate_estimator *rate_est; struct cras_audio_area *area; @@ -459,6 +462,9 @@ void cras_iodev_set_active_node(struct cras_iodev *iodev, /* Checks if the node is the typical playback or capture option for AEC usage. */ bool cras_iodev_is_aec_use_case(const struct cras_ionode *node); +/* Checks if the node is a playback or capture node on internal card. */ +bool cras_iodev_is_on_internal_card(const struct cras_ionode *node); + /* Adjust the system volume based on the volume of the given node. */ static inline unsigned int cras_iodev_adjust_node_volume(const struct cras_ionode *node, @@ -833,4 +839,12 @@ void cras_iodev_update_highest_hw_level(struct cras_iodev *iodev, int cras_iodev_drop_frames_by_time(struct cras_iodev *iodev, struct timespec ts); +/* Checks if an input device supports noise cancellation. + * Args: + * iodev - The device. + * Returns: + * True if device supports noise cancellation. False otherwise. + */ +bool cras_iodev_support_noise_cancellation(const struct cras_iodev *iodev); + #endif /* CRAS_IODEV_H_ */ |