All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: ALSA patch Nvidia 8 channel hdmi audio
@ 2009-07-01  4:47 Pau Rodriguez-Estivill
  0 siblings, 0 replies; 28+ messages in thread
From: Pau Rodriguez-Estivill @ 2009-07-01  4:47 UTC (permalink / raw)
  To: alsa-devel; +Cc: pchen, marek.vasut, wni, alanwww1

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

I attach a patch to support 24bits and 32kHz, 44.1kHz, 48kHz, 96kHz,
192kHz, all rates that appears in the screenshot submitted by Alan
Alan.

I created also an asound.conf to correct the speakers positions.
Since current driver only support 2, 4, 6 and 8 channels I specified
it in the asound.conf but I'm not sure if this slave.channels should
be fixed.
The main problem is that by using asound.conf I didn't found any way
to route to surround51 (or surround50 or surround40, ...) depending of
the number of channels offered by the sink player.
And when I play directly to hdmi, the AMP reports automatically the
correct number of speakers involved.

Of course it would be nice to have this routes hardcoded in the driver...

[-- Attachment #2: nvhdmi-192khz.patch --]
[-- Type: text/x-diff, Size: 912 bytes --]

--- alsa-kernel/pci/hda/patch_nvhdmi.c.orig	2009-06-27 13:38:01.493407279 +0200
+++ alsa-kernel/pci/hda/patch_nvhdmi.c	2009-07-01 02:34:00.969260248 +0200
@@ -258,9 +258,9 @@
 	.channels_min = 2,
 	.channels_max = 8,
 	.nid = Nv_Master_Convert_nid,
-	.rates = SNDRV_PCM_RATE_48000,
-	.maxbps = 16,
-	.formats = SNDRV_PCM_FMTBIT_S16_LE,
+	.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000,
+	.maxbps = 24,
+	.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
 	.ops = {
 		.open = nvhdmi_dig_playback_pcm_open,
 		.close = nvhdmi_dig_playback_pcm_close_8ch,
@@ -273,7 +273,7 @@
 	.channels_min = 2,
 	.channels_max = 2,
 	.nid = Nv_Master_Convert_nid,
-	.rates = SNDRV_PCM_RATE_48000,
+	.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
 	.maxbps = 16,
 	.formats = SNDRV_PCM_FMTBIT_S16_LE,
 	.ops = {

[-- Attachment #3: asound.conf --]
[-- Type: application/octet-stream, Size: 1307 bytes --]

# Linux has channel order
# FL, FR, RL, RR, C, LFE, SL, SR
# HDMI has this one
# FL, FR, LFE, FC, RL, RR, RLC, RRC

pcm.!front {
  type route
  slave.pcm hdmi
  slave.channels 2
  ttable {
    0.0= 1
    1.1= 1
  }
}
pcm.!surround21 {
  type route
  slave.pcm hdmi
  slave.channels 4
  ttable {
    0.0= 1
    1.1= 1
    2.2= 1
  }
}
pcm.!surround30 {
  type route
  slave.pcm hdmi
  slave.channels 4
  ttable {
    0.0= 1
    1.1= 1
    2.3= 1
  }
}
pcm.!surround31 {
  type route
  slave.pcm hdmi
  slave.channels 4
  ttable {
    0.0= 1
    1.1= 1
    2.3= 1
    3.2= 1
  }
}
pcm.!surround40 {
  type route
  slave.pcm hdmi
  slave.channels 6
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
  }
}
pcm.!surround41 {
  type route
  slave.pcm hdmi
  slave.channels 6
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.2= 1
  }
}
pcm.!surround50 {
  type route
  slave.pcm hdmi
  slave.channels 6
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.3= 1
  }
}
pcm.!surround51 {
  type route
  slave.pcm hdmi
  slave.channels 6
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.3= 1
    5.2= 1
  }
}
pcm.!surround71 {
  type route
  slave.pcm hdmi
  slave.channels 8
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.3= 1
    5.2= 1
    6.6= 1
    7.7= 1
  }
}

[-- Attachment #4: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2009-07-01  4:47 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <410e92830906021458x3d47a1d6jebba8bbe1150e76d@mail.gmail.com>
2009-06-02 22:22 ` ALSA patch Nvidia 8 channel hdmi audio Marek Vasut
     [not found]   ` <410e92830906021530l767478c4tae72c4b161583b6@mail.gmail.com>
2009-06-03  0:00     ` Marek Vasut
2009-06-03  7:14       ` Wei Ni
2009-06-03  7:22         ` Clemens Ladisch
2009-06-03  7:45         ` Takashi Iwai
2009-06-03  8:00         ` Alan Alan
2009-06-03  8:14           ` Takashi Iwai
2009-06-03  9:34             ` Alan Alan
2009-06-03  9:50               ` Takashi Iwai
2009-06-03 23:28                 ` Alan Alan
2009-06-03 23:38                   ` Takashi Iwai
     [not found]                     ` <410e92830906032318v4ed6987cr41c8f73a8a54a9e6@mail.gmail.com>
2009-06-04  6:33                       ` Takashi Iwai
2009-06-04  6:39                         ` Wei Ni
2009-06-04  6:50                           ` Takashi Iwai
2009-06-04 23:20                         ` Alan Alan
2009-06-05  2:38                           ` Wei Ni
2009-06-07 21:43                             ` Alan Alan
2009-06-08  5:20                               ` Takashi Iwai
2009-06-06  9:13                           ` Takashi Iwai
2009-06-03 10:25           ` Wei Ni
2009-06-03 11:02             ` Takashi Iwai
2009-06-04  6:05               ` Wei Ni
2009-06-04  6:29                 ` Takashi Iwai
2009-06-05  4:28                   ` Wu Fengguang
2009-06-05  5:40                     ` Takashi Iwai
2009-06-05  6:14                       ` Wu Fengguang
2009-06-03 11:07             ` Alan Alan
2009-07-01  4:47 Pau Rodriguez-Estivill

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.