From: "Steve Sakoman" Subject: Re: [RFC 0/2] McBSP and ASoC OMAP update patches for 2430 and 34xx Date: Wed, 27 Aug 2008 13:57:36 -0700 Message-ID: <5e088bd90808271357q7edd7cf6u4c7fb265d24dcb79@mail.gmail.com> References: <1219319718-1750-1-git-send-email-jarkko.nikula@nokia.com> <5e088bd90808211451y2ebc4522mb511a9cda7dcdd68@mail.gmail.com> <20080822105757.1c2d0c5c.jarkko.nikula@nokia.com> <5e088bd90808251219t4e0f6562x5837afe727de126@mail.gmail.com> <20080826161938.4fc7e990.jarkko.nikula@nokia.com> <5e088bd90808261018h1e04cbd4o20e88669031eda4d@mail.gmail.com> <20080827093849.c047b6eb.jarkko.nikula@nokia.com> <5e088bd90808270639o1d0ba027r4d6ed9683d68fea2@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from yx-out-2324.google.com ([74.125.44.29]:43291 "EHLO yx-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751250AbYH0U5j (ORCPT ); Wed, 27 Aug 2008 16:57:39 -0400 Received: by yx-out-2324.google.com with SMTP id 8so26735yxm.1 for ; Wed, 27 Aug 2008 13:57:37 -0700 (PDT) In-Reply-To: <5e088bd90808270639o1d0ba027r4d6ed9683d68fea2@mail.gmail.com> Content-Disposition: inline Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Jarkko Nikula Cc: Felipe Balbi , "linux-omap@vger.kernel.org" > Hope to get back to it later today if I can finish bringing up the new hw. Had a few moments to look at this while waiting for a build. This set of ioctl's are called at the failure point: SNDRV_PCM_IOCTL_START:snd_pcm_common_ioctl1 2550 substream c7bdb900 SNDRV_PCM_IOCTL_PVERSION:snd_pcm_common_ioctl1 2514 substream 00000000 SNDRV_PCM_IOCTL_INFO:snd_pcm_common_ioctl1 2517 substream 00000000 Unable to handle kernel NULL pointer dereference at virtual address 00000000 So substream goes null sometime after the SNDRV_PCM_IOCTL_START but before SNDRV_PCM_IOCTL_PVERSION . I believe that those calls are generated by the following code in alsa-lib's snd_pcm_direct_initialize_slave function in src/pcm/pcm_direct.c: ret = snd_pcm_start(spcm); <=== THIS ROUTINE GENERATES A SNDRV_PCM_IOCTL_START IOCTL if (ret < 0) { SNDERR("unable to start PCM stream"); return ret; } if (snd_pcm_poll_descriptors_count(spcm) != 1) { SNDERR("unable to use hardware pcm with fd more than one!!!"); return ret; } snd_pcm_poll_descriptors(spcm, &fd, 1); dmix->hw_fd = fd.fd; save_slave_setting(dmix, spcm); /* Currently, we assume that each dmix client has the same * hw_params setting. * If the arbitrary hw_parmas is supported in future, * boundary has to be taken from the slave config but * recalculated for the native boundary size (for 32bit * emulation on 64bit arch). */ dmix->slave_buffer_size = spcm->buffer_size; dmix->slave_period_size = spcm->period_size; dmix->slave_boundary = spcm->boundary; spcm->donot_close = 1; { int ver = 0; ioctl(spcm->poll_fd, SNDRV_PCM_IOCTL_PVERSION, &ver); <=== THIS IS THE FIRST POINT OF NULL SUBSTREAM if (ver < SNDRV_PROTOCOL_VERSION(2, 0, 8)) dmix->shmptr->use_server = 1; } So this seems to narrow the area to search quite considerably! Back to hw bringup . . . Steve