Other Parts Discussed in Thread: TAS6424
Dear TI
I would like to ask you a few questions regarding "Auto Diagnostics Switch" in tas6424.c
In my case, I would like to use asound.state which is including kcontrol state and I don't like to use "Auto Diagnostics Switch"
When I try to reboot my embeded board, snd_soc_get_strobe is called and asound.state is updated automatically.
As you know, when the embeded board is booted up, asound.state can be used for the default configuration.
================================================================================
- Cold boot
[ 6.519993] snd_soc_put_strobe [tas6424] Auto Diagnostic: off, item[0]: 1 val1: 0, val2: 1, invert: 1, strobe: 1
- try to reboot
[ 18.250693] snd_soc_get_strobe [tas6424] Auto Diagnostic: off, item[0]: 0, val: 1, invert: 1
- Probably, asound.state seems to be updated.
- Rebooting
[ 7.259666] snd_soc_put_strobe [tas6424] Auto Diagnostic: on, item[0]: 0 val1: 1, val2: 0, invert: 1, strobe: 0
================================================================================
Please refer to my debug codes.
=================================================================================
int snd_soc_get_strobe(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
<snip>
if (shift != 0 && val != 0)
val = val >> shift;
ucontrol->value.enumerated.item[0] = val ^ invert;
printk("%s [tas6424] Auto Diagnostic: %s, item[0]: %d, val: %d, invert: %d\n",
__func__,
(ucontrol->value.enumerated.item[0] == 0?"off":"on"),
ucontrol->value.enumerated.item[0],
val,
invert);
return 0;
}
<snip>
int snd_soc_put_strobe(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
<snip>
printk("%s [tas6424] Auto Diagnostic: %s, item[0]: %d val1: %d, val2: %d, invert: %d, strobe: %d\n",
__func__,
(val2 == 1?"off":"on"),
ucontrol->value.enumerated.item[0],
val1, val2, invert, strobe);
err = snd_soc_component_update_bits(component, reg, mask, val1);
if (err < 0)
return err;
return snd_soc_component_update_bits(component, reg, mask, val2);
}
=================================================================================
So, whenever I try to reboot my board, Auto Diagnostic feature is toggled.
Isn't there any way to solve this problem without commenting out "Auto Diagnostics Switch" kcontrol?
If possible, I would like to use your original code.
Thank you.
Best Regards,
KW