4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jonghyuk Choi <jhchoi.choi@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
25 #include "../include/avsys-audio.h"
26 #include "../include/avsys-audio-logical-volume.h"
28 #define VERSION_NUM 0001
31 void usage(char *name)
33 printf("Usage: %s [FILE]...\n\n", name);
34 printf("Version %04d\n", VERSION_NUM);
39 int main(int argc, char* argv[])
45 char filepath[256]={0,};
55 strncpy(filepath, argv[1], sizeof(filepath)-1);
59 strncpy(filepath, AVSYS_VOLUME_INI_TEMP_PATH, sizeof(filepath)-1);
60 fprintf(stderr,"Use default file path %s\n", filepath);
63 fp = fopen(filepath, "w");
66 fprintf(stderr,"Can not open file %s\n",filepath);
70 for(i=AVSYS_AUDIO_LVOL_GAIN_TYPE_0; i<AVSYS_AUDIO_LVOL_GAIN_TYPE_MAX; i++)
72 for(j=AVSYS_AUDIO_LVOL_DEV_TYPE_SPK; j<=AVSYS_AUDIO_LVOL_DEV_TYPE_BTHEADSET;j++)
76 char *str_dev[] = { "SPK", "HEADSET", "BTHEADSET" };
78 for(k=0;k<LVOLUME_MAX_MULTIMEDIA;k++)
80 err = avsys_audio_get_volume_table(i, AVSYS_AUDIO_LVOL_DEV_TYPE_SPK, k, &lv, &rv);
84 fprintf(fp,"%1d:%s:%d:%d:%d\n",i,str_dev[j],k,lv,rv);
102 fprintf(stderr,"Can not dump volume table\n");