* SGTL5000 startup error on reboot
@ 2016-02-08 12:53 Erik Friesen
2016-02-15 14:58 ` Erik Friesen
0 siblings, 1 reply; 2+ messages in thread
From: Erik Friesen @ 2016-02-08 12:53 UTC (permalink / raw)
To: alsa-devel
I find that the codec is getting a write failure at sgtl5000_fill_defaults at
{ SGTL5000_CHIP_ANA_POWER, 0x7060 },
about half the time following a software reboot, and with external
vddd powered with 1.8v. Reading this register shows that it is
already at 0x7060, so I am not sure what is up with that, but I would
suspect a hardware bug in the codec.
Using this code has fixed this so far.
static int sgtl5000_fill_defaults(struct sgtl5000_priv *sgtl5000)
{
int i, ret, val, index;
int reg;
for (i = 0; i < ARRAY_SIZE(sgtl5000_reg_defaults); i++) {
val = sgtl5000_reg_defaults[i].def;
index = sgtl5000_reg_defaults[i].reg;
ret = regmap_read(sgtl5000->regmap, index, ®);
if (ret) {
printk(KERN_WARNING "SGTL5000 probe read failed at %i\n", i);
return ret;
}
if (reg != val) {
ret = regmap_write(sgtl5000->regmap, index, val);
}
if (ret) {
printk(KERN_WARNING "SGTL5000 probe write failed %x at %i index %i
@ %x\n", val, i, index, reg);
return ret;
}
}
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: SGTL5000 startup error on reboot
2016-02-08 12:53 SGTL5000 startup error on reboot Erik Friesen
@ 2016-02-15 14:58 ` Erik Friesen
0 siblings, 0 replies; 2+ messages in thread
From: Erik Friesen @ 2016-02-15 14:58 UTC (permalink / raw)
To: alsa-devel
Hey, its posted for others, but I am unsubscribing to the list, so
future correspondence should be direct to email.
On Mon, Feb 8, 2016 at 7:53 AM, Erik Friesen <friesendrywall@gmail.com> wrote:
> I find that the codec is getting a write failure at sgtl5000_fill_defaults at
>
> { SGTL5000_CHIP_ANA_POWER, 0x7060 },
>
> about half the time following a software reboot, and with external
> vddd powered with 1.8v. Reading this register shows that it is
> already at 0x7060, so I am not sure what is up with that, but I would
> suspect a hardware bug in the codec.
>
> Using this code has fixed this so far.
>
> static int sgtl5000_fill_defaults(struct sgtl5000_priv *sgtl5000)
> {
> int i, ret, val, index;
> int reg;
> for (i = 0; i < ARRAY_SIZE(sgtl5000_reg_defaults); i++) {
> val = sgtl5000_reg_defaults[i].def;
> index = sgtl5000_reg_defaults[i].reg;
> ret = regmap_read(sgtl5000->regmap, index, ®);
> if (ret) {
> printk(KERN_WARNING "SGTL5000 probe read failed at %i\n", i);
> return ret;
> }
> if (reg != val) {
> ret = regmap_write(sgtl5000->regmap, index, val);
> }
> if (ret) {
> printk(KERN_WARNING "SGTL5000 probe write failed %x at %i index %i
> @ %x\n", val, i, index, reg);
> return ret;
> }
> }
> return 0;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-15 14:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-08 12:53 SGTL5000 startup error on reboot Erik Friesen
2016-02-15 14:58 ` Erik Friesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).