Skip to contentSkip to conversation

ALSA patch Nvidia 8 channel hdmi audio

DISCUSSION Marek Vasut 6 participants 27 messages Jun 2, 2009 – Jun 8, 2009 3 messages not in the archive Sound

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 26 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting 8 channel lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except for a few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6 gives the following result (first where it should sound)
FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits 48 khz. I think the minimum which is supported by nvidia hardware is 24bits 96 (or
192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa with the oatched nvidia.c file. Anyway the amplifier shows multichannel LPCM and that's great news.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 2 lines · On Wednesday 03 of June 2009 00:30:04 Alan Alan wrote:

Thank's for the info.
How can i contact him ?

He and alsa-devel mailing list are both in CC already, please preserve them there or fix your mailer.

Quoted 37 lines

2009/6/3 Marek Vasut <[email protected]>

Quoted 33 lines

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 3 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting 8

channel

Quoted 23 lines

lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except for a few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6 gives the following result (first where it should sound)
FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits 48 khz. I think the minimum which is supported by nvidia hardware is 24bits 96 (or 192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa with the oatched nvidia.c file. Anyway the amplifier shows multichannel LPCM and that's great news.

#4 lore raw

Hi, Marek and Alan
I'm a Nvidia engineer and develop this patch file.

I used mplayer to test. The channels are mapped good. Running mplayer -ao alsa:device=hw=0.3 6ch.wav

I tried to use speaker-test to test, but I can't get the hdmi device name. I used speaker-test -Dsurround51:NVidia -c6, the sound output from the analog jack. Which device name should I use?

I use aplay -l, it show
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Thanks
Wei.

-----Original Message-----
From: Marek Vasut [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 8:01 AM
To: Alan Alan
Cc: [email protected]; Wei Ni
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Quoted 2 lines · On Wednesday 03 of June 2009 00:30:04 Alan Alan wrote:

Thank's for the info.
How can i contact him ?

He and alsa-devel mailing list are both in CC already, please preserve them there or fix your mailer.

Quoted 37 lines

2009/6/3 Marek Vasut <[email protected]>

Quoted 33 lines

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 3 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting 8

channel

Quoted 23 lines

lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except for a few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6 gives the following result (first where it should sound)
FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits 48 khz. I think the minimum which is supported by nvidia hardware is 24bits 96 (or 192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa with the oatched nvidia.c file. Anyway the amplifier shows multichannel LPCM and that's great news.

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

#5 lore raw
Quoted 5 lines · Wei Ni

I used mplayer to test. The channels are mapped good. Running mplayer -ao alsa:device=hw=0.3 6ch.wav

I tried to use speaker-test to test, but I can't get the hdmi device name. I used speaker-test -Dsurround51:NVidia -c6, the sound output from the analog jack.

speaker-test -Dhw:0,3 -c6

Or put a line
pcm.hdmi = "hw:0,3"
into your ~/.asoundrc or the /etc/asound.conf file, then you can just use the device name "hdmi" everywhere.

HTH
Clemens

#6 lore raw
In reply to Wei Ni

At Wed, 3 Jun 2009 15:14:19 +0800,

Quoted 8 lines · Wei Ni

Hi, Marek and Alan
I'm a Nvidia engineer and develop this patch file.

I used mplayer to test. The channels are mapped good. Running mplayer -ao alsa:device=hw=0.3 6ch.wav

I tried to use speaker-test to test, but I can't get the hdmi device name.

It's in the recent alsa-lib, but maybe not in the older version. You can see it in "aplay -L" output.

The latest version should work like

% speaker-test -Dhdmi:NVidia -c6

Takashi

Quoted 82 lines

I used speaker-test -Dsurround51:NVidia -c6, the sound output from the analog jack. Which device name should I use?

I use aplay -l, it show
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Thanks
Wei.

-----Original Message-----
From: Marek Vasut [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 8:01 AM
To: Alan Alan
Cc: [email protected]; Wei Ni
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Quoted 2 lines · On Wednesday 03 of June 2009 00:30:04 Alan Alan wrote:

Thank's for the info.
How can i contact him ?

He and alsa-devel mailing list are both in CC already, please preserve them there or fix your mailer.

Quoted 37 lines

2009/6/3 Marek Vasut <[email protected]>

Quoted 33 lines

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 3 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting 8

channel

Quoted 23 lines

lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except for a few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6 gives the following result (first where it should sound)
FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits 48 khz. I think the minimum which is supported by nvidia hardware is 24bits 96 (or 192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa with the oatched nvidia.c file. Anyway the amplifier shows multichannel LPCM and that's great news.

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#7 lore raw
In reply to Wei Ni

Hello Wei !

Thanks for replying.
I tested it with speaker-test and xbmc babylon. Both had problems with channel mapping.
I used this command:

speaker-test -Dhdmi -c6
or
speaker-test -Dhdmi -c8

alternatively you could try

speaker-test -Dhw:0,3 -c6

I had to rund Xorg first and have the command from an xterm, becasue from a normal terminal it would not work.
I think that is normal as a limitation of hdmi.

What about the support for 24bits 192khz sound ?

speaker-test -Dhdmi -c6 -r192000 does not work.

Thanks for working on this.

2009/6/3 Wei Ni <[email protected]>

Quoted 95 lines

Hi, Marek and Alan
I'm a Nvidia engineer and develop this patch file.

I used mplayer to test. The channels are mapped good. Running mplayer -ao alsa:device=hw=0.3 6ch.wav

I tried to use speaker-test to test, but I can't get the hdmi device name. I used speaker-test -Dsurround51:NVidia -c6, the sound output from the analog jack.
Which device name should I use?

I use aplay -l, it show
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Thanks
Wei.

-----Original Message-----
From: Marek Vasut [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 8:01 AM
To: Alan Alan
Cc: [email protected]; Wei Ni
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Quoted 2 lines · On Wednesday 03 of June 2009 00:30:04 Alan Alan wrote:

Thank's for the info.
How can i contact him ?

He and alsa-devel mailing list are both in CC already, please preserve them there or fix your mailer.

Quoted 28 lines

2009/6/3 Marek Vasut <[email protected]>

Quoted 24 lines

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 3 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting 8

channel

Quoted 14 lines

lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except for a few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6 gives the following result (first where it should sound)
FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits 48

khz.

Quoted 1 line
Quoted 1 line
Quoted 1 line

I think the minimum which is supported by nvidia hardware is 24bits

96

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

(or 192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa with

the

Quoted 1 line
Quoted 1 line
Quoted 1 line

oatched nvidia.c file. Anyway the amplifier shows multichannel LPCM

and

Quoted 1 line
Quoted 1 line
Quoted 1 line

that's great news.

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

-----------------------------------------------------------------------------------

#8 lore raw

At Wed, 3 Jun 2009 10:00:24 +0200,

Quoted 17 lines · Alan Alan

Hello Wei !

Thanks for replying.
I tested it with speaker-test and xbmc babylon. Both had problems with channel mapping.
I used this command:

speaker-test -Dhdmi -c6
or
speaker-test -Dhdmi -c8

alternatively you could try

speaker-test -Dhw:0,3 -c6

Quoted 7 lines

I had to rund Xorg first and have the command from an xterm, becasue from a normal terminal it would not work.
I think that is normal as a limitation of hdmi.

What about the support for 24bits 192khz sound ?

speaker-test -Dhdmi -c6 -r192000 does not work.

How about the patch below?

Also, could you give alsa-info.sh output?

Takashi

---

sound/pci/hda/patch_nvhdmi.c +4 -0
index f5792e2..48443de 100644
@@ -258,9 +258,11 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_8ch = {
 	.channels_min = 2,
 	.channels_max = 8,
 	.nid = Nv_Master_Convert_nid,
+#if 0
 	.rates = SNDRV_PCM_RATE_48000,
 	.maxbps = 16,
 	.formats = SNDRV_PCM_FMTBIT_S16_LE,
+#endif
 	.ops = {
 		.open = nvhdmi_dig_playback_pcm_open,
 		.close = nvhdmi_dig_playback_pcm_close_8ch,
@@ -273,9 +275,11 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_2ch = {
 	.channels_min = 2,
 	.channels_max = 2,
 	.nid = Nv_Master_Convert_nid,
+#if 0
 	.rates = SNDRV_PCM_RATE_48000,
 	.maxbps = 16,
 	.formats = SNDRV_PCM_FMTBIT_S16_LE,
+#endif
 	.ops = {
 		.open = nvhdmi_dig_playback_pcm_open,
 		.close = nvhdmi_dig_playback_pcm_close_2ch,
#9 lore raw

Hello Takashi !

What should this patch do ?
Is it a cure for the 96, 192khz or 24bit sample playback problem ? If so, will it resample or natievly pass the stream to the amplifier ?

Thank you

Alan

2009/6/3 Takashi Iwai <[email protected]>

Quoted 67 lines

At Wed, 3 Jun 2009 10:00:24 +0200,

Quoted 12 lines · Alan Alan

Hello Wei !

Thanks for replying.
I tested it with speaker-test and xbmc babylon. Both had problems with channel mapping.
I used this command:

speaker-test -Dhdmi -c6
or
speaker-test -Dhdmi -c8

Quoted 6 lines

alternatively you could try

speaker-test -Dhw:0,3 -c6

I had to rund Xorg first and have the command from an xterm, becasue from

a

Quoted 6 lines

normal terminal it would not work.
I think that is normal as a limitation of hdmi.

What about the support for 24bits 192khz sound ?

speaker-test -Dhdmi -c6 -r192000 does not work.

How about the patch below?

Also, could you give alsa-info.sh output?

Takashi

---

sound/pci/hda/patch_nvhdmi.c +2 -0
index f5792e2..48443de 100644
@@ -258,9 +258,11 @@ static struct hda_pcm_stream
 nvhdmi_pcm_digital_playback_8ch = {
       .channels_min = 2,
       .channels_max = 8,
       .nid = Nv_Master_Convert_nid,
+#if 0
       .rates = SNDRV_PCM_RATE_48000,
       .maxbps = 16,
       .formats = SNDRV_PCM_FMTBIT_S16_LE,
+#endif
       .ops = {
               .open = nvhdmi_dig_playback_pcm_open,

.close = nvhdmi_dig_playback_pcm_close_8ch,

sound/pci/hda/patch_nvhdmi.c +2 -0
@@ -273,9 +275,11 @@ static struct hda_pcm_stream
 nvhdmi_pcm_digital_playback_2ch = {
       .channels_min = 2,
       .channels_max = 2,
       .nid = Nv_Master_Convert_nid,
+#if 0
       .rates = SNDRV_PCM_RATE_48000,
       .maxbps = 16,
       .formats = SNDRV_PCM_FMTBIT_S16_LE,
+#endif
       .ops = {
               .open = nvhdmi_dig_playback_pcm_open,

.close = nvhdmi_dig_playback_pcm_close_2ch,

#10 lore raw

At Wed, 3 Jun 2009 11:34:00 +0200,

Quoted 4 lines · Alan Alan

Hello Takashi !

What should this patch do ?

The patch removes the restriction patch_nvhdmi.c sets. Instead, the driver tries to detect the supported format, rate, etc from the codec widget information.

Quoted 1 line

Is it a cure for the 96, 192khz or 24bit sample playback problem ?

Possibly.

Quoted 1 line

If so, will it resample or natievly pass the stream to the amplifier ?

It just enables the native support, possibly.

And, don't forget to give back the alsa-info.sh output (run with --no-upload option).

Takashi

Quoted 74 lines

Thank you

Alan

2009/6/3 Takashi Iwai <[email protected]>

    At Wed, 3 Jun 2009 10:00:24 +0200,
    Alan Alan wrote:
    >
    > Hello Wei !
    >
    > Thanks for replying.
    > I tested it with speaker-test and xbmc babylon. Both had problems with
    > channel mapping.
    > I used this command:
    >
    > speaker-test -Dhdmi -c6
    > or
    > speaker-test -Dhdmi -c8
    >
    > alternatively you could try
    >
    > speaker-test -Dhw:0,3 -c6
    >
    >
    > I had to rund Xorg first and have the command from an xterm, becasue
    from a
    > normal terminal it would not work.
    > I think that is normal as a limitation of hdmi.
    >
    > What about the support for 24bits 192khz sound ?
    >
    > speaker-test -Dhdmi -c6  -r192000 does not work.
   
    How about the patch below?
   
    Also, could you give alsa-info.sh output?

    Takashi
   
    ---
    diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c
    index f5792e2..48443de 100644
    --- a/sound/pci/hda/patch_nvhdmi.c
    +++ b/sound/pci/hda/patch_nvhdmi.c
    @@ -258,9 +258,11 @@ static struct hda_pcm_stream
    nvhdmi_pcm_digital_playback_8ch = {
           .channels_min = 2,
           .channels_max = 8,
           .nid = Nv_Master_Convert_nid,
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close = nvhdmi_dig_playback_pcm_close_8ch,
    @@ -273,9 +275,11 @@ static struct hda_pcm_stream
    nvhdmi_pcm_digital_playback_2ch = {
           .channels_min = 2,
           .channels_max = 2,
           .nid = Nv_Master_Convert_nid,
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close = nvhdmi_dig_playback_pcm_close_2ch,
#11 lore raw

Hello Takashi !

I tried to apply the patch that removes restrictions to 16bits 48khz format. Well now we have the following:
16bit 48khz works
32bit 48khz works
32bit 44khz, 96khz, 192khz don't work
24bit 44khz, 48khz, 96khz, 192khz don't work
16bit 44khz, 96khz, 192khz don't work

I only get
Sample format not available for playback:
Setting of hwparams failed:

I enclosed to pastebin my alsainfo script output.

http://pastebin.com/m77dcfb3f

Thanks for the help !

2009/6/3 Takashi Iwai <[email protected]>

Quoted 103 lines

At Wed, 3 Jun 2009 11:34:00 +0200,

Quoted 4 lines · Alan Alan

Hello Takashi !

What should this patch do ?

The patch removes the restriction patch_nvhdmi.c sets. Instead, the driver tries to detect the supported format, rate, etc from the codec widget information.

Quoted 1 line

Is it a cure for the 96, 192khz or 24bit sample playback problem ?

Possibly.

Quoted 1 line

If so, will it resample or natievly pass the stream to the amplifier ?

It just enables the native support, possibly.

And, don't forget to give back the alsa-info.sh output (run with --no-upload option).

Takashi

Quoted 7 lines

Thank you

Alan

2009/6/3 Takashi Iwai <[email protected]>

Quoted 7 lines

At Wed, 3 Jun 2009 10:00:24 +0200,
Alan Alan wrote:
>
> Hello Wei !
>
> Thanks for replying.
> I tested it with speaker-test and xbmc babylon. Both had problems

with

Quoted 7 lines
Quoted 7 lines

channel mapping.
I used this command:

speaker-test -Dhdmi -c6
or
speaker-test -Dhdmi -c8

Quoted 6 lines
Quoted 6 lines

alternatively you could try

speaker-test -Dhw:0,3 -c6

I had to rund Xorg first and have the command from an xterm,

becasue

Quoted 8 lines

from a
> normal terminal it would not work.
> I think that is normal as a limitation of hdmi. >
> What about the support for 24bits 192khz sound ? >
> speaker-test -Dhdmi -c6 -r192000 does not work.

Quoted 8 lines

How about the patch below?

Also, could you give alsa-info.sh output?

Takashi

---
diff --git a/sound/pci/hda/patch_nvhdmi.c

b/sound/pci/hda/patch_nvhdmi.c

Quoted 31 lines
    index f5792e2..48443de 100644
    --- a/sound/pci/hda/patch_nvhdmi.c
    +++ b/sound/pci/hda/patch_nvhdmi.c
    @@ -258,9 +258,11 @@ static struct hda_pcm_stream
    nvhdmi_pcm_digital_playback_8ch = {
           .channels_min = 2,
           .channels_max = 8,
           .nid = Nv_Master_Convert_nid,
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close = nvhdmi_dig_playback_pcm_close_8ch,
    @@ -273,9 +275,11 @@ static struct hda_pcm_stream
    nvhdmi_pcm_digital_playback_2ch = {
           .channels_min = 2,
           .channels_max = 2,
           .nid = Nv_Master_Convert_nid,
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close = nvhdmi_dig_playback_pcm_close_2ch,
#12 lore raw

At Thu, 4 Jun 2009 01:28:24 +0200,

Quoted 11 lines · Alan Alan

Hello Takashi !

I tried to apply the patch that removes restrictions to 16bits 48khz format. Well now we have the following:
16bit 48khz                                     works
32bit 48khz                                     works
32bit 44khz, 96khz, 192khz              don't work
24bit 44khz, 48khz, 96khz, 192khz   don't work
16bit 44khz, 96khz, 192khz              don't work

Quoted 3 lines

I only get
Sample format not available for playback:
Setting of hwparams failed:

As you can find in alsa-info output, it seems that the codec supports only 48kHz and 88.2kHz, strangely. I don't know whether it's a (hardware) bug or not.

Takashi

Quoted 112 lines

I enclosed to pastebin my alsainfo script output.

http://pastebin.com/m77dcfb3f

Thanks for the help !

2009/6/3 Takashi Iwai <[email protected]>

At Wed, 3 Jun 2009 11:34:00 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> What should this patch do ?

The patch removes the restriction patch_nvhdmi.c sets.  Instead, the driver tries to detect the supported format, rate, etc from the codec widget information.

> Is it a cure for the 96, 192khz or 24bit sample playback problem ?

Possibly.

> If so, will it resample or natievly pass the stream to the amplifier ?

It just enables the native support, possibly.

And, don't forget to give back the alsa-info.sh output (run with --no-upload option).

Takashi

>
> Thank you
>
> Alan
>
> 2009/6/3 Takashi Iwai <[email protected]>
>
>     At Wed, 3 Jun 2009 10:00:24 +0200,
>     Alan Alan wrote:
>     >
>     > Hello Wei !
>     >
>     > Thanks for replying.
>     > I tested it with speaker-test and xbmc babylon. Both had problems with
>     > channel mapping.
>     > I used this command:
>     >
>     > speaker-test -Dhdmi -c6
>     > or
>     > speaker-test -Dhdmi -c8
>     >
>     > alternatively you could try
>     >
>     > speaker-test -Dhw:0,3 -c6
>     >
>     >
>     > I had to rund Xorg first and have the command from an xterm, becasue
>     from a
>     > normal terminal it would not work.
>     > I think that is normal as a limitation of hdmi.
>     >
>     > What about the support for 24bits 192khz sound ?
>     >
>     > speaker-test -Dhdmi -c6  -r192000 does not work.
>
>     How about the patch below?
>
>     Also, could you give alsa-info.sh output?
>
>     Takashi
>
>     ---
>     diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/ patch_nvhdmi.c
>     index f5792e2..48443de 100644
>     --- a/sound/pci/hda/patch_nvhdmi.c
>     +++ b/sound/pci/hda/patch_nvhdmi.c
>     @@ -258,9 +258,11 @@ static struct hda_pcm_stream
>     nvhdmi_pcm_digital_playback_8ch = {
>            .channels_min = 2,
>            .channels_max = 8,
>            .nid = Nv_Master_Convert_nid,
>     +#if 0
>            .rates = SNDRV_PCM_RATE_48000,
>            .maxbps = 16,
>            .formats = SNDRV_PCM_FMTBIT_S16_LE,
>     +#endif
>            .ops = {
>                    .open = nvhdmi_dig_playback_pcm_open,
>                    .close = nvhdmi_dig_playback_pcm_close_8ch, >     @@ -273,9 +275,11 @@ static struct hda_pcm_stream
>     nvhdmi_pcm_digital_playback_2ch = {
>            .channels_min = 2,
>            .channels_max = 2,
>            .nid = Nv_Master_Convert_nid,
>     +#if 0
>            .rates = SNDRV_PCM_RATE_48000,
>            .maxbps = 16,
>            .formats = SNDRV_PCM_FMTBIT_S16_LE,
>     +#endif
>            .ops = {
>                    .open = nvhdmi_dig_playback_pcm_open,
>                    .close = nvhdmi_dig_playback_pcm_close_2ch, >
>

A message that is not in the archive (sent off-list or not yet received): [email protected]

#14 lore raw

At Thu, 4 Jun 2009 08:18:23 +0200,

Quoted 21 lines · Alan Alan

2009/6/4 Takashi Iwai <[email protected]>

At Thu, 4 Jun 2009 01:28:24 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> I tried to apply the patch that removes restrictions to 16bits 48khz format.
> Well now we have the following:
> 16bit 48khz                                     works
> 32bit 48khz                                     works
> 32bit 44khz, 96khz, 192khz              don't work
> 24bit 44khz, 48khz, 96khz, 192khz   don't work
> 16bit 44khz, 96khz, 192khz              don't work
>
> I only get
> Sample format not available for playback:
> Setting of hwparams failed:

Quoted 7 lines

As you can find in alsa-info output, it seems that the codec supports only 48kHz and 88.2kHz, strangely.  I don't know whether it's a (hardware) bug or not.

The codec surely supports up to 192khz as it works on Windows.

I think this line is completely wrong as here it says:

It is not "wrong". These are values that the codec reports, so it's more or less correct as the h/w information.

Quoted 1 line

  rates [0xc0]: 48000 88200

Wei, is it right? Or is anything missing here?

Quoted 3 lines

    bits [0xf]: 8 16 20 24

8, 20, 24bits are supported, but they all give an error message.

24bit here means 24bit in 4 bytes, thus it's essentially 32bit format. 24bit in 3 bytes format isn't supported on HD-audio.

Quoted 4 lines

32 bits are not supposed to be supported but it works with 48 and 88.2khz.

How can we change the software side to accept 96 or 192khz spample formats and 24 bits ?

As long as the codec reports so, it's no "software" problem.

Quoted 2 lines

I think it is not hardware limited and we just need to change the allowed formats to be played.

If it's just a hardware problem that reports wrong values, you can override the information, simply replacing the bits my patch disabled to the right values.

Takashi

Quoted 117 lines
Quoted 21 lines

I enclosed to pastebin my alsainfo script output.

http://pastebin.com/m77dcfb3f

Thanks for the help !

2009/6/3 Takashi Iwai <[email protected]>

    At Wed, 3 Jun 2009 11:34:00 +0200,
    Alan Alan wrote:
    >
    > Hello Takashi !
    >
    > What should this patch do ?

    The patch removes the restriction patch_nvhdmi.c sets.  Instead, the driver tries to detect the supported format, rate, etc from the codec widget information.

Quoted 5 lines

    > Is it a cure for the 96, 192khz or 24bit sample playback problem ?

    Possibly.

    > If so, will it resample or natievly pass the stream to the

amplifier ?
>
>     It just enables the native support, possibly.
>
>     And, don't forget to give back the alsa-info.sh output (run with >     --no-upload option).
>
>     Takashi
>
>     >
>     > Thank you
>     >
>     > Alan
>     >
>     > 2009/6/3 Takashi Iwai <[email protected]>
>     >
>     >     At Wed, 3 Jun 2009 10:00:24 +0200,
>     >     Alan Alan wrote:
>     >     >
>     >     > Hello Wei !
>     >     >
>     >     > Thanks for replying.
>     >     > I tested it with speaker-test and xbmc babylon. Both had problems
>     with
>     >     > channel mapping.
>     >     > I used this command:
>     >     >
>     >     > speaker-test -Dhdmi -c6
>     >     > or
>     >     > speaker-test -Dhdmi -c8
>     >     >
>     >     > alternatively you could try
>     >     >
>     >     > speaker-test -Dhw:0,3 -c6
>     >     >
>     >     >
>     >     > I had to rund Xorg first and have the command from an xterm, >     becasue
>     >     from a
>     >     > normal terminal it would not work.
>     >     > I think that is normal as a limitation of hdmi. >     >     >
>     >     > What about the support for 24bits 192khz sound ? >     >     >
>     >     > speaker-test -Dhdmi -c6  -r192000 does not work. >     >
>     >     How about the patch below?
>     >
>     >     Also, could you give alsa-info.sh output?
>     >
>     >     Takashi
>     >
>     >     ---
>     >     diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/ >     patch_nvhdmi.c
>     >     index f5792e2..48443de 100644
>     >     --- a/sound/pci/hda/patch_nvhdmi.c
>     >     +++ b/sound/pci/hda/patch_nvhdmi.c
>     >     @@ -258,9 +258,11 @@ static struct hda_pcm_stream >     >     nvhdmi_pcm_digital_playback_8ch = {
>     >            .channels_min = 2,
>     >            .channels_max = 8,
>     >            .nid = Nv_Master_Convert_nid,
>     >     +#if 0
>     >            .rates = SNDRV_PCM_RATE_48000,
>     >            .maxbps = 16,
>     >            .formats = SNDRV_PCM_FMTBIT_S16_LE,
>     >     +#endif
>     >            .ops = {
>     >                    .open = nvhdmi_dig_playback_pcm_open, >     >                    .close = nvhdmi_dig_playback_pcm_close_8ch, >     >     @@ -273,9 +275,11 @@ static struct hda_pcm_stream >     >     nvhdmi_pcm_digital_playback_2ch = {
>     >            .channels_min = 2,
>     >            .channels_max = 2,
>     >            .nid = Nv_Master_Convert_nid,
>     >     +#if 0
>     >            .rates = SNDRV_PCM_RATE_48000,
>     >            .maxbps = 16,
>     >            .formats = SNDRV_PCM_FMTBIT_S16_LE,
>     >     +#endif
>     >            .ops = {
>     >                    .open = nvhdmi_dig_playback_pcm_open, >     >                    .close = nvhdmi_dig_playback_pcm_close_2ch, >     >
>     >
>
>

#15 lore raw

About rates [0xc0]: 48000 88200, what chipset do you use? Or could you tell me the codec id, I will check it with our hardware team.

Thanks
Wei.

-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Thursday, June 04, 2009 2:34 PM
To: Alan Alan
Cc: Wei Ni; Peer Chen; Marek Vasut; [email protected]
Subject: Re: [alsa-devel] ALSA patch Nvidia 8 channel hdmi audio

At Thu, 4 Jun 2009 08:18:23 +0200,

Quoted 9 lines · Alan Alan

2009/6/4 Takashi Iwai <[email protected]>

At Thu, 4 Jun 2009 01:28:24 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> I tried to apply the patch that removes restrictions to 16bits

48khz

Quoted 8 lines

format.
> Well now we have the following:
> 16bit 48khz works
> 32bit 48khz works
> 32bit 44khz, 96khz, 192khz don't work
> 24bit 44khz, 48khz, 96khz, 192khz don't work
> 16bit 44khz, 96khz, 192khz don't work
>

Quoted 5 lines

> I only get
> Sample format not available for playback:
> Setting of hwparams failed:

As you can find in alsa-info output, it seems that the codec

supports

Quoted 6 lines

only 48kHz and 88.2kHz, strangely. I don't know whether it's a (hardware) bug or not.

The codec surely supports up to 192khz as it works on Windows.

I think this line is completely wrong as here it says:

It is not "wrong". These are values that the codec reports, so it's more or less correct as the h/w information.

Quoted 1 line

rates [0xc0]: 48000 88200

Wei, is it right? Or is anything missing here?

Quoted 3 lines
    bits [0xf]: 8 16 20 24

8, 20, 24bits are supported, but they all give an error message.

24bit here means 24bit in 4 bytes, thus it's essentially 32bit format. 24bit in 3 bytes format isn't supported on HD-audio.

Quoted 1 line

32 bits are not supposed to be supported but it works with 48 and

88.2khz.

Quoted 2 lines

How can we change the software side to accept 96 or 192khz spample

formats and

Quoted 1 line

24 bits ?

As long as the codec reports so, it's no "software" problem.

Quoted 1 line

I think it is not hardware limited and we just need to change the

allowed

Quoted 1 line

formats to be played.

If it's just a hardware problem that reports wrong values, you can override the information, simply replacing the bits my patch disabled to the right values.

Takashi

Quoted 10 lines
Quoted 10 lines

I enclosed to pastebin my alsainfo script output.

http://pastebin.com/m77dcfb3f

Thanks for the help !

2009/6/3 Takashi Iwai <[email protected]>

Quoted 8 lines
Quoted 8 lines

At Wed, 3 Jun 2009 11:34:00 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> What should this patch do ?

The patch removes the restriction patch_nvhdmi.c sets.

Instead,

Quoted 1 line
Quoted 1 line

the driver tries to detect the supported format, rate, etc

from the

Quoted 3 lines
Quoted 3 lines

codec widget information.

> Is it a cure for the 96, 192khz or 24bit sample playback

problem ?

Quoted 9 lines
Quoted 4 lines

Possibly.

> If so, will it resample or natievly pass the stream to the

amplifier ?
>
> It just enables the native support, possibly.
>
> And, don't forget to give back the alsa-info.sh output (run

with

Quoted 11 lines
Quoted 11 lines
    --no-upload option).

    Takashi

    >
    > Thank you
    >
    > Alan
    >
    > 2009/6/3 Takashi Iwai <[email protected]>
    >
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

At Wed, 3 Jun 2009 10:00:24 +0200,
Alan Alan wrote:
>
> Hello Wei !
>
> Thanks for replying.
> I tested it with speaker-test and xbmc babylon. Both

had

Quoted 9 lines

problems
> with
> > > channel mapping.
> > > I used this command:
> > >
> > > speaker-test -Dhdmi -c6
> > > or
> > > speaker-test -Dhdmi -c8
> > >

Quoted 6 lines

> > > alternatively you could try
> > >
> > > speaker-test -Dhw:0,3 -c6
> > >
> > >
> > > I had to rund Xorg first and have the command from

an xterm,

Quoted 9 lines
Quoted 9 lines

becasue
> from a
> > normal terminal it would not work.
> > I think that is normal as a limitation of hdmi.
> >
> > What about the support for 24bits 192khz sound ?
> >
> > speaker-test -Dhdmi -c6 -r192000 does not work.
>

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

How about the patch below?

Also, could you give alsa-info.sh output?

Takashi

---
diff --git a/sound/pci/hda/patch_nvhdmi.c

b/sound/pci/hda/

Quoted 9 lines
Quoted 9 lines

patch_nvhdmi.c
> index f5792e2..48443de 100644
> --- a/sound/pci/hda/patch_nvhdmi.c
> +++ b/sound/pci/hda/patch_nvhdmi.c
> @@ -258,9 +258,11 @@ static struct hda_pcm_stream
> nvhdmi_pcm_digital_playback_8ch = {
> .channels_min = 2,
> .channels_max = 8,
> .nid = Nv_Master_Convert_nid,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_8ch,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
    @@ -273,9 +275,11 @@ static struct hda_pcm_stream
    nvhdmi_pcm_digital_playback_2ch = {
           .channels_min = 2,
           .channels_max = 2,
           .nid = Nv_Master_Convert_nid,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_2ch,

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

#16 lore raw

At Thu, 4 Jun 2009 14:39:16 +0800,

Quoted 3 lines · Wei Ni

About rates [0xc0]: 48000 88200, what chipset do you use? Or could you tell me the codec id, I will check it with our hardware team.

You can find the alsa-info.sh output of his machine below:

    http://pastebin.com/m77dcfb3f

Takashi

Quoted 213 lines

Thanks
Wei.

-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Thursday, June 04, 2009 2:34 PM
To: Alan Alan
Cc: Wei Ni; Peer Chen; Marek Vasut; [email protected]
Subject: Re: [alsa-devel] ALSA patch Nvidia 8 channel hdmi audio

At Thu, 4 Jun 2009 08:18:23 +0200,

Quoted 9 lines · Alan Alan

2009/6/4 Takashi Iwai <[email protected]>

At Thu, 4 Jun 2009 01:28:24 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> I tried to apply the patch that removes restrictions to 16bits

48khz

Quoted 8 lines

format.
> Well now we have the following:
> 16bit 48khz works
> 32bit 48khz works
> 32bit 44khz, 96khz, 192khz don't work
> 24bit 44khz, 48khz, 96khz, 192khz don't work
> 16bit 44khz, 96khz, 192khz don't work
>

Quoted 5 lines

> I only get
> Sample format not available for playback:
> Setting of hwparams failed:

As you can find in alsa-info output, it seems that the codec

supports

Quoted 6 lines

only 48kHz and 88.2kHz, strangely. I don't know whether it's a (hardware) bug or not.

The codec surely supports up to 192khz as it works on Windows.

I think this line is completely wrong as here it says:

It is not "wrong". These are values that the codec reports, so it's more or less correct as the h/w information.

Quoted 1 line

rates [0xc0]: 48000 88200

Wei, is it right? Or is anything missing here?

Quoted 3 lines
    bits [0xf]: 8 16 20 24

8, 20, 24bits are supported, but they all give an error message.

24bit here means 24bit in 4 bytes, thus it's essentially 32bit format. 24bit in 3 bytes format isn't supported on HD-audio.

Quoted 1 line

32 bits are not supposed to be supported but it works with 48 and

88.2khz.

Quoted 2 lines

How can we change the software side to accept 96 or 192khz spample

formats and

Quoted 1 line

24 bits ?

As long as the codec reports so, it's no "software" problem.

Quoted 1 line

I think it is not hardware limited and we just need to change the

allowed

Quoted 1 line

formats to be played.

If it's just a hardware problem that reports wrong values, you can override the information, simply replacing the bits my patch disabled to the right values.

Takashi

Quoted 10 lines
Quoted 10 lines

I enclosed to pastebin my alsainfo script output.

http://pastebin.com/m77dcfb3f

Thanks for the help !

2009/6/3 Takashi Iwai <[email protected]>

Quoted 8 lines
Quoted 8 lines

At Wed, 3 Jun 2009 11:34:00 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> What should this patch do ?

The patch removes the restriction patch_nvhdmi.c sets.

Instead,

Quoted 1 line
Quoted 1 line

the driver tries to detect the supported format, rate, etc

from the

Quoted 3 lines
Quoted 3 lines

codec widget information.

> Is it a cure for the 96, 192khz or 24bit sample playback

problem ?

Quoted 9 lines
Quoted 4 lines

Possibly.

> If so, will it resample or natievly pass the stream to the

amplifier ?
>
> It just enables the native support, possibly.
>
> And, don't forget to give back the alsa-info.sh output (run

with

Quoted 11 lines
Quoted 11 lines
    --no-upload option).

    Takashi

    >
    > Thank you
    >
    > Alan
    >
    > 2009/6/3 Takashi Iwai <[email protected]>
    >
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

At Wed, 3 Jun 2009 10:00:24 +0200,
Alan Alan wrote:
>
> Hello Wei !
>
> Thanks for replying.
> I tested it with speaker-test and xbmc babylon. Both

had

Quoted 9 lines

problems
> with
> > > channel mapping.
> > > I used this command:
> > >
> > > speaker-test -Dhdmi -c6
> > > or
> > > speaker-test -Dhdmi -c8
> > >

Quoted 6 lines

> > > alternatively you could try
> > >
> > > speaker-test -Dhw:0,3 -c6
> > >
> > >
> > > I had to rund Xorg first and have the command from

an xterm,

Quoted 9 lines
Quoted 9 lines

becasue
> from a
> > normal terminal it would not work.
> > I think that is normal as a limitation of hdmi.
> >
> > What about the support for 24bits 192khz sound ?
> >
> > speaker-test -Dhdmi -c6 -r192000 does not work.
>

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

How about the patch below?

Also, could you give alsa-info.sh output?

Takashi

---
diff --git a/sound/pci/hda/patch_nvhdmi.c

b/sound/pci/hda/

Quoted 9 lines
Quoted 9 lines

patch_nvhdmi.c
> index f5792e2..48443de 100644
> --- a/sound/pci/hda/patch_nvhdmi.c
> +++ b/sound/pci/hda/patch_nvhdmi.c
> @@ -258,9 +258,11 @@ static struct hda_pcm_stream
> nvhdmi_pcm_digital_playback_8ch = {
> .channels_min = 2,
> .channels_max = 8,
> .nid = Nv_Master_Convert_nid,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_8ch,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
    @@ -273,9 +275,11 @@ static struct hda_pcm_stream
    nvhdmi_pcm_digital_playback_2ch = {
           .channels_min = 2,
           .channels_max = 2,
           .nid = Nv_Master_Convert_nid,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_2ch,

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

#17 lore raw
In reply to Takashi Iwai

I made a test on Windows. And it seems that my codec MCP7A does support up to 8channels 192khz, 24bits no problem.

One important thing i noticed:
If i plug the hdmi to the lcd TV, the windows control panel only shows up
to 2ch, 48khz. When i plug it into the Onkyo-TXSR605 av receiver and reboot, only than it shows up the HD options.

I enclosed a screenshout about it. When i press test button, the audio sounds in the receiver even with 192/24

Strange thing here that on win, it does not even show the 88.2khz number. And sample rates depend on what device is plugged, but on alsa i always get the same output (48, 88.2khz) whatever device i plug on.

2009/6/4 Takashi Iwai <[email protected]>

Quoted 185 lines

At Thu, 4 Jun 2009 08:18:23 +0200,

Quoted 9 lines · Alan Alan

2009/6/4 Takashi Iwai <[email protected]>

At Thu, 4 Jun 2009 01:28:24 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> I tried to apply the patch that removes restrictions to 16bits

48khz

Quoted 12 lines

format.
> Well now we have the following:
> 16bit 48khz works
> 32bit 48khz works
> 32bit 44khz, 96khz, 192khz don't work
> 24bit 44khz, 48khz, 96khz, 192khz don't work
> 16bit 44khz, 96khz, 192khz don't work
>
> I only get
> Sample format not available for playback:
> Setting of hwparams failed:

Quoted 7 lines

As you can find in alsa-info output, it seems that the codec supports only 48kHz and 88.2kHz, strangely. I don't know whether it's a (hardware) bug or not.

The codec surely supports up to 192khz as it works on Windows.

I think this line is completely wrong as here it says:

It is not "wrong". These are values that the codec reports, so it's more or less correct as the h/w information.

Quoted 1 line

rates [0xc0]: 48000 88200

Wei, is it right? Or is anything missing here?

Quoted 3 lines
    bits [0xf]: 8 16 20 24

8, 20, 24bits are supported, but they all give an error message.

24bit here means 24bit in 4 bytes, thus it's essentially 32bit format. 24bit in 3 bytes format isn't supported on HD-audio.

Quoted 1 line

32 bits are not supposed to be supported but it works with 48 and

88.2khz.

Quoted 2 lines

How can we change the software side to accept 96 or 192khz spample

formats and

Quoted 1 line

24 bits ?

As long as the codec reports so, it's no "software" problem.

Quoted 2 lines

I think it is not hardware limited and we just need to change the allowed formats to be played.

If it's just a hardware problem that reports wrong values, you can override the information, simply replacing the bits my patch disabled to the right values.

Takashi

Quoted 10 lines
Quoted 10 lines

I enclosed to pastebin my alsainfo script output.

http://pastebin.com/m77dcfb3f

Thanks for the help !

2009/6/3 Takashi Iwai <[email protected]>

Quoted 8 lines
Quoted 8 lines

At Wed, 3 Jun 2009 11:34:00 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> What should this patch do ?

The patch removes the restriction patch_nvhdmi.c sets.

Instead,

Quoted 1 line
Quoted 1 line

the driver tries to detect the supported format, rate, etc from

the

Quoted 3 lines
Quoted 3 lines

codec widget information.

> Is it a cure for the 96, 192khz or 24bit sample playback

problem ?

Quoted 9 lines
Quoted 4 lines

Possibly.

> If so, will it resample or natievly pass the stream to the

amplifier ?
>
> It just enables the native support, possibly.
>
> And, don't forget to give back the alsa-info.sh output (run

with

Quoted 11 lines
Quoted 11 lines
    --no-upload option).

    Takashi

    >
    > Thank you
    >
    > Alan
    >
    > 2009/6/3 Takashi Iwai <[email protected]>
    >
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

At Wed, 3 Jun 2009 10:00:24 +0200,
Alan Alan wrote:
>
> Hello Wei !
>
> Thanks for replying.
> I tested it with speaker-test and xbmc babylon. Both

had

Quoted 9 lines

problems
> with
> > > channel mapping.
> > > I used this command:
> > >
> > > speaker-test -Dhdmi -c6
> > > or
> > > speaker-test -Dhdmi -c8
> > >

Quoted 6 lines

> > > alternatively you could try
> > >
> > > speaker-test -Dhw:0,3 -c6
> > >
> > >
> > > I had to rund Xorg first and have the command from an

xterm,

Quoted 9 lines
Quoted 9 lines

becasue
> from a
> > normal terminal it would not work.
> > I think that is normal as a limitation of hdmi.
> >
> > What about the support for 24bits 192khz sound ?
> >
> > speaker-test -Dhdmi -c6 -r192000 does not work.
>

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

How about the patch below?

Also, could you give alsa-info.sh output?

Takashi

---
diff --git a/sound/pci/hda/patch_nvhdmi.c

b/sound/pci/hda/

Quoted 9 lines
Quoted 9 lines

patch_nvhdmi.c
> index f5792e2..48443de 100644
> --- a/sound/pci/hda/patch_nvhdmi.c
> +++ b/sound/pci/hda/patch_nvhdmi.c
> @@ -258,9 +258,11 @@ static struct hda_pcm_stream
> nvhdmi_pcm_digital_playback_8ch = {
> .channels_min = 2,
> .channels_max = 8,
> .nid = Nv_Master_Convert_nid,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_8ch,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
    @@ -273,9 +275,11 @@ static struct hda_pcm_stream
    nvhdmi_pcm_digital_playback_2ch = {
           .channels_min = 2,
           .channels_max = 2,
           .nid = Nv_Master_Convert_nid,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =
Quoted 8 lines

nvhdmi_dig_playback_pcm_close_2ch,

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#18 lore raw

Some HDTVs generally only support 32kHz-48kHz, and most (newer) receivers could be able to support 192kHz.

In windows, the display driver will indicates which formats are supported in the CEA registers.

But the linux display driver will not do it.

Could you please add

                .rates = SNDRV_PCM_RATE_192000,

                .maxbps = 24,

And then try to play 192khz/24bit

I also will try it.

Thanks

Wei.

From: Alan Alan [mailto:[email protected]]
Sent: Friday, June 05, 2009 7:21 AM
To: Takashi Iwai
Cc: Wei Ni; Peer Chen; Marek Vasut; [email protected]
Subject: Re: [alsa-devel] ALSA patch Nvidia 8 channel hdmi audio

I made a test on Windows. And it seems that my codec MCP7A does support up to 8channels 192khz, 24bits no problem.

One important thing i noticed:
If i plug the hdmi to the lcd TV, the windows control panel only shows
up to 2ch, 48khz. When i plug it into the Onkyo-TXSR605 av receiver and reboot, only than it shows up the HD options.

I enclosed a screenshout about it. When i press test button, the audio sounds in the receiver even with 192/24

Strange thing here that on win, it does not even show the 88.2khz number. And sample rates depend on what device is plugged, but on alsa i always get the same output (48, 88.2khz) whatever device i plug on.

2009/6/4 Takashi Iwai <[email protected]>

At Thu, 4 Jun 2009 08:18:23 +0200,

Quoted 9 lines · Alan Alan

2009/6/4 Takashi Iwai <[email protected]>

At Thu, 4 Jun 2009 01:28:24 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> I tried to apply the patch that removes restrictions to 16bits

48khz

Quoted 8 lines

format.
> Well now we have the following:
> 16bit 48khz works
> 32bit 48khz works
> 32bit 44khz, 96khz, 192khz don't work
> 24bit 44khz, 48khz, 96khz, 192khz don't work
> 16bit 44khz, 96khz, 192khz don't work
>

Quoted 5 lines

> I only get
> Sample format not available for playback:
> Setting of hwparams failed:

As you can find in alsa-info output, it seems that the codec

supports

Quoted 6 lines

only 48kHz and 88.2kHz, strangely. I don't know whether it's a (hardware) bug or not.

The codec surely supports up to 192khz as it works on Windows.

I think this line is completely wrong as here it says:

It is not "wrong". These are values that the codec reports, so it's more or less correct as the h/w information.

Quoted 1 line

rates [0xc0]: 48000 88200

Wei, is it right? Or is anything missing here?

Quoted 3 lines
    bits [0xf]: 8 16 20 24

8, 20, 24bits are supported, but they all give an error message.

24bit here means 24bit in 4 bytes, thus it's essentially 32bit format. 24bit in 3 bytes format isn't supported on HD-audio.

Quoted 1 line

32 bits are not supposed to be supported but it works with 48 and

88.2khz.

Quoted 2 lines

How can we change the software side to accept 96 or 192khz spample

formats and

Quoted 1 line

24 bits ?

As long as the codec reports so, it's no "software" problem.

Quoted 1 line

I think it is not hardware limited and we just need to change the

allowed

Quoted 1 line

formats to be played.

If it's just a hardware problem that reports wrong values, you can override the information, simply replacing the bits my patch disabled to the right values.

Takashi

Quoted 10 lines
Quoted 10 lines

I enclosed to pastebin my alsainfo script output.

http://pastebin.com/m77dcfb3f

Thanks for the help !

2009/6/3 Takashi Iwai <[email protected]>

Quoted 8 lines
Quoted 8 lines

At Wed, 3 Jun 2009 11:34:00 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> What should this patch do ?

The patch removes the restriction patch_nvhdmi.c sets.

Instead,

Quoted 1 line
Quoted 1 line

the driver tries to detect the supported format, rate, etc

from the

Quoted 3 lines
Quoted 3 lines

codec widget information.

> Is it a cure for the 96, 192khz or 24bit sample playback

problem ?

Quoted 9 lines
Quoted 4 lines

Possibly.

> If so, will it resample or natievly pass the stream to the

amplifier ?
>
> It just enables the native support, possibly.
>
> And, don't forget to give back the alsa-info.sh output (run

with

Quoted 11 lines
Quoted 11 lines
    --no-upload option).

    Takashi

    >
    > Thank you
    >
    > Alan
    >
    > 2009/6/3 Takashi Iwai <[email protected]>
    >
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

At Wed, 3 Jun 2009 10:00:24 +0200,
Alan Alan wrote:
>
> Hello Wei !
>
> Thanks for replying.
> I tested it with speaker-test and xbmc babylon. Both

had

Quoted 9 lines

problems
> with
> > > channel mapping.
> > > I used this command:
> > >
> > > speaker-test -Dhdmi -c6
> > > or
> > > speaker-test -Dhdmi -c8
> > >

Quoted 6 lines

> > > alternatively you could try
> > >
> > > speaker-test -Dhw:0,3 -c6
> > >
> > >
> > > I had to rund Xorg first and have the command from

an xterm,

Quoted 9 lines
Quoted 9 lines

becasue
> from a
> > normal terminal it would not work.
> > I think that is normal as a limitation of hdmi.
> >
> > What about the support for 24bits 192khz sound ?
> >
> > speaker-test -Dhdmi -c6 -r192000 does not work.
>

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

How about the patch below?

Also, could you give alsa-info.sh output?

Takashi

---
diff --git a/sound/pci/hda/patch_nvhdmi.c

b/sound/pci/hda/

Quoted 9 lines
Quoted 9 lines

patch_nvhdmi.c
> index f5792e2..48443de 100644
> --- a/sound/pci/hda/patch_nvhdmi.c
> +++ b/sound/pci/hda/patch_nvhdmi.c
> @@ -258,9 +258,11 @@ static struct hda_pcm_stream
> nvhdmi_pcm_digital_playback_8ch = {
> .channels_min = 2,
> .channels_max = 8,
> .nid = Nv_Master_Convert_nid,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_8ch,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
    @@ -273,9 +275,11 @@ static struct hda_pcm_stream
    nvhdmi_pcm_digital_playback_2ch = {
           .channels_min = 2,
           .channels_max = 2,
           .nid = Nv_Master_Convert_nid,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_2ch,

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

#19 lore raw

Hi Wei !

I made the tests changig the values in the sound/pci/hda/patch_nvhdmi.c file manually.
To summarize the results i have perfect sound up to 192khz/32bits(S32_LE format). But only one configuration at a time.

How can we set multiple formats here, or let the system pass all formats to the av receiver ?

Here are the detailed results i tested.

In the source code
.rates = SNDRV_PCM_RATE_A
.maxbps = B,
.formats = SNDRV_PCM_FMTBIT_SC_LE,

case.

1. A=192000, B=24, C=16, perfect sound, with speaker-test -Dhdmi -c6
-r192000 -FS16_LE, no other setting working
2. A= 192000, B=24, C=32, perfect sound, with speaker-test -Dhdmi -c6
-r192000 -FS32_LE, no other setting working
3. A= 96000, B=24, C=32, perfect sound, with speaker-test -Dhdmi -c6
-r96000 -FS32_LE, no other setting working
4. A=192000, B=24, C=24, strange high pitched sound from all speakers,
with speaker-test -Dhdmi -c6 -r192000 -FS24_LE, no other settings working
5. A= 96000, B=24, C=24, strange high pitched sound from all speakers,
with speaker-test -Dhdmi -c6 -r96000 -FS24_LE, no other settings working

If you want i will test more. But i think it can be seen that S24 formats are not working, but all S16, S32 formats working up to 192khz.

Regards

Alan

2009/6/5 Wei Ni <[email protected]>

Quoted 264 lines

Some HDTVs generally only support 32kHz-48kHz, and most (newer) receivers
could be able to support 192kHz.

In windows, the display driver will indicates which formats are supported in the CEA registers.

But the linux display driver will not do it.

Could you please add

                .rates = SNDRV_PCM_RATE_192000,

                .maxbps = 24,

And then try to play 192khz/24bit

I also will try it.

Thanks

Wei.

*From:* Alan Alan [mailto:[email protected]]
*Sent:* Friday, June 05, 2009 7:21 AM
*To:* Takashi Iwai
*Cc:* Wei Ni; Peer Chen; Marek Vasut; [email protected] *Subject:* Re: [alsa-devel] ALSA patch Nvidia 8 channel hdmi audio

I made a test on Windows. And it seems that my codec MCP7A does support up to 8channels 192khz, 24bits no problem.

One important thing i noticed:
If i plug the hdmi to the lcd TV, the windows control panel only shows up
to 2ch, 48khz. When i plug it into the Onkyo-TXSR605 av receiver and reboot, only than it shows up the HD options.

I enclosed a screenshout about it. When i press test button, the audio sounds in the receiver even with 192/24

Strange thing here that on win, it does not even show the 88.2khz number. And sample rates depend on what device is plugged, but on alsa i always get the same output (48, 88.2khz) whatever device i plug on.

2009/6/4 Takashi Iwai <[email protected]>

At Thu, 4 Jun 2009 08:18:23 +0200,

Quoted 9 lines · Alan Alan

2009/6/4 Takashi Iwai <[email protected]>

At Thu, 4 Jun 2009 01:28:24 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> I tried to apply the patch that removes restrictions to 16bits

48khz

Quoted 12 lines

format.
> Well now we have the following:
> 16bit 48khz works
> 32bit 48khz works
> 32bit 44khz, 96khz, 192khz don't work
> 24bit 44khz, 48khz, 96khz, 192khz don't work
> 16bit 44khz, 96khz, 192khz don't work
>
> I only get
> Sample format not available for playback:
> Setting of hwparams failed:

Quoted 7 lines

As you can find in alsa-info output, it seems that the codec supports only 48kHz and 88.2kHz, strangely. I don't know whether it's a (hardware) bug or not.

The codec surely supports up to 192khz as it works on Windows.

I think this line is completely wrong as here it says:

It is not "wrong". These are values that the codec reports, so it's more or less correct as the h/w information.

Quoted 1 line

rates [0xc0]: 48000 88200

Wei, is it right? Or is anything missing here?

Quoted 3 lines
    bits [0xf]: 8 16 20 24

8, 20, 24bits are supported, but they all give an error message.

24bit here means 24bit in 4 bytes, thus it's essentially 32bit format. 24bit in 3 bytes format isn't supported on HD-audio.

Quoted 1 line

32 bits are not supposed to be supported but it works with 48 and

88.2khz.

Quoted 2 lines

How can we change the software side to accept 96 or 192khz spample

formats and

Quoted 1 line

24 bits ?

As long as the codec reports so, it's no "software" problem.

Quoted 2 lines

I think it is not hardware limited and we just need to change the allowed formats to be played.

If it's just a hardware problem that reports wrong values, you can override the information, simply replacing the bits my patch disabled to the right values.

Takashi

Quoted 10 lines
Quoted 10 lines

I enclosed to pastebin my alsainfo script output.

http://pastebin.com/m77dcfb3f

Thanks for the help !

2009/6/3 Takashi Iwai <[email protected]>

Quoted 8 lines
Quoted 8 lines

At Wed, 3 Jun 2009 11:34:00 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> What should this patch do ?

The patch removes the restriction patch_nvhdmi.c sets.

Instead,

Quoted 1 line
Quoted 1 line

the driver tries to detect the supported format, rate, etc from

the

Quoted 3 lines
Quoted 3 lines

codec widget information.

> Is it a cure for the 96, 192khz or 24bit sample playback

problem ?

Quoted 9 lines
Quoted 4 lines

Possibly.

> If so, will it resample or natievly pass the stream to the

amplifier ?
>
> It just enables the native support, possibly.
>
> And, don't forget to give back the alsa-info.sh output (run

with

Quoted 11 lines
Quoted 11 lines
    --no-upload option).

    Takashi

    >
    > Thank you
    >
    > Alan
    >
    > 2009/6/3 Takashi Iwai <[email protected]>
    >
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

At Wed, 3 Jun 2009 10:00:24 +0200,
Alan Alan wrote:
>
> Hello Wei !
>
> Thanks for replying.
> I tested it with speaker-test and xbmc babylon. Both

had

Quoted 9 lines

problems
> with
> > > channel mapping.
> > > I used this command:
> > >
> > > speaker-test -Dhdmi -c6
> > > or
> > > speaker-test -Dhdmi -c8
> > >

Quoted 6 lines

> > > alternatively you could try
> > >
> > > speaker-test -Dhw:0,3 -c6
> > >
> > >
> > > I had to rund Xorg first and have the command from an

xterm,

Quoted 9 lines
Quoted 9 lines

becasue
> from a
> > normal terminal it would not work.
> > I think that is normal as a limitation of hdmi.
> >
> > What about the support for 24bits 192khz sound ?
> >
> > speaker-test -Dhdmi -c6 -r192000 does not work.
>

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

How about the patch below?

Also, could you give alsa-info.sh output?

Takashi

---
diff --git a/sound/pci/hda/patch_nvhdmi.c

b/sound/pci/hda/

Quoted 9 lines
Quoted 9 lines

patch_nvhdmi.c
> index f5792e2..48443de 100644
> --- a/sound/pci/hda/patch_nvhdmi.c
> +++ b/sound/pci/hda/patch_nvhdmi.c
> @@ -258,9 +258,11 @@ static struct hda_pcm_stream
> nvhdmi_pcm_digital_playback_8ch = {
> .channels_min = 2,
> .channels_max = 8,
> .nid = Nv_Master_Convert_nid,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_8ch,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
    @@ -273,9 +275,11 @@ static struct hda_pcm_stream
    nvhdmi_pcm_digital_playback_2ch = {
           .channels_min = 2,
           .channels_max = 2,
           .nid = Nv_Master_Convert_nid,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_2ch,

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

------------------------------
This email message is for the sole use of the intended recipient(s) and
may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
------------------------------

#20 lore raw

At Sun, 7 Jun 2009 23:43:04 +0200,

Quoted 11 lines · Alan Alan

Hi Wei !

I made the tests changig the values in the sound/pci/hda/patch_nvhdmi.c file manually.
To summarize the results i have perfect sound up to 192khz/32bits(S32_LE format). But only one configuration at a time.

How can we set multiple formats here, or let the system pass all formats to the av receiver ?

Quoted 6 lines

Here are the detailed results i tested.

In the source code
        .rates = SNDRV_PCM_RATE_A
        .maxbps = B,
        .formats = SNDRV_PCM_FMTBIT_SC_LE,

Change like

	.rates = SNDRV_PCM_RATE_A | SNDRV_PCM_RATE_B | ...,
	.maxbps = 24,
	.formats = SNDRV_PCM_FMTBIT_A | SNDRV_PCM_FMTBIT_B | ...,
Quoted 10 lines

1. A=192000, B=24, C=16,      perfect sound, with speaker-test -Dhdmi -c6 -r192000 -FS16_LE, no other setting working
2. A= 192000, B=24, C=32,     perfect sound, with speaker-test -Dhdmi -c6 -r192000 -FS32_LE, no other setting working
3. A= 96000, B=24, C=32,       perfect sound, with speaker-test -Dhdmi -c6 -r96000 -FS32_LE, no other setting working
4. A=192000, B=24, C=24,      strange high pitched sound from all speakers, with speaker-test -Dhdmi -c6 -r192000 -FS24_LE, no other settings working
5. A=  96000, B=24, C=24,      strange high pitched sound from all speakers, with speaker-test -Dhdmi -c6 -r96000 -FS24_LE, no other settings working

S24_LE is no format for HD-audio. It's 24bit packed in lower 3 bytes of 4 byte frame. For 24bit format, use S32_LE.

Takashi

#21 lore raw
In reply to Alan Alan

At Fri, 5 Jun 2009 01:20:52 +0200,

Quoted 9 lines · Alan Alan

I made a test on Windows. And it seems that my codec MCP7A does support up to 8channels 192khz, 24bits no problem.

One important thing i noticed:
If i plug the hdmi to the lcd TV, the windows control panel only shows up
to 2ch, 48khz. When i plug it into the Onkyo-TXSR605 av receiver and reboot, only than it shows up the HD options.

Quoted 6 lines

I enclosed a screenshout about it. When i press test button, the audio sounds in the receiver even with 192/24

Strange thing here that on win, it does not even show the 88.2khz number. And sample rates depend on what device is plugged, but on alsa i always get the same output (48, 88.2khz) whatever device i plug on.

As Wei pointed, currently the video driver doesn't send the correct CEA register setup, thus the supported sample rates aren't updated. (HDMI is a thing that is always coupled with the video. That's why it
works only when you start X.)

Maybe the easiest workaround is to give all possible values statically independent on the plugging state. Try to write other bits in addition to 48k and 16bit format.

BTW, what happens if you plug HDMI before boot and loading the driver?

Takashi

Quoted 198 lines

2009/6/4 Takashi Iwai <[email protected]>

Quoted 193 lines

At Thu, 4 Jun 2009 08:18:23 +0200,

Quoted 9 lines · Alan Alan

2009/6/4 Takashi Iwai <[email protected]>

At Thu, 4 Jun 2009 01:28:24 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> I tried to apply the patch that removes restrictions to 16bits

48khz

Quoted 12 lines

format.
> Well now we have the following:
> 16bit 48khz works
> 32bit 48khz works
> 32bit 44khz, 96khz, 192khz don't work
> 24bit 44khz, 48khz, 96khz, 192khz don't work
> 16bit 44khz, 96khz, 192khz don't work
>
> I only get
> Sample format not available for playback:
> Setting of hwparams failed:

Quoted 7 lines

As you can find in alsa-info output, it seems that the codec supports only 48kHz and 88.2kHz, strangely. I don't know whether it's a (hardware) bug or not.

The codec surely supports up to 192khz as it works on Windows.

I think this line is completely wrong as here it says:

It is not "wrong". These are values that the codec reports, so it's more or less correct as the h/w information.

Quoted 1 line

rates [0xc0]: 48000 88200

Wei, is it right? Or is anything missing here?

Quoted 3 lines
    bits [0xf]: 8 16 20 24

8, 20, 24bits are supported, but they all give an error message.

24bit here means 24bit in 4 bytes, thus it's essentially 32bit format. 24bit in 3 bytes format isn't supported on HD-audio.

Quoted 1 line

32 bits are not supposed to be supported but it works with 48 and

88.2khz.

Quoted 2 lines

How can we change the software side to accept 96 or 192khz spample

formats and

Quoted 1 line

24 bits ?

As long as the codec reports so, it's no "software" problem.

Quoted 2 lines

I think it is not hardware limited and we just need to change the allowed formats to be played.

If it's just a hardware problem that reports wrong values, you can override the information, simply replacing the bits my patch disabled to the right values.

Takashi

Quoted 10 lines
Quoted 10 lines

I enclosed to pastebin my alsainfo script output.

http://pastebin.com/m77dcfb3f

Thanks for the help !

2009/6/3 Takashi Iwai <[email protected]>

Quoted 8 lines
Quoted 8 lines

At Wed, 3 Jun 2009 11:34:00 +0200,
Alan Alan wrote:
>
> Hello Takashi !
>
> What should this patch do ?

The patch removes the restriction patch_nvhdmi.c sets.

Instead,

Quoted 1 line
Quoted 1 line

the driver tries to detect the supported format, rate, etc from

the

Quoted 3 lines
Quoted 3 lines

codec widget information.

> Is it a cure for the 96, 192khz or 24bit sample playback

problem ?

Quoted 9 lines
Quoted 4 lines

Possibly.

> If so, will it resample or natievly pass the stream to the

amplifier ?
>
> It just enables the native support, possibly.
>
> And, don't forget to give back the alsa-info.sh output (run

with

Quoted 11 lines
Quoted 11 lines
    --no-upload option).

    Takashi

    >
    > Thank you
    >
    > Alan
    >
    > 2009/6/3 Takashi Iwai <[email protected]>
    >
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

At Wed, 3 Jun 2009 10:00:24 +0200,
Alan Alan wrote:
>
> Hello Wei !
>
> Thanks for replying.
> I tested it with speaker-test and xbmc babylon. Both

had

Quoted 9 lines

problems
> with
> > > channel mapping.
> > > I used this command:
> > >
> > > speaker-test -Dhdmi -c6
> > > or
> > > speaker-test -Dhdmi -c8
> > >

Quoted 6 lines

> > > alternatively you could try
> > >
> > > speaker-test -Dhw:0,3 -c6
> > >
> > >
> > > I had to rund Xorg first and have the command from an

xterm,

Quoted 9 lines
Quoted 9 lines

becasue
> from a
> > normal terminal it would not work.
> > I think that is normal as a limitation of hdmi.
> >
> > What about the support for 24bits 192khz sound ?
> >
> > speaker-test -Dhdmi -c6 -r192000 does not work.
>

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

How about the patch below?

Also, could you give alsa-info.sh output?

Takashi

---
diff --git a/sound/pci/hda/patch_nvhdmi.c

b/sound/pci/hda/

Quoted 9 lines
Quoted 9 lines

patch_nvhdmi.c
> index f5792e2..48443de 100644
> --- a/sound/pci/hda/patch_nvhdmi.c
> +++ b/sound/pci/hda/patch_nvhdmi.c
> @@ -258,9 +258,11 @@ static struct hda_pcm_stream
> nvhdmi_pcm_digital_playback_8ch = {
> .channels_min = 2,
> .channels_max = 8,
> .nid = Nv_Master_Convert_nid,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_8ch,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
    @@ -273,9 +275,11 @@ static struct hda_pcm_stream
    nvhdmi_pcm_digital_playback_2ch = {
           .channels_min = 2,
           .channels_max = 2,
           .nid = Nv_Master_Convert_nid,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
    +#if 0
           .rates = SNDRV_PCM_RATE_48000,
           .maxbps = 16,
           .formats = SNDRV_PCM_FMTBIT_S16_LE,
    +#endif
           .ops = {
                   .open = nvhdmi_dig_playback_pcm_open,
                   .close =

nvhdmi_dig_playback_pcm_close_2ch,

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
#22 lore raw
In reply to Alan Alan

Hi, Alan

I reproduced this problems with speaker-test. The channels are wrong mapped.

It's strange that if use mplayer to run, it looks ok.

I'm looking this problems, and try to find the root cause.

Thanks

From: Alan Alan [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 4:00 PM
To: Wei Ni
Cc: Marek Vasut; [email protected]; Peer Chen
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Hello Wei !

Thanks for replying.
I tested it with speaker-test and xbmc babylon. Both had problems with channel mapping.
I used this command:

speaker-test -Dhdmi -c6
or
speaker-test -Dhdmi -c8

alternatively you could try

speaker-test -Dhw:0,3 -c6

I had to rund Xorg first and have the command from an xterm, becasue from a normal terminal it would not work.
I think that is normal as a limitation of hdmi.

What about the support for 24bits 192khz sound ?

speaker-test -Dhdmi -c6 -r192000 does not work.

Thanks for working on this.

2009/6/3 Wei Ni <[email protected]>

Hi, Marek and Alan
I'm a Nvidia engineer and develop this patch file.

I used mplayer to test. The channels are mapped good. Running mplayer -ao alsa:device=hw=0.3 6ch.wav

I tried to use speaker-test to test, but I can't get the hdmi device name.
I used speaker-test -Dsurround51:NVidia -c6, the sound output from the analog jack.
Which device name should I use?

I use aplay -l, it show
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Thanks
Wei.

-----Original Message-----
From: Marek Vasut [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 8:01 AM
To: Alan Alan
Cc: [email protected]; Wei Ni
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Quoted 2 lines · On Wednesday 03 of June 2009 00:30:04 Alan Alan wrote:

Thank's for the info.
How can i contact him ?

He and alsa-devel mailing list are both in CC already, please preserve them
there or fix your mailer.

Quoted 17 lines

2009/6/3 Marek Vasut <[email protected]>

Quoted 13 lines

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 3 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting 8

channel

Quoted 3 lines

lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except

for a

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6

gives

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

the following result (first where it should sound) FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits 48

khz.

Quoted 1 line
Quoted 1 line
Quoted 1 line

I think the minimum which is supported by nvidia hardware is

24bits 96

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

(or 192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa with

the

Quoted 1 line
Quoted 1 line
Quoted 1 line

oatched nvidia.c file. Anyway the amplifier shows multichannel

LPCM and

Quoted 1 line
Quoted 1 line
Quoted 1 line

that's great news.

------------------------------------------------------------------------
-----------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
------------------------------------------------------------------------
-----------

#23 lore raw

At Wed, 3 Jun 2009 18:25:09 +0800,

Quoted 9 lines · Wei Ni

Hi, Alan

I reproduced this problems with speaker-test. The channels are wrong mapped.

It's strange that if use mplayer to run, it looks ok.

I'm looking this problems, and try to find the root cause.

Actually, from historical reasons, the standard ALSA channel mapping for 5.1 is

    FL/FR/RL/RR/C/LFE

while Windows sets FL/FR/C/LFE/RL/RR. If you play a WAV file assuming the latter channel assignment, it will be played like that.

Does the nvidia codec support channel-slot assignment (verb 0x734)? If yes, we can assign the channels freely to fix this...

thanks,

Takashi

Quoted 155 lines

Thanks

From: Alan Alan [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 4:00 PM
To: Wei Ni
Cc: Marek Vasut; [email protected]; Peer Chen
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Hello Wei !

Thanks for replying.
I tested it with speaker-test and xbmc babylon. Both had problems with channel mapping.
I used this command:

speaker-test -Dhdmi -c6
or
speaker-test -Dhdmi -c8

alternatively you could try

speaker-test -Dhw:0,3 -c6

I had to rund Xorg first and have the command from an xterm, becasue from a normal terminal it would not work.
I think that is normal as a limitation of hdmi.

What about the support for 24bits 192khz sound ?

speaker-test -Dhdmi -c6 -r192000 does not work.

Thanks for working on this.

2009/6/3 Wei Ni <[email protected]>

Hi, Marek and Alan
I'm a Nvidia engineer and develop this patch file.

I used mplayer to test. The channels are mapped good. Running mplayer -ao alsa:device=hw=0.3 6ch.wav

I tried to use speaker-test to test, but I can't get the hdmi device name.
I used speaker-test -Dsurround51:NVidia -c6, the sound output from the analog jack.
Which device name should I use?

I use aplay -l, it show
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Thanks
Wei.

-----Original Message-----
From: Marek Vasut [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 8:01 AM
To: Alan Alan
Cc: [email protected]; Wei Ni
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Quoted 2 lines · On Wednesday 03 of June 2009 00:30:04 Alan Alan wrote:

Thank's for the info.
How can i contact him ?

He and alsa-devel mailing list are both in CC already, please preserve them
there or fix your mailer.

Quoted 17 lines

2009/6/3 Marek Vasut <[email protected]>

Quoted 13 lines

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 3 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting 8

channel

Quoted 3 lines

lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except

for a

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6

gives

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

the following result (first where it should sound) FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits 48

khz.

Quoted 1 line
Quoted 1 line
Quoted 1 line

I think the minimum which is supported by nvidia hardware is

24bits 96

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

(or 192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa with

the

Quoted 1 line
Quoted 1 line
Quoted 1 line

oatched nvidia.c file. Anyway the amplifier shows multichannel

LPCM and

Quoted 1 line
Quoted 1 line
Quoted 1 line

that's great news.

------------------------------------------------------------------------
-----------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
------------------------------------------------------------------------
-----------

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#24 lore raw

Yes, my test wav file is from Windows.

I had used different player to test with my test wav file. The mplayer has no mapping problem, but other players map channels wrong.
As you said, it seems that is caused by the difference of the ALSA and Windows.

Unfortunately, our nvidia codec doesn't support channel-slot assignment yet.
How could we fix this problems, do you have any suggestions?

Thanks
Wei.

-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 7:02 PM
To: Wei Ni
Cc: Alan Alan; Peer Chen; Marek Vasut; [email protected]
Subject: Re: [alsa-devel] ALSA patch Nvidia 8 channel hdmi audio

At Wed, 3 Jun 2009 18:25:09 +0800,

Quoted 9 lines · Wei Ni

Hi, Alan

I reproduced this problems with speaker-test. The channels are wrong mapped.

It's strange that if use mplayer to run, it looks ok.

I'm looking this problems, and try to find the root cause.

Actually, from historical reasons, the standard ALSA channel mapping for 5.1 is

    FL/FR/RL/RR/C/LFE

while Windows sets FL/FR/C/LFE/RL/RR. If you play a WAV file assuming the latter channel assignment, it will be played like that.

Does the nvidia codec support channel-slot assignment (verb 0x734)? If yes, we can assign the channels freely to fix this...

thanks,

Takashi

Quoted 59 lines

Thanks

From: Alan Alan [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 4:00 PM
To: Wei Ni
Cc: Marek Vasut; [email protected]; Peer Chen
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Hello Wei !

Thanks for replying.
I tested it with speaker-test and xbmc babylon. Both had problems with channel mapping.
I used this command:

speaker-test -Dhdmi -c6
or
speaker-test -Dhdmi -c8

alternatively you could try

speaker-test -Dhw:0,3 -c6

I had to rund Xorg first and have the command from an xterm, becasue from a normal terminal it would not work.
I think that is normal as a limitation of hdmi.

What about the support for 24bits 192khz sound ?

speaker-test -Dhdmi -c6 -r192000 does not work.

Thanks for working on this.

2009/6/3 Wei Ni <[email protected]>

Hi, Marek and Alan
I'm a Nvidia engineer and develop this patch file.

I used mplayer to test. The channels are mapped good. Running mplayer -ao alsa:device=hw=0.3 6ch.wav

I tried to use speaker-test to test, but I can't get the hdmi device name.
I used speaker-test -Dsurround51:NVidia -c6, the sound output from the analog jack.
Which device name should I use?

Quoted 6 lines

I use aplay -l, it show
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200

Digital]

Quoted 17 lines

Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Thanks
Wei.

-----Original Message-----
From: Marek Vasut [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 8:01 AM
To: Alan Alan
Cc: [email protected]; Wei Ni
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Quoted 18 lines
Quoted 2 lines · On Wednesday 03 of June 2009 00:30:04 Alan Alan wrote:

Thank's for the info.
How can i contact him ?

He and alsa-devel mailing list are both in CC already, please preserve them
there or fix your mailer.

Quoted 11 lines

2009/6/3 Marek Vasut <[email protected]>

Quoted 7 lines

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 3 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting

8

Quoted 19 lines
Quoted 6 lines
Quoted 6 lines

channel

Quoted 3 lines

lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except

for a

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6

gives

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

the following result (first where it should sound) FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits

48

Quoted 9 lines

khz.

Quoted 1 line
Quoted 1 line
Quoted 1 line

I think the minimum which is supported by nvidia hardware is

24bits 96

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

(or 192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa

with

Quoted 9 lines

the

Quoted 1 line
Quoted 1 line
Quoted 1 line

oatched nvidia.c file. Anyway the amplifier shows multichannel

LPCM and

Quoted 1 line
Quoted 1 line
Quoted 1 line

that's great news.

------------------------------------------------------------------------

Quoted 2 lines

-----------
This email message is for the sole use of the intended recipient(s)

and

Quoted 7 lines

may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

------------------------------------------------------------------------

Quoted 9 lines

-----------

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#25 lore raw

At Thu, 4 Jun 2009 14:05:52 +0800,

Quoted 8 lines · Wei Ni

Yes, my test wav file is from Windows.

I had used different player to test with my test wav file. The mplayer has no mapping problem, but other players map channels wrong.
As you said, it seems that is caused by the difference of the ALSA and Windows.

I guess mplayer corrects the channel mapping automatically.

Quoted 2 lines

Unfortunately, our nvidia codec doesn't support channel-slot assignment yet.

OK.

Quoted 1 line

How could we fix this problems, do you have any suggestions?

It's a bit difficult issue right now. Usually we could "fix" the channel mapping in alsa-lib configuration. But, HD-audio has currently a single alsa-lib configuration, and others may use the right channel mapping.

I don't remember how is the case of Intel HDMI... Can anyone check? If it also suffers from the same problem, the channel conversion rule can be put in hdmi configuration statically as a temporary workaround.

We need a proper API to inform / change the channel mapping, anyway. Then it'll be better adjustable...

thanks,

Takashi

Quoted 200 lines

Thanks
Wei.

-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 7:02 PM
To: Wei Ni
Cc: Alan Alan; Peer Chen; Marek Vasut; [email protected]
Subject: Re: [alsa-devel] ALSA patch Nvidia 8 channel hdmi audio

At Wed, 3 Jun 2009 18:25:09 +0800,

Quoted 9 lines · Wei Ni

Hi, Alan

I reproduced this problems with speaker-test. The channels are wrong mapped.

It's strange that if use mplayer to run, it looks ok.

I'm looking this problems, and try to find the root cause.

Actually, from historical reasons, the standard ALSA channel mapping for 5.1 is

    FL/FR/RL/RR/C/LFE

while Windows sets FL/FR/C/LFE/RL/RR. If you play a WAV file assuming the latter channel assignment, it will be played like that.

Does the nvidia codec support channel-slot assignment (verb 0x734)? If yes, we can assign the channels freely to fix this...

thanks,

Takashi

Quoted 59 lines

Thanks

From: Alan Alan [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 4:00 PM
To: Wei Ni
Cc: Marek Vasut; [email protected]; Peer Chen
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Hello Wei !

Thanks for replying.
I tested it with speaker-test and xbmc babylon. Both had problems with channel mapping.
I used this command:

speaker-test -Dhdmi -c6
or
speaker-test -Dhdmi -c8

alternatively you could try

speaker-test -Dhw:0,3 -c6

I had to rund Xorg first and have the command from an xterm, becasue from a normal terminal it would not work.
I think that is normal as a limitation of hdmi.

What about the support for 24bits 192khz sound ?

speaker-test -Dhdmi -c6 -r192000 does not work.

Thanks for working on this.

2009/6/3 Wei Ni <[email protected]>

Hi, Marek and Alan
I'm a Nvidia engineer and develop this patch file.

I used mplayer to test. The channels are mapped good. Running mplayer -ao alsa:device=hw=0.3 6ch.wav

I tried to use speaker-test to test, but I can't get the hdmi device name.
I used speaker-test -Dsurround51:NVidia -c6, the sound output from the analog jack.
Which device name should I use?

Quoted 6 lines

I use aplay -l, it show
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200

Digital]

Quoted 17 lines

Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Thanks
Wei.

-----Original Message-----
From: Marek Vasut [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 8:01 AM
To: Alan Alan
Cc: [email protected]; Wei Ni
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Quoted 18 lines
Quoted 2 lines · On Wednesday 03 of June 2009 00:30:04 Alan Alan wrote:

Thank's for the info.
How can i contact him ?

He and alsa-devel mailing list are both in CC already, please preserve them
there or fix your mailer.

Quoted 11 lines

2009/6/3 Marek Vasut <[email protected]>

Quoted 7 lines

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 3 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting

8

Quoted 19 lines
Quoted 6 lines
Quoted 6 lines

channel

Quoted 3 lines

lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except

for a

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6

gives

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

the following result (first where it should sound) FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits

48

Quoted 9 lines

khz.

Quoted 1 line
Quoted 1 line
Quoted 1 line

I think the minimum which is supported by nvidia hardware is

24bits 96

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

(or 192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa

with

Quoted 9 lines

the

Quoted 1 line
Quoted 1 line
Quoted 1 line

oatched nvidia.c file. Anyway the amplifier shows multichannel

LPCM and

Quoted 1 line
Quoted 1 line
Quoted 1 line

that's great news.

------------------------------------------------------------------------

Quoted 2 lines

-----------
This email message is for the sole use of the intended recipient(s)

and

Quoted 7 lines

may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

------------------------------------------------------------------------

Quoted 9 lines

-----------

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#26 lore raw
Quoted 18 lines · Takashi Iwai

At Thu, 4 Jun 2009 14:05:52 +0800,

Quoted 8 lines · Wei Ni

Yes, my test wav file is from Windows.

I had used different player to test with my test wav file. The mplayer has no mapping problem, but other players map channels wrong.
As you said, it seems that is caused by the difference of the ALSA and Windows.

I guess mplayer corrects the channel mapping automatically.

Quoted 2 lines

Unfortunately, our nvidia codec doesn't support channel-slot assignment yet.

OK.

Quoted 8 lines
Quoted 1 line

How could we fix this problems, do you have any suggestions?

It's a bit difficult issue right now. Usually we could "fix" the channel mapping in alsa-lib configuration. But, HD-audio has currently a single alsa-lib configuration, and others may use the right channel mapping.

I don't remember how is the case of Intel HDMI... Can anyone check?

The codecs I tested - G35/G45/GM45 - does not support the channel-slot assignment. I guess future hardwares may support that.

Thanks,
Fengguang

Quoted 207 lines

If it also suffers from the same problem, the channel conversion rule can be put in hdmi configuration statically as a temporary workaround.

We need a proper API to inform / change the channel mapping, anyway. Then it'll be better adjustable...

Quoted 179 lines

-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 7:02 PM
To: Wei Ni
Cc: Alan Alan; Peer Chen; Marek Vasut; [email protected]
Subject: Re: [alsa-devel] ALSA patch Nvidia 8 channel hdmi audio

At Wed, 3 Jun 2009 18:25:09 +0800,

Quoted 9 lines · Wei Ni

Hi, Alan

I reproduced this problems with speaker-test. The channels are wrong mapped.

It's strange that if use mplayer to run, it looks ok.

I'm looking this problems, and try to find the root cause.

Actually, from historical reasons, the standard ALSA channel mapping for 5.1 is

    FL/FR/RL/RR/C/LFE

while Windows sets FL/FR/C/LFE/RL/RR. If you play a WAV file assuming the latter channel assignment, it will be played like that.

Does the nvidia codec support channel-slot assignment (verb 0x734)? If yes, we can assign the channels freely to fix this...

thanks,

Takashi

Quoted 59 lines

Thanks

From: Alan Alan [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 4:00 PM
To: Wei Ni
Cc: Marek Vasut; [email protected]; Peer Chen
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Hello Wei !

Thanks for replying.
I tested it with speaker-test and xbmc babylon. Both had problems with channel mapping.
I used this command:

speaker-test -Dhdmi -c6
or
speaker-test -Dhdmi -c8

alternatively you could try

speaker-test -Dhw:0,3 -c6

I had to rund Xorg first and have the command from an xterm, becasue from a normal terminal it would not work.
I think that is normal as a limitation of hdmi.

What about the support for 24bits 192khz sound ?

speaker-test -Dhdmi -c6 -r192000 does not work.

Thanks for working on this.

2009/6/3 Wei Ni <[email protected]>

Hi, Marek and Alan
I'm a Nvidia engineer and develop this patch file.

I used mplayer to test. The channels are mapped good. Running mplayer -ao alsa:device=hw=0.3 6ch.wav

I tried to use speaker-test to test, but I can't get the hdmi device name.
I used speaker-test -Dsurround51:NVidia -c6, the sound output from the analog jack.
Which device name should I use?

Quoted 6 lines

I use aplay -l, it show
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200

Digital]

Quoted 17 lines

Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Thanks
Wei.

-----Original Message-----
From: Marek Vasut [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 8:01 AM
To: Alan Alan
Cc: [email protected]; Wei Ni
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Quoted 18 lines
Quoted 2 lines · On Wednesday 03 of June 2009 00:30:04 Alan Alan wrote:

Thank's for the info.
How can i contact him ?

He and alsa-devel mailing list are both in CC already, please preserve them
there or fix your mailer.

Quoted 11 lines

2009/6/3 Marek Vasut <[email protected]>

Quoted 7 lines

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 3 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting

8

Quoted 19 lines
Quoted 6 lines
Quoted 6 lines

channel

Quoted 3 lines

lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except

for a

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6

gives

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

the following result (first where it should sound) FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits

48

Quoted 9 lines

khz.

Quoted 1 line
Quoted 1 line
Quoted 1 line

I think the minimum which is supported by nvidia hardware is

24bits 96

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

(or 192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa

with

Quoted 9 lines

the

Quoted 1 line
Quoted 1 line
Quoted 1 line

oatched nvidia.c file. Anyway the amplifier shows multichannel

LPCM and

Quoted 1 line
Quoted 1 line
Quoted 1 line

that's great news.

------------------------------------------------------------------------

Quoted 2 lines

-----------
This email message is for the sole use of the intended recipient(s)

and

Quoted 18 lines
Quoted 7 lines

may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

------------------------------------------------------------------------

Quoted 9 lines

-----------

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#27 lore raw

At Fri, 5 Jun 2009 12:28:29 +0800,

Quoted 27 lines · Wu Fengguang
Quoted 25 lines · Takashi Iwai

At Thu, 4 Jun 2009 14:05:52 +0800,

Quoted 8 lines · Wei Ni

Yes, my test wav file is from Windows.

I had used different player to test with my test wav file. The mplayer has no mapping problem, but other players map channels wrong.
As you said, it seems that is caused by the difference of the ALSA and Windows.

I guess mplayer corrects the channel mapping automatically.

Quoted 2 lines

Unfortunately, our nvidia codec doesn't support channel-slot assignment yet.

OK.

Quoted 1 line

How could we fix this problems, do you have any suggestions?

It's a bit difficult issue right now. Usually we could "fix" the channel mapping in alsa-lib configuration. But, HD-audio has currently a single alsa-lib configuration, and others may use the right channel mapping.

Quoted 4 lines
Quoted 1 line

I don't remember how is the case of Intel HDMI... Can anyone check?

The codecs I tested - G35/G45/GM45 - does not support the channel-slot assignment. I guess future hardwares may support that.

OK, and the channel assignment is also FL/FR/C/LFE/RL/RR, right?

thanks,

Takashi

#28 lore raw
Quoted 29 lines · Takashi Iwai

At Fri, 5 Jun 2009 12:28:29 +0800,

Quoted 27 lines · Wu Fengguang
Quoted 25 lines · Takashi Iwai

At Thu, 4 Jun 2009 14:05:52 +0800,

Quoted 8 lines · Wei Ni

Yes, my test wav file is from Windows.

I had used different player to test with my test wav file. The mplayer has no mapping problem, but other players map channels wrong.
As you said, it seems that is caused by the difference of the ALSA and Windows.

I guess mplayer corrects the channel mapping automatically.

Quoted 2 lines

Unfortunately, our nvidia codec doesn't support channel-slot assignment yet.

OK.

Quoted 1 line

How could we fix this problems, do you have any suggestions?

It's a bit difficult issue right now. Usually we could "fix" the channel mapping in alsa-lib configuration. But, HD-audio has currently a single alsa-lib configuration, and others may use the right channel mapping.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

I don't remember how is the case of Intel HDMI... Can anyone check?

The codecs I tested - G35/G45/GM45 - does not support the channel-slot assignment. I guess future hardwares may support that.

OK, and the channel assignment is also FL/FR/C/LFE/RL/RR, right?

It's FL/FR/LFE/FC/RL/RR for 5.1, but it can be more complicated. HDMI supports a number of speaker configurations - which will be reported via ELD by HDMI sinks. And we have a big mapping table name channel_allocations in patch_intelhdmi.c.

The 6 channel configurations listed in the table are:

                                 /* 5.1 */
{ .ca_index = 0x0b,  .speakers = {   0,    0,  RR,  RL,  FC,  LFE,  FR,  FL } },
{ .ca_index = 0x0c,  .speakers = {   0,   RC,  RR,  RL,   0,    0,  FR,  FL } },
{ .ca_index = 0x0d,  .speakers = {   0,   RC,  RR,  RL,   0,  LFE,  FR,  FL } },
{ .ca_index = 0x0e,  .speakers = {   0,   RC,  RR,  RL,  FC,    0,  FR,  FL } },

Thanks,
Fengguang

#29 lore raw
In reply to Wei Ni

Hello Wei !

If you used mplayer with this command,

"mplayer -ao alsa:device=hw=0.3 6ch.wav"

than i think it might be that the test fiile is faulty. Why not try this test file with a dts stream saying the channles after each other:

http://rapidshare.com/files/240315685/xbmc_dts_test.mkv

I also tried xbmc media center which "treats" the hdmi device as a multichannel analog device and there i found the same mapping problem.

Thanks

2009/6/3 Wei Ni <[email protected]>

Quoted 151 lines

Hi, Alan

I reproduced this problems with speaker-test. The channels are wrong mapped.

It’s strange that if use mplayer to run, it looks ok.

I’m looking this problems, and try to find the root cause.

Thanks

*From:* Alan Alan [mailto:[email protected]] *Sent:* Wednesday, June 03, 2009 4:00 PM
*To:* Wei Ni
*Cc:* Marek Vasut; [email protected]; Peer Chen

*Subject:* Re: ALSA patch Nvidia 8 channel hdmi audio

Hello Wei !

Thanks for replying.
I tested it with speaker-test and xbmc babylon. Both had problems with channel mapping.
I used this command:

speaker-test -Dhdmi -c6
or
speaker-test -Dhdmi -c8

alternatively you could try

speaker-test -Dhw:0,3 -c6

I had to rund Xorg first and have the command from an xterm, becasue from a normal terminal it would not work.
I think that is normal as a limitation of hdmi.

What about the support for 24bits 192khz sound ?

speaker-test -Dhdmi -c6 -r192000 does not work.

Thanks for working on this.

2009/6/3 Wei Ni <[email protected]>

Hi, Marek and Alan
I'm a Nvidia engineer and develop this patch file.

I used mplayer to test. The channels are mapped good. Running mplayer -ao alsa:device=hw=0.3 6ch.wav

I tried to use speaker-test to test, but I can't get the hdmi device name. I used speaker-test -Dsurround51:NVidia -c6, the sound output from the analog jack.
Which device name should I use?

I use aplay -l, it show
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Thanks
Wei.

-----Original Message-----
From: Marek Vasut [mailto:[email protected]]
Sent: Wednesday, June 03, 2009 8:01 AM
To: Alan Alan
Cc: [email protected]; Wei Ni
Subject: Re: ALSA patch Nvidia 8 channel hdmi audio

Quoted 2 lines · On Wednesday 03 of June 2009 00:30:04 Alan Alan wrote:

Thank's for the info.
How can i contact him ?

He and alsa-devel mailing list are both in CC already, please preserve them there or fix your mailer.

Quoted 28 lines

2009/6/3 Marek Vasut <[email protected]>

Quoted 24 lines

I'm not the author of the patch, CCing alsa-devel and the original author.

Quoted 3 lines · On Tuesday 02 of June 2009 23:58:26 Alan Alan wrote:

Hi Marek !

I just read your emailing with nvidia devs about alsa supporting 8

channel

Quoted 14 lines

lpcm over hdmi.

I checked it out an i have to tell it is working awsome, except for a few bugs:

The channels are wrong mapped. Running a speakertest -Dhdmi -c6 gives the following result (first where it should sound)
FL - FL
C - RL
FR - FR
RR - LFE
RL - C

The other thing i realized that playback is limited to 16 bits 48

khz.

Quoted 1 line
Quoted 1 line
Quoted 1 line

I think the minimum which is supported by nvidia hardware is 24bits

96

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

(or 192) khz.
Why not ?

Could you contact the devs as i don't know how to reach them.

ps.: Mybe my build methot was not 100% ok ? I used 1.020 Alsa with

the

Quoted 1 line
Quoted 1 line
Quoted 1 line

oatched nvidia.c file. Anyway the amplifier shows multichannel LPCM

and

Quoted 1 line
Quoted 1 line
Quoted 1 line

that's great news.

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

-----------------------------------------------------------------------------------