Anyway, on boot I'm getting
AC97 SoC Audio Codec 0.6
asoc: platform pcm constructor failed
asoc: can't create pcm AC97 HiFi
which I guess means that ep93xx_preallocate_dma_buffer() is failing.
Any ideas?
M
gle.com/p/sim1/source/browse/#hg/linux-2.6.35-patches
and am updating them to 2.6.36, then will be able to add your audio stuff.
M
On Fri, Nov 05, 2010 at 12:49:35AM +0100, Martin Guy wrote:
> I've just finished forward-porting the sim.one patches to 2.6.36
> and applying your 3 patches. The DMA fix seems to be in '36 already,
> and the other patches you mentioned
> > ASoC: ac97: don't call snd_soc_new_ac97_codec at probe
> > -> commit 7750752a22cbf7760f0073d218c737f5a03bff4a
> > ASoC: don't register AC97 devices twice
> > -> commit 0562f7882d968463119bb63d47ef4bdaba7d6631
> > ASoC: ac97: add MODULE_ALIAS for the platform driver
> > -> commit 0afe6b901e432bfd93eca9aefdd2ec537b27d1d3
> don't apply. As far as I can tell their contents are already in (?)
Yeah, the above patches are not needed for .36.
> Anyway, on boot I'm getting
>
> AC97 SoC Audio Codec 0.6
> asoc: platform pcm constructor failed
> asoc: can't create pcm AC97 HiFi
>
> which I guess means that ep93xx_preallocate_dma_buffer() is failing.
>
> Any ideas?
Hmm, you only have those 3 patches applied right?
As you say, only thing that can fail is ep93xx_pcm_preallocate_dma_buffer()
which can fail only when dma_alloc_writecombine() fails. Can you
add printk to ep93xx_pcm_preallocate_dma_buffer() just to see that
it is actually called?
Are you possibly using that 16-bit RAM access mode?
Regards,
MW
On Fri, Nov 5, 2010 at 7:34 AM, Mika Westerberg <mika.we...@iki.fi> wrote:
>> Anyway, on boot I'm getting
>>
>> AC97 SoC Audio Codec 0.6
>> asoc: platform pcm constructor failed
>> asoc: can't create pcm AC97 HiFi
>>
>> which I guess means that ep93xx_preallocate_dma_buffer() is failing.
>>
>> Any ideas?
>
> Hmm, you only have those 3 patches applied right?
No, I also have
simone-add-mmc_spi.patch
ep93xx-cpuinfo.patch
ep93xx-touchscreen.patch
simone_defconfig.patch
mmc_spi-fix-SDHC.patch
> As you say, only thing that can fail is
ep93xx_pcm_preallocate_dma_buffer()
> which can fail only when dma_alloc_writecombine() fails. Can you
> add printk to ep93xx_pcm_preallocate_dma_buffer() just to see that
> it is actually called?
It is, twice, on module load of snd-soc-simone:
AC97 SoC Audio Codec 0.6
ep93xx_pcm_preallocate_dma_buffer() called
ep93xx_pcm_preallocate_dma_buffer() called
asoc: platform pcm constructor failed
asoc: can't create pcm AC97 HiFi
> Are you possibly using that 16-bit RAM access mode?
As it happens, no, so the whole 64MB is available.
Can you send the kernel config you're using, in case I've configured it wrong?
Cheers
M
Ok, but those above shouldn't matter.
Just to be sure, you are running 2.6.36 right?
> > As you say, only thing that can fail is
> ep93xx_pcm_preallocate_dma_buffer()
> > which can fail only when dma_alloc_writecombine() fails. Can you
> > add printk to ep93xx_pcm_preallocate_dma_buffer() just to see that
> > it is actually called?
>
> It is, twice, on module load of snd-soc-simone:
>
> AC97 SoC Audio Codec 0.6
> ep93xx_pcm_preallocate_dma_buffer() called
> ep93xx_pcm_preallocate_dma_buffer() called
> asoc: platform pcm constructor failed
> asoc: can't create pcm AC97 HiFi
That's weird -- dma_alloc_writecombine() fails if there is not
enough memory available in the system.
> Can you send the kernel config you're using, in case I've configured it wrong?
See below. It is for .37-rc1 but I guess it should work for .36 as well.
I can provide .36 version later on today if needed.
Regards,
MW
--- simone_defconfig ---
CONFIG_EXPERIMENTAL=y
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_TINY_RCU=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_IOSCHED_CFQ is not set
CONFIG_ARCH_EP93XX=y
CONFIG_CRUNCH=y
CONFIG_EP93XX_SDCE0_PHYS_OFFSET=y
CONFIG_MACH_SIM_ONE=y
CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/nfs ip=bootp"
CONFIG_KEXEC=y
CONFIG_FPE_NWFPE=y
CONFIG_FPE_NWFPE_XP=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_NET_KEY=y
CONFIG_INET=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_SYN_COOKIES=y
# CONFIG_INET_LRO is not set
CONFIG_IPV6=y
# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
# CONFIG_INET6_XFRM_MODE_BEET is not set
# CONFIG_IPV6_SIT is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_FW_LOADER is not set
CONFIG_MTD=y
CONFIG_MTD_CONCAT=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_CFI_STAA=y
CONFIG_MTD_ROM=y
CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_VERIFY_WRITE=y
CONFIG_BLK_DEV_NBD=y
CONFIG_NETDEVICES=y
CONFIG_NET_ETHERNET=y
CONFIG_EP93XX_ETH=y
# CONFIG_INPUT is not set
# CONFIG_SERIO is not set
# CONFIG_VT is not set
CONFIG_SERIAL_AMBA_PL010=y
CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
# CONFIG_LEGACY_PTYS is not set
# CONFIG_HW_RANDOM is not set
CONFIG_I2C=y
# CONFIG_I2C_COMPAT is not set
CONFIG_I2C_GPIO=y
CONFIG_SPI=y
CONFIG_SPI_EP93XX=y
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_EP93XX_WATCHDOG=y
# CONFIG_MFD_SUPPORT is not set
CONFIG_SOUND=y
CONFIG_SND=y
# CONFIG_SND_SUPPORT_OLD_API is not set
# CONFIG_SND_DRIVERS is not set
# CONFIG_SND_ARM is not set
# CONFIG_SND_SPI is not set
CONFIG_SND_SOC=y
CONFIG_SND_EP93XX_SOC=y
CONFIG_SND_EP93XX_SOC_SIMONE=y
# CONFIG_USB_SUPPORT is not set
CONFIG_MMC=y
# CONFIG_MMC_BLOCK_BOUNCE is not set
CONFIG_MMC_SPI=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS1307=y
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
# CONFIG_EXT3_FS_XATTR is not set
CONFIG_EXT4_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_JFFS2_FS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_ROOT_NFS=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
CONFIG_PARTITION_ADVANCED=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_PRINTK_TIME=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEBUG_SLAB=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_LL=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_LIBCRC32C=y
> That's weird -- dma_alloc_writecombine() fails if there is not
> enough memory available in the system.
Thanks. I've got it working by disabling the frame buffer driver to
free some RAM, and the audio driver is fine.
>> Can you send the kernel config you're using, in case I've configured it wrong?
>
> See below. It is for .37-rc1 but I guess it should work for .36 as well.
> I can provide .36 version later on today if needed.
Should be close enough to see what the major differences are; the
exact 2.6.36 one would be useful, but only if it doesn't create work
for you.
Thanks
M
Hi again
In my config, disabling the frame buffer driver -or- disabling USB
makes the ALSA driver work, and from your config, which has FB but no
USB, just enabling USB (CONFIG_USB + CONFIG_USB_OHCI_HCD) makes it
fail, while disabling FB with USB enabled makes it work again.
Are you aware of any kind of DMA resource limits on the EP93xx that
could be causing this?
M
No, except that the amount of memory might limit the DMA allocations.
MW
I just remembered one email I saw on LAKML:
http://lists.arm.linux.org.uk/lurker/message/20101031.182157.71c54a5c.en.html
This is fixed by following mainline commit:
commit c947f69fff183e5d2a06160d9262b5dab7359e95
Author: Russell King <rmk+k...@arm.linux.org.uk>
Date: Wed Nov 3 16:00:15 2010 +0000
ARM: Fix DMA coherent allocator alignment
An out by one bug meant that the DMA coherent allocator was aligning
to one more bit than it should, causing it to run out of available
memory quicker. Fix this.
Reported-by: Petr Štetiar <yn...@true.cz>
Signed-off-by: Russell King <rmk+k...@arm.linux.org.uk>
I suggest that you try to apply that patch and see whether it helps.
MW
I worked around it by defining the video modes for the sim1 to inckude
just 640x480 and 800x600
thereby also reducing the video RAM from 1.5M to 900K.
However, that patch also fixes the problem (tested with the previous
full set of "modedb" video modes enabled)
Thanks!
M