All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Steve Calfee <stevecalfee@gmail.com>
Cc: Jarkko Nikula <jhnikula@gmail.com>,
	"Premi, Sanjeev" <premi@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Girdwood, Liam" <lrg@ti.com>,
	Peter Hsiang <cdefgab1288@gmail.com>
Subject: Re: beagleboardxm 2.6.39rc4 mcbsp problems.
Date: Thu, 19 May 2011 14:28:09 +0300	[thread overview]
Message-ID: <201105191428.10115.peter.ujfalusi@ti.com> (raw)
In-Reply-To: <4DD464BB.3050708@gmail.com>

Hi,

On Thursday 19 May 2011 03:30:51 Steve Calfee wrote:
> On 05/17/11 03:42, Peter Ujfalusi wrote:
> Good suggestion. After switching to my codec as master, I could see the
> clocks. But one problem was the beagleboardxm trainer has level
> shifters, but they are one directional, and not correct for my use. So I
> reconnected to the expansion port pins (and re-did the voltage
> requirement of the codec to 1.8 volts). Now I get some sound.

Great, we are getting closer.

...

> My codec cannot be set to use only 16 bits per phase. Is there a way to
> setup the omap so that data is sent to both channels? As you can see
> above the xphase bit is one saying dual channels. Is this a dma setup
> problem?

I can not find datasheet for the max98095...
So you can not configure the codec to use 2x16 number of bit clocks. when it 
is configured to receive/send 16bit stereo samples?
Is this the case (that the codec all the time have 32 clock cycles per 
channel)? 

If this is the case, than it is kind of tricky to get around this, but you can 
try the following (warning: hack):

In the codec driver:
create/add a startup callback function for the dais (snd_soc_dai_ops):

static int max98095_startup(struct snd_pcm_substream *substream,
			   struct snd_soc_dai *dai)
{
	snd_pcm_hw_constraint_msbits(substream->runtime, 0, 32, 16);

	return 0;
}

Modify the MAX98095_FORMATS to only support S32_LE (remove the other formats 
for now)

In the hw_params calls handle the S32_LE in a same way as you handle the 
S16_LE.

To explain what we are doing:
Configure the codec to support only S32_LE format, but tell ALSA, that out of 
the 32 bit only the first 16bit is valid.
So the driver will be opened with S32_LE mode, but only the first 16 bits will 
have audio data:
0-15: Left audio
16-31: zero (padding on left channel)
32-47: Right audio
48-63: zero (padding on right channel)

Use aplay -Dplughw:0,0 -v <some sample> to play audio, and see, if the HW has 
been opened with S32_LE.

You should have full stereo sound now.

I have CC-d the author of the wm98095 codec driver, hi might be able to help 
you with the codec setup...

-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-05-19 11:28 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 13:55 [PATCH] ASoC: omap-mcbsp: Remove restrictive checks for cpu type Sanjeev Premi
2011-05-11 13:55 ` Sanjeev Premi
2011-05-11 13:57 ` Mark Brown
2011-05-11 13:57   ` Mark Brown
2011-05-11 14:44 ` Peter Ujfalusi
2011-05-11 14:44   ` [alsa-devel] " Peter Ujfalusi
2011-05-11 15:38 ` Jarkko Nikula
2011-05-11 15:38   ` Jarkko Nikula
2011-05-11 18:16 ` [alsa-devel] " Steve Calfee
2011-05-11 19:19   ` Premi, Sanjeev
2011-05-11 21:31   ` beagleboardxm 2.6.39rc4 mcbsp problems Steve Calfee
2011-05-12  6:25     ` Jarkko Nikula
2011-05-12 11:01       ` Peter Ujfalusi
2011-05-12 18:43         ` Steve Calfee
2011-05-13  5:59           ` Peter Ujfalusi
2011-05-14  2:47             ` Steve Calfee
2011-05-16  8:54               ` Peter Ujfalusi
2011-05-16 18:07                 ` Steve Calfee
2011-05-17  6:37                   ` Jarkko Nikula
2011-05-19  1:06                     ` Steve Calfee
2011-05-20  0:58                       ` Steve Calfee
2011-05-20  6:29                         ` Jarkko Nikula
2011-05-20  7:03                           ` Peter Ujfalusi
2011-05-21  0:55                           ` Steve Calfee
2011-05-17 10:42                   ` Peter Ujfalusi
2011-05-19  0:30                     ` Steve Calfee
2011-05-19 11:28                       ` Peter Ujfalusi [this message]
2011-05-19 23:58                         ` Steve Calfee
2011-05-20  6:56                           ` Peter Ujfalusi
2011-05-13 12:13 ` [PATCH] ASoC: omap-mcbsp: Remove restrictive checks for cpu type Liam Girdwood
2011-05-13 12:13   ` Liam Girdwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201105191428.10115.peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=cdefgab1288@gmail.com \
    --cc=jhnikula@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=premi@ti.com \
    --cc=stevecalfee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.