[alsa-devel] writing an alsa driver

Michele Curti michele.curti at gmail.com
Thu Mar 3 14:08:39 CET 2016


On Thu, Mar 03, 2016 at 04:57:45PM +0530, Vinod Koul wrote:
> On Thu, Mar 03, 2016 at 12:11:10PM +0100, Michele Curti wrote:
> > Hi Vinod,
> > 
> > On Thu, Jun 25, 2015 at 08:54:07AM +0530, Vinod Koul wrote:
> > > > [    2.700468] sst-mfld-platform sst-mfld-platform: Slot control: codec_in rx deinterleaver codec_in1_1 doesn't have DAPM widget!!!
> > > this is unexpected, I will check on this
> > > 
> > > > ...
> > > > [    7.970937] intel_sst_acpi 80860F28:00: Wait timed-out condition:0x0, msg_id:0x1 fw_state 0x3
> > > > [    7.970964] intel_sst_acpi 80860F28:00: fw returned err -16
> > > Yes this is a problem, which FW are you using
> 
> Have you tried the recent kernels, Pierre did a bunch of update and got many
> things working.

Yes, 4.5.0-rc6.

> As for timeout, that simply means we have send a message to DSP which failed
> to get a response. Perhpas the message had some bad element of FW had a
> bug/crashed...

Ok thank you, so I can stop playing with amixer :)

Thanks,
Michele

> 
> > > 
> > 
> > I have a question regarding the FW timeout, but since it has been a long
> > time since last email, let me summarize the thread..
> > 
> > I tried to get sound working on an Asus X205TA laptop so, as far as I
> > understood, 3 things are needed in the ASoC world:
> > 1. codec driver
> > 2. platform driver
> > 3. machine driver
> > 
> > 1. codec driver (patch 0001 at [1])
> > 
> > It seems that the codec is a Relatek RT5648, and in kernel there is no
> > driver for it, but since it has the same product Id of the RT5645
> > (0x6308) I simply added an I2C and an ACPI match to the RT5645 codec
> > driver.
> > 
> > 2. platform driver (patch 0002 at [1])
> > 
> > Used the sst-mfld-platform one (under sound/soc/intel/atom/sst), changing
> > the .acpi_ipc_irq_index from 5 to 0 because the DSP interrupt order in
> > the ACPI DSDT table of this laptop is different from the "normal" (see
> > line 3745 of dsdt.dsl at [2]).
> > 
> > $ cat /proc/interrupts | grep sst
> >             CPU0       CPU1       CPU2       CPU3       
> >    1:         24          0          0          0   IO-APIC   29-fasteoi   intel_sst_driver
> > 
> > Used the SSP0 version of the ADSP firmware (found at [3]), beacuse the
> > mainline FW uses the SSP2 port but this laptop has an atom Z3735F which
> > has only two SSP ports.
> > 
> > 3. machine driver (patch 0003 at [1])
> > 
> > It's a copy-paste of sound/soc/intel/boards/bytcr_rt5651.c, but using
> > SSP0 instead of SSP2 and rt5645 instead of rt5651.
> > 
> > 
> > 
> > So, applying the three patches to the mainline linux kernel the sound
> > card shows up (aplay -l finds it) and at boot I got these errors:
> > 
> > [    4.378238] sst-mfld-platform sst-mfld-platform: Slot control: codec_out tx interleaver slot 0 doesn't have DAPM widget!!!
> > [    4.381301] sst-mfld-platform sst-mfld-platform: Slot control: codec_out tx interleaver slot 1 doesn't have DAPM widget!!!
> > [    4.384307] sst-mfld-platform sst-mfld-platform: Slot control: codec_out tx interleaver slot 2 doesn't have DAPM widget!!!
> > [    4.387276] sst-mfld-platform sst-mfld-platform: Slot control: codec_out tx interleaver slot 3 doesn't have DAPM widget!!!
> > [    4.390229] sst-mfld-platform sst-mfld-platform: Slot control: codec_in rx deinterleaver codec_in0_0 doesn't have DAPM widget!!!
> > [    4.390249] sst-mfld-platform sst-mfld-platform: Slot control: codec_in rx deinterleaver codec_in0_1 doesn't have DAPM widget!!!
> > [    4.390268] sst-mfld-platform sst-mfld-platform: Slot control: codec_in rx deinterleaver codec_in1_0 doesn't have DAPM widget!!!
> > [    4.390286] sst-mfld-platform sst-mfld-platform: Slot control: codec_in rx deinterleaver codec_in1_1 doesn't have DAPM widget!!!
> > 
> > About a minute of these errors:
> > 
> > [   62.894026] intel_sst_acpi 80860F28:00: Wait timed-out condition:0x0, msg_id:0x2 fw_state 0x3
> > [   62.903888] intel_sst_acpi 80860F28:00: fw returned err -16
> > 
> > And, when I play some audio, these ones:
> > 
> > [  102.350606]  Audio Port: ASoC: no backend DAIs enabled for Audio Port
> > 
> > Full dmesg at [4].
> > 
> > 
> > And, finally, the question: it is possible that the firmware timeout is
> > due to a missing alsa audio path and not to a fw problem?
> > 
> > Thanks,
> > Michele
> > 
> > 
> > [1] https://github.com/michelecurti/x205ta/tree/master/sound-patches
> > [2] https://github.com/michelecurti/x205ta/tree/master/acpi-tables
> > [3] https://git.kernel.org/cgit/linux/kernel/git/vkoul/firmware.git/commit/?h=byt
> > [4] http://pastebin.com/XAQZUvkM
> > 
> 
> -- 
> ~Vinod


More information about the Alsa-devel mailing list