what is the differenct between the mixer simple control and control?
Hello All,
I am porting an sound chip driver to my ARM dev board.
I do not know what is the difference between the mixer simple control and control.
for my device driver, amixer contents output 9 controls:
numid=3,iface=MIXER,name='Headphone Balance'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026030912
numid=1,iface=MIXER,name='Headphone Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=0
numid=5,iface=MIXER,name='Mic Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031332
numid=7,iface=MIXER,name='LINE-IN Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026028952
numid=6,iface=MIXER,name='Radio Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031472
numid=8,iface=MIXER,name='Record Switch'
; type=INTEGER,access=rw---,values=1,min=0,max=3,step=0 : values=-1026028812
numid=9,iface=MIXER,name='Sound Effect'
; type=INTEGER,access=rw---,values=1,min=0,max=3,step=0 : values=-1026028672
numid=4,iface=MIXER,name='Speaker Balance'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031192
numid=2,iface=MIXER,name='Speaker Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031052
amixer scontrols output 8 controls:
Simple mixer control 'Headphone',0
Simple mixer control 'Headphone Balance',0
Simple mixer control 'Mic',0
Simple mixer control 'LINE-IN',0
Simple mixer control 'Radio',0
Simple mixer control 'Sound Effect',0
Simple mixer control 'Speaker',0
Simple mixer control 'Speaker Balance',0
The Record Switch control is missing in the simple controls.
However, in the device driver, all these controls are the same settings:
{
.ctl = &snd_tlv320aic23_ctl,
.name = "Record Switch",
.index = RecordSource,
.reg = TLV320AIC23_ANALOGPATH,
.def = 0,
.shift = 6,
.mask = TLV320AIC23_APATH_SIDETONE15dB,
.min = 0,
.max = 3,
},
{
.ctl = &snd_tlv320aic23_ctl,
.name = "Sound Effect",
.index = SoundEffect,
.reg = TLV320AIC23_ANALOGPATH,
.def = 1,
.shift = 4,
.mask = TLV320AIC23_APATH_DACEN,
.min = 0,
.max = 3,
},
How to change this setting to simple control?
Thank you
Tyler Li
-------------------------------------------------------------------------
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
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Quoted 71 lines · YongLi
Hello All,
I am porting an sound chip driver to my ARM dev board.
I do not know what is the difference between the mixer simple control and control.
for my device driver, amixer contents output 9 controls:
numid=3,iface=MIXER,name='Headphone Balance'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026030912
numid=1,iface=MIXER,name='Headphone Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=0
numid=5,iface=MIXER,name='Mic Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031332
numid=7,iface=MIXER,name='LINE-IN Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026028952
numid=6,iface=MIXER,name='Radio Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031472
numid=8,iface=MIXER,name='Record Switch'
; type=INTEGER,access=rw---,values=1,min=0,max=3,step=0 : values=-1026028812
numid=9,iface=MIXER,name='Sound Effect'
; type=INTEGER,access=rw---,values=1,min=0,max=3,step=0 : values=-1026028672
numid=4,iface=MIXER,name='Speaker Balance'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031192
numid=2,iface=MIXER,name='Speaker Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031052amixer scontrols output 8 controls:
Simple mixer control 'Headphone',0 Simple mixer control 'Headphone Balance',0 Simple mixer control 'Mic',0
Simple mixer control 'LINE-IN',0 Simple mixer control 'Radio',0 Simple mixer control 'Sound Effect',0 Simple mixer control 'Speaker',0 Simple mixer control 'Speaker Balance',0The Record Switch control is missing in the simple controls.
However, in the device driver, all these controls are the same settings:
{
.ctl =&snd_tlv320aic23_ctl,
.name = "Record Switch",
.index = RecordSource,
.reg =TLV320AIC23_ANALOGPATH,
.def = 0,
.shift = 6,
.mask =TLV320AIC23_APATH_SIDETONE15dB,
.min = 0,
.max = 3,
},
{
.ctl =&snd_tlv320aic23_ctl,
.name = "Sound Effect",
.index = SoundEffect,
.reg =TLV320AIC23_ANALOGPATH,
.def = 1,
.shift = 4,
.mask =TLV320AIC23_APATH_DACEN,
.min = 0,
.max = 3,
},
Quoted 6 lines
How to change this setting to simple control?
Thank you
Tyler Li
Can you please post your entire source code to a web site somewhere, and then put a link to it here in an email.
It looks like several things are wrong, but having the source code will help us help you better.
-------------------------------------------------------------------------
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
----- Original Message -----
From: "James Courtier-Dutton" <[email protected]>
To: "YongLi" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, December 12, 2006 5:26 PM
Subject: Re: [Alsa-devel] what is the differenct between the mixer simple control and control?
Quoted 76 lines · YongLi
Quoted 75 lines
Hello All,
I am porting an sound chip driver to my ARM dev board.
I do not know what is the difference between the mixer simple control and control.
for my device driver, amixer contents output 9 controls:
numid=3,iface=MIXER,name='Headphone Balance'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026030912
numid=1,iface=MIXER,name='Headphone Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=0
numid=5,iface=MIXER,name='Mic Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031332
numid=7,iface=MIXER,name='LINE-IN Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026028952
numid=6,iface=MIXER,name='Radio Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031472
numid=8,iface=MIXER,name='Record Switch'
; type=INTEGER,access=rw---,values=1,min=0,max=3,step=0 : values=-1026028812
numid=9,iface=MIXER,name='Sound Effect'
; type=INTEGER,access=rw---,values=1,min=0,max=3,step=0 : values=-1026028672
numid=4,iface=MIXER,name='Speaker Balance'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031192
numid=2,iface=MIXER,name='Speaker Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031052amixer scontrols output 8 controls:
Simple mixer control 'Headphone',0 Simple mixer control 'Headphone Balance',0 Simple mixer control 'Mic',0
Simple mixer control 'LINE-IN',0 Simple mixer control 'Radio',0 Simple mixer control 'Sound Effect',0 Simple mixer control 'Speaker',0 Simple mixer control 'Speaker Balance',0The Record Switch control is missing in the simple controls.
However, in the device driver, all these controls are the same settings:
{
.ctl =&snd_tlv320aic23_ctl,
.name = "Record Switch",
.index = RecordSource,
.reg =TLV320AIC23_ANALOGPATH,
.def = 0,
.shift = 6,
.mask =TLV320AIC23_APATH_SIDETONE15dB,
.min = 0,
.max = 3,
},
{
.ctl =&snd_tlv320aic23_ctl,
.name = "Sound Effect",
.index = SoundEffect,
.reg =TLV320AIC23_ANALOGPATH,
.def = 1,
.shift = 4,
.mask =TLV320AIC23_APATH_DACEN,
.min = 0,
.max = 3,
},How to change this setting to simple control?
Thank you
Quoted 7 lines
Quoted 2 lines
Tyler Li
Can you please post your entire source code to a web site somewhere, and then put a link to it here in an email.
It looks like several things are wrong, but having the source code will help us help you better.
Thank you for your help.
This tlv320aic23.c file is used for TI tlv32023 audio codec chip. I got this file from the below website and changed something:
http://www.fluff.org/ben/linux-26/audio9/s3c2410-audio9-codec.patch
However, I think the changed are not related to the mixer controls. If necessary, I can send the modified file through email.
-------------------------------------------------------------------------
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 7 lines · YongLi
This
tlv320aic23.cfile is used for TI tlv32023 audio codec chip. I got this file from the below website and changed something:
http://www.fluff.org/ben/linux-26/audio9/s3c2410-audio9-codec.patchHowever, I think the changed are not related to the mixer controls. If necessary, I can send the modified file through email.
That patch is incomplete.
All the #define statements are missing. E,g. Where is TLV320AIC23_HPVOL_ZEROCROSS defined?
-------------------------------------------------------------------------
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 6 lines
numid=6,iface=MIXER,name='Radio Volume'
; type=INTEGER,access=rw---,values=1,min=0,max=127,step=0 : values=-1026031472
numid=8,iface=MIXER,name='Record Switch'
; type=INTEGER,access=rw---,values=1,min=0,max=3,step=0 : values=-1026028812
See the values are not initialised correctly.
They should be in a range of 0 to 3.
Quoted 5 lines
However, in the device driver, all these controls are the same settings:
{
.ctl =&snd_tlv320aic23_ctl,
.name = "Record Switch",
.index = RecordSource,
The index value is wrong. Leave it out, so that it defaults to 0. The index is used if you have more that one control with the same name, but if the index does not start at zero, the simple mixer will not process it.
Quoted 19 lines
.reg =
TLV320AIC23_ANALOGPATH,
.def = 0,
.shift = 6,
.mask =TLV320AIC23_APATH_SIDETONE15dB,
.min = 0,
.max = 3,
},
{
.ctl =&snd_tlv320aic23_ctl,
.name = "Sound Effect",
.index = SoundEffect,
.reg =TLV320AIC23_ANALOGPATH,
.def = 1,
.shift = 4,
.mask =TLV320AIC23_APATH_DACEN,
.min = 0,
.max = 3,
},
Quoted 6 lines
How to change this setting to simple control?
Thank you
Tyler Li
-------------------------------------------------------------------------
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