From: TaeJun Kwon Date: Tue, 12 Sep 2017 05:57:30 +0000 (+0900) Subject: Add configuration values for AUDIO_INPUT & OUTPUT in pcm_set_config X-Git-Tag: 1.1_Public_Release~188^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b7a4a4e3c4a1da739c005c4e134a6f13ad03929;p=rtos%2Ftinyara.git Add configuration values for AUDIO_INPUT & OUTPUT in pcm_set_config --- diff --git a/framework/src/tinyalsa/tinyalsa.c b/framework/src/tinyalsa/tinyalsa.c index e5e2d28..b5bb211 100644 --- a/framework/src/tinyalsa/tinyalsa.c +++ b/framework/src/tinyalsa/tinyalsa.c @@ -275,7 +275,11 @@ int pcm_set_config(struct pcm *pcm, const struct pcm_config *config) cap_desc.session = pcm->session; #endif cap_desc.caps.ac_len = sizeof(struct audio_caps_s); - cap_desc.caps.ac_type = AUDIO_TYPE_OUTPUT; + if (pcm->flags & PCM_IN) { + cap_desc.caps.ac_type = AUDIO_TYPE_INPUT; + } else { + cap_desc.caps.ac_type = AUDIO_TYPE_OUTPUT; + } cap_desc.caps.ac_channels = config->channels; cap_desc.caps.ac_controls.hw[0] = config->rate; cap_desc.caps.ac_controls.b[2] = pcm_format_to_bits(config->format); diff --git a/os/Kconfig.debug b/os/Kconfig.debug index ca40f86..7f8ca27 100644 --- a/os/Kconfig.debug +++ b/os/Kconfig.debug @@ -76,6 +76,37 @@ config DEBUG_FS_INFO endif #DEBUG_FS +config DEBUG_AUDIO + bool "Audio Debug Output" + default n + ---help--- + Enable Audio debug SYSLOG output (disabled by default) + +if DEBUG_AUDIO + +config DEBUG_AUDIO_ERROR + bool "Audio Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable audio error debug SYSLOG output. + +config DEBUG_AUDIO_WARN + bool "Audio Warning Output" + default n + depends on DEBUG_WARN + ---help--- + Enable audio warning debug SYSLOG output. + +config DEBUG_AUDIO_INFO + bool "Audio Infomational Debug Output" + default n + depends on DEBUG_VERBOSE + ---help--- + Enable audio informational debug SYSLOG output. + +endif #DEBUG_AUDIO + config DEBUG_LIB bool "C Library Debug Output" default n diff --git a/os/audio/Kconfig b/os/audio/Kconfig index 92b9f26..b982a2e 100644 --- a/os/audio/Kconfig +++ b/os/audio/Kconfig @@ -64,20 +64,6 @@ config AUDIO_MULTI_CARD bool "Registering audio device as different devices for capture and playback" default n - -config DEBUG_AUDIO_ERROR - bool "Output AUDIO Error Debug Messages" - default n - -config DEBUG_AUDIO_WARN - bool "Output AUDIO Warning Debug Messages" - default n - -config DEBUG_AUDIO_INFO - bool "Output AUDIO Info Debug Messages" - default n - - menu "Supported Audio Formats" config AUDIO_FORMAT_AC3