[alsa-devel] writing an alsa driver

Jarkko Nikula jarkko.nikula at intel.com
Fri Jun 5 09:00:50 CEST 2015


Hi

On 06/04/2015 10:39 PM, Michele Curti wrote:
>                  Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
>                  {
>                      0x0000001D,
>                  }
>                  Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
>                  {
>                      0x00000018,
>                  }
>                  Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
>                  {
>                      0x00000019,
>                  }
>                  Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
>                  {
>                      0x0000001A,
>                  }
>                  Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
>                  {
>                      0x0000001B,
>                  }
>                  Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
>                  {
>                      0x0000001C,
>                  }
...
>
> So, 6 possible IRQs for the LPE core, from 0x18 to 0x1D?
>
2 for DMA, 3 for SSP ports and 1 for host IPC. I don't know does Windows 
use those others as BIOS is exposing them but Linux needs only the host 
IPC irq 0x1d and Linux DSP FW is managing itself the rest.

> Changed the code and tried all six
>
> diff --git a/sound/soc/intel/common/sst-acpi.c b/sound/soc/intel/common/sst-acpi.c
> index bb28e84..a306502 100644
> --- a/sound/soc/intel/common/sst-acpi.c
> +++ b/sound/soc/intel/common/sst-acpi.c
> @@ -149,8 +149,12 @@ static int sst_acpi_probe(struct platform_device *pdev)
>   		sst_pdata->dma_size = desc->dma_size;
>   	}
>
> -	if (desc->irqindex_host_ipc >= 0)
> -		sst_pdata->irq = platform_get_irq(pdev, desc->irqindex_host_ipc);
> +	if (desc->irqindex_host_ipc >= 0) {
> +		sst_pdata->irq = 0x1D; /* acpi-dump, from 0x18 to 0x1D */
> +		pr_info("audio dsp: IRQ # was %d, force to %d\n",
> +				platform_get_irq(pdev, desc->irqindex_host_ipc),
> +				sst_pdata->irq);
> +	}
>
>   	if (desc->resindex_lpe_base >= 0) {
>   		mmio = platform_get_resource(pdev, IORESOURCE_MEM,
>
> without success, I get always the "dsp boot timeout".
>
Above probably won't work as it doesn't set the trigger flags as 
platform_get_irq() does and the Linux irq number is not necessarily the 
same than the HW irq number through the IOAPIC routing.

Your earlier irqindex_host_ipc change should get the right interrupt for 
Linux on your machine.

-	.irqindex_host_ipc = 5,
+	.irqindex_host_ipc = 0,

Unfortunately this index is machine specific and when I looked a few 
DSDT tables earlier I didn't figure out a clean way at which index the 
interrupt should be used in runtime. Probably having quirks for index 5 
needs least amount of quirks as index 0 seems to be constantly used on 
newer machines.

-- 
Jarkko
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the Alsa-devel mailing list