echoaudio, add TLV support
PATCH 2/3 echoaudio, add TLV support
This patch adds TLV support to the echoaudio driver (controls).
pci/echoaudio/echoaudio.c renamed from pci/echoaudio__orig/echoaudio.c +17 -1
@@ -34,6 +34,7 @@ module_param_array(enable, bool, NULL, 0MODULE_PARM_DESC (enable,"Enable " ECHOCARD_NAME " soundcard." );static unsigned int channels_list[10 ] = {1 ,2 ,4 ,6 ,8 ,10 ,12 ,14 ,16 ,999999 }; +static DECLARE_TLV_DB_SCALE(db_scale_output_gain, -12800, 100, 1);static int get_firmware (const struct firmware **fw_entry,const struct firmware *frm,struct echoaudio *chip)
@@ -1011,17 +1012,21 @@ static int snd_echo_output_gain_put(strustatic struct snd_kcontrol_new snd_echo_line_output_gain__devinitdata = { .name ="Line Playback Volume" , .iface =SNDRV_CTL_ELEM_IFACE_MIXER , + .access =SNDRV_CTL_ELEM_ACCESS_READWRITE |SNDRV_CTL_ELEM_ACCESS_TLV_READ , .info = snd_echo_output_gain_info, .get = snd_echo_output_gain_get, .put = snd_echo_output_gain_put, + .tlv = {.p = db_scale_output_gain}, };#else static struct snd_kcontrol_new snd_echo_pcm_output_gain__devinitdata = { .name ="PCM Playback Volume" , .iface =SNDRV_CTL_ELEM_IFACE_MIXER , + .access =SNDRV_CTL_ELEM_ACCESS_READWRITE |SNDRV_CTL_ELEM_ACCESS_TLV_READ , .info = snd_echo_output_gain_info, .get = snd_echo_output_gain_get, .put = snd_echo_output_gain_put, + .tlv = {.p = db_scale_output_gain}, };#endif
@@ -1080,12 +1085,16 @@ static int snd_echo_input_gain_put(strucreturn changed; } +static DECLARE_TLV_DB_SCALE(db_scale_input_gain, -2500, 50, 0); +static struct snd_kcontrol_new snd_echo_line_input_gain__devinitdata = { .name ="Line Capture Volume" , .iface =SNDRV_CTL_ELEM_IFACE_MIXER , + .access =SNDRV_CTL_ELEM_ACCESS_READWRITE |SNDRV_CTL_ELEM_ACCESS_TLV_READ , .info = snd_echo_input_gain_info, .get = snd_echo_input_gain_get, .put = snd_echo_input_gain_put, + .tlv = {.p = db_scale_input_gain}, };#endif /* ECHOCARD_HAS_INPUT_GAIN */
@@ -1277,9 +1286,11 @@ static int snd_echo_mixer_put(struct sndstatic struct snd_kcontrol_new snd_echo_monitor_mixer__devinitdata = { .name ="Monitor Mixer Volume" , .iface =SNDRV_CTL_ELEM_IFACE_MIXER , + .access =SNDRV_CTL_ELEM_ACCESS_READWRITE |SNDRV_CTL_ELEM_ACCESS_TLV_READ , .info = snd_echo_mixer_info, .get = snd_echo_mixer_get, .put = snd_echo_mixer_put, + .tlv = {.p = db_scale_output_gain}, };#endif /* ECHOCARD_HAS_MONITOR */
@@ -1343,9 +1354,11 @@ static int snd_echo_vmixer_put(struct snstatic struct snd_kcontrol_new snd_echo_vmixer__devinitdata = { .name ="VMixer Volume" , .iface =SNDRV_CTL_ELEM_IFACE_MIXER , + .access =SNDRV_CTL_ELEM_ACCESS_READWRITE |SNDRV_CTL_ELEM_ACCESS_TLV_READ , .info = snd_echo_vmixer_info, .get = snd_echo_vmixer_get, .put = snd_echo_vmixer_put, + .tlv = {.p = db_scale_output_gain}, };#endif /* ECHOCARD_HAS_VMIXER */
@@ -1753,9 +1766,12 @@ static int snd_echo_vumeters_get(structstatic struct snd_kcontrol_new snd_echo_vumeters__devinitdata = { .name ="VU-meters" , .iface =SNDRV_CTL_ELEM_IFACE_MIXER , - .access =SNDRV_CTL_ELEM_ACCESS_READ |SNDRV_CTL_ELEM_ACCESS_VOLATILE , + .access =SNDRV_CTL_ELEM_ACCESS_READ | +SNDRV_CTL_ELEM_ACCESS_VOLATILE | +SNDRV_CTL_ELEM_ACCESS_TLV_READ , .info = snd_echo_vumeters_info, .get = snd_echo_vumeters_get, + .tlv = {.p = db_scale_output_gain}, };
--
Giuliano.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 1 line · Giuliano Pochini
This patch adds TLV support to the echoaudio driver (controls).
Why 1/3 didn't reach the list ?? I'll try to send it again this night.
--
Giuliano.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
At Thu, 23 Nov 2006 09:52:16 +0100 (CET),
Quoted 7 lines · Giuliano Pochini
Quoted 1 line · Giuliano Pochini
This patch adds TLV support to the echoaudio driver (controls).
Why 1/3 didn't reach the list ?? I'll try to send it again this night.
I don't see it, too.
Add me to Cc when you submit patches at the next time.
thanks,
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV