All of lore.kernel.org
 help / color / mirror / Atom feed
* [ASoC] machine driver and channel configuration
@ 2007-06-08 14:38 Matthieu CASTET
  2007-06-08 15:31 ` Timur Tabi
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu CASTET @ 2007-06-08 14:38 UTC (permalink / raw)
  To: alsa-devel

Hi,

If the platform/cpu_dai driver and codec support capture and playback channels.
But on the board only the playback link is connected.

In this configuration, the codec and platform/cpu_dai driver shouldn't try to
use the capture path (and the resource associated to this).


Is there a way to do something like that ?


Thanks

Matthieu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ASoC] machine driver and channel configuration
  2007-06-08 14:38 [ASoC] machine driver and channel configuration Matthieu CASTET
@ 2007-06-08 15:31 ` Timur Tabi
  2007-06-08 15:55   ` Matthieu CASTET
  0 siblings, 1 reply; 4+ messages in thread
From: Timur Tabi @ 2007-06-08 15:31 UTC (permalink / raw)
  To: Matthieu CASTET; +Cc: alsa-devel

Matthieu CASTET wrote:
> Hi,
> 
> If the platform/cpu_dai driver and codec support capture and playback channels.
> But on the board only the playback link is connected.
> 
> In this configuration, the codec and platform/cpu_dai driver shouldn't try to
> use the capture path (and the resource associated to this).
> 
> 
> Is there a way to do something like that ?

I'm just learning about ASoC myself, but using wm8731.c as an example, wouldn't this work:

struct snd_soc_codec_dai wm8731_dai = {
	.name = "WM8731",
	.playback = {
		.stream_name = "Playback",
		.channels_min = 1,
		.channels_max = 2,
		.rates = WM8731_RATES,
		.formats = WM8731_FORMATS,},
	.capture = {
		.stream_name = "Capture",
		.channels_min = 1,
		.channels_max = 2,
		.rates = WM8731_RATES,
		.formats = WM8731_FORMATS,},

Just change capture.channels_min and channels_max to 0.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ASoC] machine driver and channel configuration
  2007-06-08 15:31 ` Timur Tabi
@ 2007-06-08 15:55   ` Matthieu CASTET
  2007-06-12  6:01     ` Nobin Mathew
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu CASTET @ 2007-06-08 15:55 UTC (permalink / raw)
  To: Timur Tabi; +Cc: alsa-devel

Hi,

Timur Tabi a écrit :
> Matthieu CASTET wrote:
>> Hi,
>>
>> If the platform/cpu_dai driver and codec support capture and playback 
>> channels.
>> But on the board only the playback link is connected.
>>
>> In this configuration, the codec and platform/cpu_dai driver shouldn't 
>> try to
>> use the capture path (and the resource associated to this).
>>
>>
>> Is there a way to do something like that ?
> 
> I'm just learning about ASoC myself, but using wm8731.c as an example, 
> wouldn't this work:
> 
> struct snd_soc_codec_dai wm8731_dai = {
>     .name = "WM8731",
>     .playback = {
>         .stream_name = "Playback",
>         .channels_min = 1,
>         .channels_max = 2,
>         .rates = WM8731_RATES,
>         .formats = WM8731_FORMATS,},
>     .capture = {
>         .stream_name = "Capture",
>         .channels_min = 1,
>         .channels_max = 2,
>         .rates = WM8731_RATES,
>         .formats = WM8731_FORMATS,},
> 
> Just change capture.channels_min and channels_max to 0.
> 

Hum, yes I could change channel info at runtime before doing the 
platform_device_add in machine driver.

I'll try that.

Thanks.
Matthieu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ASoC] machine driver and channel configuration
  2007-06-08 15:55   ` Matthieu CASTET
@ 2007-06-12  6:01     ` Nobin Mathew
  0 siblings, 0 replies; 4+ messages in thread
From: Nobin Mathew @ 2007-06-12  6:01 UTC (permalink / raw)
  To: Matthieu CASTET; +Cc: alsa-devel, Timur Tabi

I think you can have multiple dai objects, in your dai object dont
enable support for Capture, and use that dai object in your Machine
driver.

This should solve the issue



On 6/8/07, Matthieu CASTET <matthieu.castet@parrot.com> wrote:
> Hi,
>
> Timur Tabi a écrit :
> > Matthieu CASTET wrote:
> >> Hi,
> >>
> >> If the platform/cpu_dai driver and codec support capture and playback
> >> channels.
> >> But on the board only the playback link is connected.
> >>
> >> In this configuration, the codec and platform/cpu_dai driver shouldn't
> >> try to
> >> use the capture path (and the resource associated to this).
> >>
> >>
> >> Is there a way to do something like that ?
> >
> > I'm just learning about ASoC myself, but using wm8731.c as an example,
> > wouldn't this work:
> >
> > struct snd_soc_codec_dai wm8731_dai = {
> >     .name = "WM8731",
> >     .playback = {
> >         .stream_name = "Playback",
> >         .channels_min = 1,
> >         .channels_max = 2,
> >         .rates = WM8731_RATES,
> >         .formats = WM8731_FORMATS,},
> >     .capture = {
> >         .stream_name = "Capture",
> >         .channels_min = 1,
> >         .channels_max = 2,
> >         .rates = WM8731_RATES,
> >         .formats = WM8731_FORMATS,},
> >
> > Just change capture.channels_min and channels_max to 0.
> >
>
> Hum, yes I could change channel info at runtime before doing the
> platform_device_add in machine driver.
>
> I'll try that.
>
> Thanks.
> Matthieu
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-12  6:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-08 14:38 [ASoC] machine driver and channel configuration Matthieu CASTET
2007-06-08 15:31 ` Timur Tabi
2007-06-08 15:55   ` Matthieu CASTET
2007-06-12  6:01     ` Nobin Mathew

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.