ssi.c (5a2dd72abdae75ea2960145e0549635ce4e0be96) ssi.c (6335d05548eece40092000aa91b64a50310d69d5)
1/*
2 * Serial Sound Interface (I2S) support for SH7760/SH7780
3 *
4 * Copyright (c) 2007 Manuel Lauss <mano@roarinelk.homelinux.net>
5 *
6 * licensed under the terms outlined in the file COPYING at the root
7 * of the linux kernel sources.
8 *

--- 322 unchanged lines hidden (view full) ---

331/* the SSI can do 8-32 bit samples, with 8 possible channels */
332#define SSI_FMTS \
333 (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | \
334 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE | \
335 SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_U20_3LE | \
336 SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_U24_3LE | \
337 SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_U32_LE)
338
1/*
2 * Serial Sound Interface (I2S) support for SH7760/SH7780
3 *
4 * Copyright (c) 2007 Manuel Lauss <mano@roarinelk.homelinux.net>
5 *
6 * licensed under the terms outlined in the file COPYING at the root
7 * of the linux kernel sources.
8 *

--- 322 unchanged lines hidden (view full) ---

331/* the SSI can do 8-32 bit samples, with 8 possible channels */
332#define SSI_FMTS \
333 (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | \
334 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE | \
335 SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_U20_3LE | \
336 SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_U24_3LE | \
337 SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_U32_LE)
338
339static struct snd_soc_dai_ops ssi_dai_ops = {
340 .startup = ssi_startup,
341 .shutdown = ssi_shutdown,
342 .trigger = ssi_trigger,
343 .hw_params = ssi_hw_params,
344 .set_sysclk = ssi_set_sysclk,
345 .set_clkdiv = ssi_set_clkdiv,
346 .set_fmt = ssi_set_fmt,
347};
348
339struct snd_soc_dai sh4_ssi_dai[] = {
340{
341 .name = "SSI0",
342 .id = 0,
343 .playback = {
344 .rates = SSI_RATES,
345 .formats = SSI_FMTS,
346 .channels_min = 2,
347 .channels_max = 8,
348 },
349 .capture = {
350 .rates = SSI_RATES,
351 .formats = SSI_FMTS,
352 .channels_min = 2,
353 .channels_max = 8,
354 },
349struct snd_soc_dai sh4_ssi_dai[] = {
350{
351 .name = "SSI0",
352 .id = 0,
353 .playback = {
354 .rates = SSI_RATES,
355 .formats = SSI_FMTS,
356 .channels_min = 2,
357 .channels_max = 8,
358 },
359 .capture = {
360 .rates = SSI_RATES,
361 .formats = SSI_FMTS,
362 .channels_min = 2,
363 .channels_max = 8,
364 },
355 .ops = {
356 .startup = ssi_startup,
357 .shutdown = ssi_shutdown,
358 .trigger = ssi_trigger,
359 .hw_params = ssi_hw_params,
360 .set_sysclk = ssi_set_sysclk,
361 .set_clkdiv = ssi_set_clkdiv,
362 .set_fmt = ssi_set_fmt,
363 },
365 .ops = &ssi_dai_ops,
364},
365#ifdef CONFIG_CPU_SUBTYPE_SH7760
366{
367 .name = "SSI1",
368 .id = 1,
369 .playback = {
370 .rates = SSI_RATES,
371 .formats = SSI_FMTS,
372 .channels_min = 2,
373 .channels_max = 8,
374 },
375 .capture = {
376 .rates = SSI_RATES,
377 .formats = SSI_FMTS,
378 .channels_min = 2,
379 .channels_max = 8,
380 },
366},
367#ifdef CONFIG_CPU_SUBTYPE_SH7760
368{
369 .name = "SSI1",
370 .id = 1,
371 .playback = {
372 .rates = SSI_RATES,
373 .formats = SSI_FMTS,
374 .channels_min = 2,
375 .channels_max = 8,
376 },
377 .capture = {
378 .rates = SSI_RATES,
379 .formats = SSI_FMTS,
380 .channels_min = 2,
381 .channels_max = 8,
382 },
381 .ops = {
382 .startup = ssi_startup,
383 .shutdown = ssi_shutdown,
384 .trigger = ssi_trigger,
385 .hw_params = ssi_hw_params,
386 .set_sysclk = ssi_set_sysclk,
387 .set_clkdiv = ssi_set_clkdiv,
388 .set_fmt = ssi_set_fmt,
389 },
383 .ops = &ssi_dai_ops,
390},
391#endif
392};
393EXPORT_SYMBOL_GPL(sh4_ssi_dai);
394
395static int __init sh4_ssi_init(void)
396{
397 return snd_soc_register_dais(sh4_ssi_dai, ARRAY_SIZE(sh4_ssi_dai));

--- 12 unchanged lines hidden ---
384},
385#endif
386};
387EXPORT_SYMBOL_GPL(sh4_ssi_dai);
388
389static int __init sh4_ssi_init(void)
390{
391 return snd_soc_register_dais(sh4_ssi_dai, ARRAY_SIZE(sh4_ssi_dai));

--- 12 unchanged lines hidden ---