Revert "Adding dump functions to report state in dumpsys media.audio_flinger"
This reverts commit b776eb3998732bc0278cce84c0ecfd1d91d5874f.
Change-Id: I7c0806abe5052afb46ca96d506cc5cadc79ee5fe
diff --git a/alsa_utils/alsa_device_profile.c b/alsa_utils/alsa_device_profile.c
index 6a92668..0d9bd88 100644
--- a/alsa_utils/alsa_device_profile.c
+++ b/alsa_utils/alsa_device_profile.c
@@ -566,63 +566,3 @@
return strdup(buffer);
}
-
-void profile_dump(const alsa_device_profile* profile, int fd)
-{
- char msg[128];
- int numBytes;
-
- write(fd, msg, sprintf(msg, " profile: %p\n", profile));
-
- if (!profile->is_valid) {
- write(fd, msg, sprintf(msg, " Profile is INVALID"));
- }
-
- numBytes = sprintf(msg, " card:%d, device:%d - %s\n",
- profile->card, profile->device, profile->direction == PCM_OUT ? "OUT" : "IN");
- write(fd, msg, numBytes);
-
- // enum pcm_format formats[MAX_PROFILE_FORMATS];
- write(fd, msg, sprintf(msg, " Formats: "));
- for(int fmtIndex = 0;
- profile->formats[fmtIndex] != PCM_FORMAT_INVALID && fmtIndex < MAX_PROFILE_FORMATS;
- fmtIndex++) {
- numBytes = sprintf(msg, "%d ", profile->formats[fmtIndex]);
- write(fd, &msg, numBytes);
- }
- write(fd, "\n", 1);
-
- // unsigned sample_rates[MAX_PROFILE_SAMPLE_RATES];
- write(fd, msg, sprintf(msg, " Rates: "));
- for(int rateIndex = 0;
- profile->sample_rates[rateIndex] != 0 && rateIndex < MAX_PROFILE_SAMPLE_RATES;
- rateIndex++) {
- numBytes = sprintf(msg, "%u ", profile->sample_rates[rateIndex]);
- write(fd, &msg, numBytes);
- }
- write(fd, "\n", 1);
-
- // unsigned channel_counts[MAX_PROFILE_CHANNEL_COUNTS];
- write(fd, msg, sprintf(msg, " Channel Counts: "));
- for(int cntIndex = 0;
- profile->channel_counts[cntIndex] != 0 && cntIndex < MAX_PROFILE_CHANNEL_COUNTS;
- cntIndex++) {
- numBytes = sprintf(msg, "%u ", profile->channel_counts[cntIndex]);
- write(fd, &msg, numBytes);
- }
- write(fd, "\n", 1);
-
- write(fd, msg, sprintf(msg, " min/max period size [%u : %u]\n",
- profile->min_period_size,profile-> max_period_size));
- write(fd, msg, sprintf(msg, " min/max channel count [%u : %u]\n",
- profile->min_channel_count, profile->max_channel_count));
-
- // struct pcm_config default_config;
- write(fd, msg, sprintf(msg, " Default Config:\n"));
- write(fd, msg, sprintf(msg, " channels: %d\n", profile->default_config.channels));
- write(fd, msg, sprintf(msg, " rate: %d\n", profile->default_config.rate));
- write(fd, msg, sprintf(msg, " period_size: %d\n", profile->default_config.period_size));
- write(fd, msg, sprintf(msg, " period_count: %d\n", profile->default_config.period_count));
- write(fd, msg, sprintf(msg, " format: %d\n", profile->default_config.format));
-}
-
diff --git a/alsa_utils/alsa_device_proxy.c b/alsa_utils/alsa_device_proxy.c
index 62bbe04..ee92ed0 100644
--- a/alsa_utils/alsa_device_proxy.c
+++ b/alsa_utils/alsa_device_proxy.c
@@ -15,7 +15,7 @@
*/
#define LOG_TAG "alsa_device_proxy"
-#define LOG_NDEBUG 0
+/*#define LOG_NDEBUG 0*/
/*#define LOG_PCM_PARAMS 0*/
#include <log/log.h>
@@ -43,10 +43,7 @@
struct pcm_config * config)
{
ALOGV("proxy_prepare(c:%d, d:%d)", profile->card, profile->device);
- if (profile->card < 0 || profile->device < 0) {
- ALOGV("INVALID PROXY!");
- return;
- }
+
proxy->profile = profile;
#ifdef LOG_PCM_PARAMS
@@ -221,32 +218,3 @@
{
return pcm_read(proxy->pcm, data, count);
}
-
-/*
- * Debugging
- */
-void proxy_log(alsa_device_proxy * proxy, const char* tag) {
- ALOGI("proxy_dump() - %s", tag);
-
- // struct pcm_config alsa_config;
- ALOGI(" channels:%d", proxy->alsa_config.channels);
- ALOGI(" rate:%d", proxy->alsa_config.rate);
- ALOGI(" period_size:%d", proxy->alsa_config.period_size);
- ALOGI(" period_count:%d", proxy->alsa_config.period_count);
- ALOGI(" format:%d", proxy->alsa_config.format);
-
- // struct pcm * pcm;
-
-}
-
-void proxy_dump(const alsa_device_proxy* proxy, int fd)
-{
- char msg[128];
-
- write(fd, msg, sprintf(msg, " proxy: %p\n", proxy));
- write(fd, msg, sprintf(msg, " channels: %d\n", proxy->alsa_config.channels));
- write(fd, msg, sprintf(msg, " rate: %d\n", proxy->alsa_config.rate));
- write(fd, msg, sprintf(msg, " period_size: %d\n", proxy->alsa_config.period_size));
- write(fd, msg, sprintf(msg, " period_count: %d\n", proxy->alsa_config.period_count));
- write(fd, msg, sprintf(msg, " format: %d\n", proxy->alsa_config.format));
-}
diff --git a/alsa_utils/include/alsa_device_profile.h b/alsa_utils/include/alsa_device_profile.h
index 0c6f6b4..5520b8a 100644
--- a/alsa_utils/include/alsa_device_profile.h
+++ b/alsa_utils/include/alsa_device_profile.h
@@ -87,6 +87,4 @@
unsigned profile_calc_min_period_size(alsa_device_profile* profile, unsigned sample_rate);
unsigned int profile_get_period_size(alsa_device_profile* profile, unsigned sample_rate);
-void profile_dump(const alsa_device_profile* profile, int fd);
-
#endif /* ANDROID_SYSTEM_MEDIA_ALSA_UTILS_ALSA_DEVICE_PROFILE_H */
diff --git a/alsa_utils/include/alsa_device_proxy.h b/alsa_utils/include/alsa_device_proxy.h
index d036751..e1ff8f5 100644
--- a/alsa_utils/include/alsa_device_proxy.h
+++ b/alsa_utils/include/alsa_device_proxy.h
@@ -52,9 +52,4 @@
int proxy_write(alsa_device_proxy * proxy, const void *data, unsigned int count);
int proxy_read(const alsa_device_proxy * proxy, void *data, unsigned int count);
-/* Debugging */
-void proxy_log(alsa_device_proxy * proxy, const char* tag);
-
-void proxy_dump(const alsa_device_proxy * proxy, int fd);
-
#endif /* ANDROID_SYSTEM_MEDIA_ALSA_UTILS_ALSA_DEVICE_PROXY_H */