lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 3 Mar 2010 12:06:11 +0800
From:	Wei Ni <wni@...dia.com>
To:	'Takashi Iwai' <tiwai@...e.de>
CC:	'Pavel Hofman' <pavel.hofman@...ite.cz>,
	'alsa-devel' <alsa-devel@...a-project.org>,
	'linux-kernel' <linux-kernel@...r.kernel.org>,
	'akpm' <akpm@...ux-foundation.org>
Subject: RE: [alsa-devel] [PATCH]Support MCP89 and GT21x hdmi audio

Hi, Takashi
Could we add a new "#define AZX_MAX_SLOTS 8", and use it in the function
azx_command_addr() and azx_response_addr() to instead of AZX_MAX_CODECS

Thanks
Wei.

-----Original Message-----
From: Wei Ni 
Sent: Wednesday, March 03, 2010 11:28 AM
To: 'Takashi Iwai'
Cc: 'Pavel Hofman'; 'alsa-devel'; 'linux-kernel'; 'akpm'
Subject: RE: [alsa-devel] [PATCH]Support MCP89 and GT21x hdmi audio

Hi, Takashi
I still have a question about AZX_MAX_CODECS.
In azx_command_addr() and azx_response_addr(), they use AZX_MAX_CODECS like
If (addr >= AZX_MAX_CODECS) {
    snd_BUG();
    addr = 0;
}
The azx_max_codes[] could not be used in these functions.
How could we do in these functions?

Thanks
Wei.

-----Original Message-----
From: Takashi Iwai [mailto:tiwai@...e.de] 
Sent: Tuesday, March 02, 2010 5:55 PM
To: Wei Ni
Cc: 'Pavel Hofman'; 'alsa-devel'; 'linux-kernel'; 'akpm'
Subject: Re: [alsa-devel] [PATCH]Support MCP89 and GT21x hdmi audio

At Tue, 2 Mar 2010 17:43:28 +0800,
Wei Ni wrote:
> 
> Hi, Takashi
> 1. About AZX_MAX_CODECS, on our new chipset, the codec_mask=0x31, it means
> the codec connect on the slot0, slot4, slot5, and on some GT2xx, the codec
> will connect to slot6 or slot7, although these chip at most have 4 codecs.
> So I change the AZX_MAX_CODECS to 8 directly.
> In hda_intel.c, the azx_command_addr(), azx_response_addr(), and
> azx_codec_create() use the AZX_MAX_CODECS, if it set as 4, the driver will
> not detect the codecs which connect to slot4~7.

Yeah, I understand it.  But, as mentioned, changing this to *all*
controller chips is dangerous.
We have already a quirk for controller chips to set max codecs depending
on the chip model.  Right now, only teradici chip sets to 1.

So, add "#define AZX_DEFAULT_CODECS 4", and use this value unless
azx_max_codecs[] is defined.  And, for the new controller chip
supporting more than 4, it can has 8 in azx_max_codecs[].

Is it feasible?

> 2. yes, it's better to merge the hdmi common codes.
> 3. About ELD, yes, we need to change the Makefile and Kconfig as well.
> Could you help me to change it.

In sound/pci/hda/Makefile, hda_eld.c is built into snd-hda-codec-intelhdmi
by the following rule:

snd-hda-codec-intelhdmi-objs :=	patch_intelhdmi.o hda_eld.o

Since now hda_eld.c is used in two modules, this has to be in the common
place, such as snd-hda-codec.  For this, uncomment the line:

# snd-hda-codec-$(CONFIG_SND_HDA_ELD) += hda_eld.o

and remove hda_eld.o from snd-hda-codec-intelhdmi-objs line.

For Kconfig, right now we have the definition

config SND_HDA_ELD
	def_bool y
	depends on SND_HDA_CODEC_INTELHDMI

Change depends on like

	depends on SND_HDA_CODEC_INTELHDMI || SND_HDA_CODEC_NVHDMI

This can be done via "select" instead.  But, we'd merge all hdmi codes
later, so which way to choose is no big matter.


thanks,

Takashi
-----------------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists