[alsa-devel] Issues w/ Creative Labs [SB X-Fi Xtreme Audio] CA0110-IBG

Takashi Iwai tiwai at suse.de
Wed Mar 4 10:35:07 CET 2015


At Wed, 04 Mar 2015 01:01:32 -0800,
Alnie wrote:
> 
> 
> 
> On 03/04/2015 12:00 AM, Takashi Iwai wrote:
> > At Tue, 03 Mar 2015 18:12:31 -0800,
> > Alnie wrote:
> >>
> >>> My suggestion isn't about a compile option but that you add some debug
> >>> printk() calls manually around some codes.  We need to know the value
> >>> written and read by azx_write*() and azx_read*() calls.  Especially
> >>> the value read in pci_azx_read*() is more interesting. You can try to
> >>> modify sound/pci/hda/hda_intel.c and add a printk() to each
> >>> pci_azx_read*() function for printing the value to be returned.
> >>> Beware that this will likely flood many messages, so just try once.
> >>>
> >>>
> >>> Takashi
> >>>
> >>
> >> I can not find any reference to pci_azx_read in hda_intel.c
> >
> > You must be using a too old kernel, then.  Please use the latest
> > kernel for debugging.
> >
> >
> > Takashi
> >
> 
> Ok. I now have latest kernel.
> 
> Here is a small portion...
> 
> /* PCI register access. */
> static void pci_azx_writel(u32 value, u32 __iomem *addr)
> {
> 	writel(value, addr);
> }
> 
> static u32 pci_azx_readl(u32 __iomem *addr)
> {
> 	return readl(addr);
> }
> 
> Can you show me how I can properly place printk without breaking things 
> and produce relevant messages?

Something like:

static u32 pci_azx_readl(u32 __iomem *addr)
{
	u32 val = readl(addr);
	pr_info("XXX readl %p %x\n", addr, val);
	return val;
}

But since there are quite lots of accesses, it might be safer to use
the ratelimited version.  Use like the following:
	pr_info_ratelimited("XXX readl %p %x\n", addr, val);

Also there are variants pci_azx_readw() and _readb().


Takashi


More information about the Alsa-devel mailing list