diff options
| author | Steve Kondik <shade@chemlab.org> | 2013-04-07 23:48:23 -0700 |
|---|---|---|
| committer | Steve Kondik <shade@chemlab.org> | 2013-04-08 02:23:23 -0700 |
| commit | 06a8727b06f9f9630bf93cd037d73c3028d26612 (patch) | |
| tree | 1e02f70a3fbefa194d913dde9ae5547ba181c213 /audio/audio_hw.c | |
| parent | eb084f936a6b3ed20ef64e155b5bd064a819c262 (diff) | |
| download | device_samsung_t0lte-06a8727b06f9f9630bf93cd037d73c3028d26612.tar.gz device_samsung_t0lte-06a8727b06f9f9630bf93cd037d73c3028d26612.tar.bz2 device_samsung_t0lte-06a8727b06f9f9630bf93cd037d73c3028d26612.zip | |
t0lte: Allow extension by carrier-specific configurations
Change-Id: Icf1cf20fda21579950ede21da7a0e455046087c7
Diffstat (limited to 'audio/audio_hw.c')
| -rwxr-xr-x | audio/audio_hw.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index b556211..e65b40a 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -3096,19 +3096,15 @@ static int adev_config_parse(struct m0_audio_device *adev) struct config_parse_state s; FILE *f; XML_Parser p; - char property[PROPERTY_VALUE_MAX]; - char file[80]; int ret = 0; bool eof = false; int len; + char buf[1024]; - property_get("ro.product.device", property, "tiny_hw"); - snprintf(file, sizeof(file), "/system/etc/sound/%s", property); - - ALOGV("Reading configuration from %s\n", file); - f = fopen(file, "r"); + ALOGV("Reading configuration from %s\n", CONFIG_FILE); + f = fopen(CONFIG_FILE, "r"); if (!f) { - ALOGE("Failed to open %s\n", file); + ALOGE("Failed to open %s\n", CONFIG_FILE); return -ENODEV; } @@ -3126,7 +3122,7 @@ static int adev_config_parse(struct m0_audio_device *adev) XML_SetElementHandler(p, adev_config_start, adev_config_end); while (!eof) { - len = fread(file, 1, sizeof(file), f); + len = fread(buf, 1, sizeof(buf), f); if (ferror(f)) { ALOGE("I/O error reading config\n"); ret = -EIO; @@ -3134,7 +3130,7 @@ static int adev_config_parse(struct m0_audio_device *adev) } eof = feof(f); - if (XML_Parse(p, file, len, eof) == XML_STATUS_ERROR) { + if (XML_Parse(p, buf, len, eof) == XML_STATUS_ERROR) { ALOGE("Parse error at line %u:\n%s\n", (unsigned int)XML_GetCurrentLineNumber(p), XML_ErrorString(XML_GetErrorCode(p))); |
