Add configuration values for AUDIO_INPUT & OUTPUT in pcm_set_config
authorTaeJun Kwon <tj80.kwon@samsung.com>
Tue, 12 Sep 2017 05:57:30 +0000 (14:57 +0900)
committerShivam Garg <garg.shivam@samsung.com>
Mon, 18 Sep 2017 14:03:32 +0000 (23:03 +0900)
framework/src/tinyalsa/tinyalsa.c
os/Kconfig.debug
os/audio/Kconfig

index e5e2d28..b5bb211 100644 (file)
@@ -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);
index ca40f86..7f8ca27 100644 (file)
@@ -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
index 92b9f26..b982a2e 100644 (file)
@@ -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