changeset 58:229f0b2dd1bf

HSO audio channel implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 01 Dec 2021 03:26:15 +0000
parents 3afd172b83e1
children 66d99b5be8a3
files venus/src/MCL venus/src/Makefile venus/src/periph/audio_hso.v venus/src/top/mobile.v
diffstat 4 files changed, 102 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/venus/src/MCL	Wed Dec 01 02:22:39 2021 +0000
+++ b/venus/src/MCL	Wed Dec 01 03:26:15 2021 +0000
@@ -256,6 +256,30 @@
  footprint=0402
  npins=2
 
+C406:
+ hier=mob.audio_hso.C22
+ value=33p
+ footprint=0402
+ npins=2
+
+C407:
+ hier=mob.audio_hso.C23
+ value=2.2u
+ footprint=0603
+ npins=2
+
+C408:
+ hier=mob.audio_hso.C37
+ value=10u
+ footprint=0805
+ npins=2
+
+C409:
+ hier=mob.audio_hso.C38
+ value=33p
+ footprint=0402
+ npins=2
+
 C410:
  hier=mob.audio_main.C32
  footprint=0402
@@ -307,6 +331,12 @@
  footprint=0402
  npins=2
 
+C420:
+ hier=mob.audio_hso.HSO_cap
+ value=22u
+ footprint=0805
+ npins=2
+
 C600:
  hier=mob.core.rf.rita2pa_hb.C600
  footprint=0402
@@ -694,6 +724,7 @@
 
 # Jack for headset audio channel
 J402:
+ hier=mob.audio_hso.jack.pkg
  manufacturer=CUI
  manufacturer_part_number=SJ1-42515TS-SMT-TR
  description=2.5 mm audio jack, TRRS, tip switch, SMT
@@ -1106,6 +1137,18 @@
  footprint=0402
  npins=2
 
+R416:
+ hier=mob.audio_hso.R19
+ value=2.2k
+ footprint=0402
+ npins=2
+
+R417:
+ hier=mob.audio_hso.Detect_pullup
+ value=220k
+ footprint=0402
+ npins=2
+
 # attenuators in the Tx path from Rita to PA
 part chip_atten:
  device=RAC101A-3dB
--- a/venus/src/Makefile	Wed Dec 01 02:22:39 2021 +0000
+++ b/venus/src/Makefile	Wed Dec 01 03:26:15 2021 +0000
@@ -9,13 +9,13 @@
 	core/rita_rf_chip.v core/rita_vcxo_int.v core/rita_wrap.v \
 	core/xtal_32khz_wrap.v \
 	periph/MAX1916.v periph/Si9407AEY.v periph/audio_main.v \
-	periph/battery.v periph/bl_current_select.v periph/bl_current_sink.v \
-	periph/calypso_uart_in.v periph/charging_circuit.v \
-	periph/charging_led.v periph/inv_buffer_74LVC1G04.v periph/jtag_if.v \
-	periph/keypad.v periph/keyswitch_wrap.v periph/lcd_module.v \
-	periph/lcd_subsystem.v periph/led_mosfet.v periph/led_npn.v \
-	periph/sim_socket_block.v periph/sim_socket_wrap.v periph/sma_wrap.v \
-	periph/trrs_jack.v \
+	periph/audio_hso.v periph/battery.v periph/bl_current_select.v \
+	periph/bl_current_sink.v periph/calypso_uart_in.v \
+	periph/charging_circuit.v periph/charging_led.v \
+	periph/inv_buffer_74LVC1G04.v periph/jtag_if.v periph/keypad.v \
+	periph/keyswitch_wrap.v periph/lcd_module.v periph/lcd_subsystem.v \
+	periph/led_mosfet.v periph/led_npn.v periph/sim_socket_block.v \
+	periph/sim_socket_wrap.v periph/sma_wrap.v periph/trrs_jack.v \
 	top/board.v top/mobile.v \
 	usb/FT2232D_block.v usb/FT2232D_chip.v usb/eeprom_93Cx6_16bit.v \
 	usb/regulator_ic.v usb/regulator_with_caps.v usb/usb_conn.v \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/venus/src/periph/audio_hso.v	Wed Dec 01 03:26:15 2021 +0000
@@ -0,0 +1,44 @@
+/*
+ * This Verilog module encapsulates our secondary headset audio channel,
+ * connected to Iota headset interface.
+ */
+
+module audio_hso (GND, Vio, HSMICBIAS, HSMICP, HSO, Detect);
+
+input GND, Vio;
+input HSO, HSMICBIAS;
+output HSMICP, Detect;
+
+/* internal wires */
+
+wire EAR_jack, MIC_jack;
+
+/* instantiate the jack */
+
+trrs_jack jack (.T(GND),
+		.R(MIC_jack),
+		.R2(EAR_jack),
+		.S(GND),
+		.T_sw(Detect),
+		.R_sw()		/* not used */
+	);
+
+/* output path */
+
+capacitor HSO_cap (HSO, EAR_jack);
+
+/* microphone input circuit */
+
+capacitor C37 (HSMICBIAS, GND);
+resistor R19 (HSMICBIAS, MIC_jack);
+
+capacitor C38 (MIC_jack, GND);
+
+capacitor C23 (MIC_jack, HSMICP);
+capacitor C22 (HSMICP, GND);
+
+/* Detect pull-up resistor */
+
+resistor Detect_pullup (Detect, Vio);
+
+endmodule
--- a/venus/src/top/mobile.v	Wed Dec 01 02:22:39 2021 +0000
+++ b/venus/src/top/mobile.v	Wed Dec 01 03:26:15 2021 +0000
@@ -215,6 +215,14 @@
 			.MICIP(MICIP)
 	);
 
+audio_hso audio_hso (.GND(GND),
+		     .Vio(Vio),
+		     .HSMICBIAS(HSMICBIAS),
+		     .HSMICP(HSMICP),
+		     .HSO(HSO),
+		     .Detect(GPIO6_headset)
+	);
+
 /* SIM socket */
 sim_socket_block sim (.GND(GND),
 		      .Vio(Vio),