Skip to contentSkip to conversation

Fixed detection of EMP202 audio chip. Some versions have an id of 0x83847650 instead of 0xffffffff.

PATCH In review Gareth Williams 2 participants 4 messages Dec 20, 2011 – Dec 21, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Fixed detection of EMP202 audio chip. Some versions have an id of 0x83847650 instead of 0xffffffff.

Honestech Vidbox NW03 has a EMP202 audio chip with a different Vendor ID.

Apparently, it is the same with the Gadmei ITV380:
http://linuxtv.org/wiki/index.php/Gadmei_USB_TVBox_UTV380

---
 linux/drivers/media/video/em28xx/em28xx-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
linux/drivers/media/video/em28xx/em28xx-core.c +1 -1
index 804a4ab..2982a06 100644
@@ -568,7 +568,7 @@ int em28xx_audio_setup(struct em28xx *dev)
 	em28xx_warn("AC97 features = 0x%04x\n", feat);
 
 	/* Try to identify what audio processor we have */
-	if ((vid == 0xffffffff) && (feat == 0x6a90))
+	if (((vid == 0xffffffff) || (vid == 0x83847650)) && (feat == 0x6a90))
 		dev->audio_mode.ac97 = EM28XX_AC97_EM202;
 	else if ((vid >> 8) == 0x838476)
 		dev->audio_mode.ac97 = EM28XX_AC97_SIGMATEL;
#1 lore raw
Quoted 16 lines · Gareth Williams

Honestech Vidbox NW03 has a EMP202 audio chip with a different Vendor ID.

Apparently, it is the same with the Gadmei ITV380:
http://linuxtv.org/wiki/index.php/Gadmei_USB_TVBox_UTV380

---
 linux/drivers/media/video/em28xx/em28xx-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
linux/drivers/media/video/em28xx/em28xx-core.c +0 -0
index 804a4ab..2982a06 100644

linux/drivers/media/video/em28xx/em28xx-core.c int em28xx_audio_setup(struct em28xx *dev) · line 571

Quoted 5 lines
linux/drivers/media/video/em28xx/em28xx-core.c +1 -1
@@ -568,7 +568,7 @@ int em28xx_audio_setup(struct em28xx *dev)
 	em28xx_warn("AC97 features = 0x%04x\n", feat);
 
 	/* Try to identify what audio processor we have */
-	if ((vid == 0xffffffff) && (feat == 0x6a90))
+	if (((vid == 0xffffffff) || (vid == 0x83847650)) && (feat == 0x6a90))

Are you sure you don't have, instead a STAC9750? 0x83647650 is the code for this chip. Did you open your device to be sure it is really an em202?

Vendors are free to put whatever AC97 chip they want. Each of them have their own differences (different sample rate, different volume controls, etc).

While miss-identifying it may work for your usecase, it will fail for other usecases. The good news is that, in general, the datasheets for AC97 mixers are generally easy to find on Google. Most vendors release them publicly.

Regards,
Mauro

#2 lore raw
Quoted 35 lines · On Wednesday 21 Dec 2011 11:54:33 you wrote:
Quoted 19 lines · Gareth Williams

Honestech Vidbox NW03 has a EMP202 audio chip with a different Vendor ID.

Apparently, it is the same with the Gadmei ITV380:
http://linuxtv.org/wiki/index.php/Gadmei_USB_TVBox_UTV380

---

 linux/drivers/media/video/em28xx/em28xx-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/linux/drivers/media/video/em28xx/em28xx-core.c index 804a4ab..2982a06 100644

linux/drivers/media/video/em28xx/em28xx-core.c int em28xx_audio_setup(struct em28xx *dev) · line 573

Quoted 7 lines
linux/drivers/media/video/em28xx/em28xx-core.c +1 -1
@@ -568,7 +568,7 @@ int em28xx_audio_setup(struct em28xx *dev)
 
 	em28xx_warn("AC97 features = 0x%04x\n", feat);
 
 	/* Try to identify what audio processor we have */
 
-	if ((vid == 0xffffffff) && (feat == 0x6a90))
+	if (((vid == 0xffffffff) || (vid == 0x83847650)) && (feat == 0x6a90))

Are you sure you don't have, instead a STAC9750? 0x83647650 is the code for this chip. Did you open your device to be sure it is really an em202?

Vendors are free to put whatever AC97 chip they want. Each of them have their own differences (different sample rate, different volume controls, etc).

Quoted 7 lines

While miss-identifying it may work for your usecase, it will fail for other usecases. The good news is that, in general, the datasheets for AC97 mixers are generally easy to find on Google. Most vendors release them publicly.

Regards,
Mauro

I opened the box in order to check the chip.

I've opened it again now and can confirm that the chip has the following markings:-

eMPIA
TECHNOLOGY
EMP202
T10189
1110

I've read the EMP202 datasheet and also noticed that it should have 11111111 for the vendor id which is what the driver was originally looking for.

According to the LinuxTV Wiki entry, the Gadmei ITV380 also has the same issue in that it also has an EMP202 inside and a vendor Id of the STAC9750.

Regards,

Gareth

#3 lore raw
Quoted 62 lines · On Wednesday 21 Dec 2011 15:24:43 you wrote:
Quoted 39 lines · On Wednesday 21 Dec 2011 11:54:33 you wrote:
Quoted 21 lines · Gareth Williams

Honestech Vidbox NW03 has a EMP202 audio chip with a different Vendor
ID.

Apparently, it is the same with the Gadmei ITV380:
http://linuxtv.org/wiki/index.php/Gadmei_USB_TVBox_UTV380

---

 linux/drivers/media/video/em28xx/em28xx-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/linux/drivers/media/video/em28xx/em28xx-core.c index 804a4ab..2982a06
100644

linux/drivers/media/video/em28xx/em28xx-core.c int em28xx_audio_setup(struct em28xx *dev) · line 574

Quoted 8 lines
linux/drivers/media/video/em28xx/em28xx-core.c +1 -1
@@ -568,7 +568,7 @@ int em28xx_audio_setup(struct em28xx *dev)
 
 	em28xx_warn("AC97 features = 0x%04x\n", feat);
 
 	/* Try to identify what audio processor we have */
 
-	if ((vid == 0xffffffff) && (feat == 0x6a90))
+	if (((vid == 0xffffffff) || (vid == 0x83847650)) && (feat ==
 0x6a90))

Are you sure you don't have, instead a STAC9750? 0x83647650 is the code for this chip. Did you open your device to be sure it is really an em202?

Vendors are free to put whatever AC97 chip they want. Each of them have their own differences (different sample rate, different volume controls, etc).

Quoted 7 lines

While miss-identifying it may work for your usecase, it will fail for other usecases. The good news is that, in general, the datasheets for AC97 mixers are generally easy to find on Google. Most vendors release them publicly.

Regards,
Mauro

I opened the box in order to check the chip.

I've opened it again now and can confirm that the chip has the following markings:-

eMPIA
TECHNOLOGY
EMP202
T10189
1110

I've read the EMP202 datasheet and also noticed that it should have 11111111 for the vendor id which is what the driver was originally looking for.

Quoted 6 lines

According to the LinuxTV Wiki entry, the Gadmei ITV380 also has the same issue in that it also has an EMP202 inside and a vendor Id of the STAC9750.

Regards,

Gareth

Appologies for double-posting!

I've looked through the datasheets for both devices and the STAC9750 returns a 0x6990 when reading the RESET register (0x00) whereas the EMP202 returns 0x6a90. The driver checks for 0x6a90 in order to decide whether the audio chip is an EMP202 therefore there should be no issues with the identical Vendor IDs.

Regards,

Gareth