doc:appunti:linux:audio:audio_recording_tmb113_e
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
doc:appunti:linux:audio:audio_recording_tmb113_e [2020/12/28 07:39] – created niccolo | doc:appunti:linux:audio:audio_recording_tmb113_e [2020/12/28 16:09] (current) – [Recording with PulseAudio parecord] niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Audio recording with the Acer Travelmate | + | ====== Audio recording with the Acer TravelMate |
- | How to record audio using a **wireless microphone** connected to the audio jack of an **Acer | + | {{acer-travelmate-wireless-microphone.jpg? |
+ | How to record audio using a **wireless microphone** connected to the audio jack of an **Acer | ||
+ | |||
+ | The microphone is a **[[wp> | ||
+ | |||
+ | ===== Electrical connection ===== | ||
+ | |||
+ | I used an headset/ | ||
+ | |||
+ | ^ 1/4" TS female jack ^ Signal | ||
+ | | | Not connected | ||
+ | | | Not connected | ||
+ | | **Sleeve** | ||
+ | | **Tip** | ||
+ | |||
+ | ===== Problem detecting the external microphone ===== | ||
At first try it seems that the use of the **headphone/ | At first try it seems that the use of the **headphone/ | ||
Line 65: | Line 80: | ||
The **pincfg** hex values are shown on stdout by hdajackretask when you press the //Apply now// button, so you can take note and build different files for different scenarios to use during bootstrap. For the TBM113-E the normal status of **pin 0x19** corresponds to the value **0x411111f0**, | The **pincfg** hex values are shown on stdout by hdajackretask when you press the //Apply now// button, so you can take note and build different files for different scenarios to use during bootstrap. For the TBM113-E the normal status of **pin 0x19** corresponds to the value **0x411111f0**, | ||
- | I used the PulseAudio mixer **pavucontrol** to set the recording volume level: it turned out that a value of **16463** (corresponding to 25% of the slider, or -36.00 dB) is the best setting for normal speach. At the ALSA level (lower level interface used by PylseAudio) it means a **Capture** level of **100** and a **Mic Boost** of **0**. This is a table of value correspondence between PulseAudio and ALSA: | + | When you apply the pin override in **hdajackretask**, |
+ | |||
+ | If instead the override is made at bootstrap via the modules patch option, the settings survive after the hibernation: | ||
+ | |||
+ | ===== Setting the recording volume with PulseAudio ===== | ||
+ | |||
+ | I used the PulseAudio mixer **pavucontrol** to set the recording volume level: it turned out that a value of **16463** (corresponding to 25% of the slider, or -36.00 dB) is the best setting for normal speach. At the ALSA level (lower level interface used by PulseAudio) it means a **Capture** level of **100** and a **Mic Boost** of **0**. This is a table of value correspondence between PulseAudio and ALSA (notice that it is specific to this PCI sound card): | ||
^ ALSA ^ PulseAudio | ^ ALSA ^ PulseAudio | ||
Line 72: | Line 93: | ||
| Capture 100, Mic Boost 51 | Volume: 41353 / 63% / -12.00 dB | | | Capture 100, Mic Boost 51 | Volume: 41353 / 63% / -12.00 dB | | ||
- | When you apply the pin override in **hdajackretask**, it is not clear **how to disable the external microphone**: re-setting | + | You can check the correspondence between |
- | If instead | + | ===== Recording with PulseAudio parecord ===== |
+ | |||
+ | I want to use the **PulseAudio** subsystem to record the audio; I don't want to use the ALSA kernel-level interface, which needs direct and exclusive access to the device. | ||
+ | |||
+ | Using the command **pacmd list-sources** | ||
+ | |||
+ | |||
+ | The recording volume should be a vaule between the **base volume** and **65536** (corresponding to 100%, or 0.00 dB). Every different hardware should be tested to find the best settings to get a clear and loud sound, but to avoid clipping (out of scale samples). | ||
+ | |||
+ | < | ||
+ | pacmd list-sources | ||
+ | 2 source(s) available. | ||
+ | index: 0 | ||
+ | name: < | ||
+ | ... | ||
+ | properties: | ||
+ | device.description = " | ||
+ | device.class = " | ||
+ | ... | ||
+ | * index: 1 | ||
+ | name: < | ||
+ | volume: front-left: 26092 / 40% / -24.00 dB, | ||
+ | base volume: 5206 / 8% / -66.00 dB | ||
+ | ... | ||
+ | properties: | ||
+ | device.class = " | ||
+ | ... | ||
+ | ports: | ||
+ | analog-input-internal-mic: | ||
+ | ... | ||
+ | analog-input-mic: | ||
+ | active port: < | ||
+ | </ | ||
+ | |||
+ | **Beware** that with the audio card of the TMB113-E, the port **analog-input-mic** refers to the external | ||
+ | |||
+ | Once you understand | ||
+ | |||
+ | <code bash> | ||
+ | #!/bin/sh | ||
+ | SOURCE=' | ||
+ | PORT=' | ||
+ | VOLUME=16463 | ||
+ | pacmd set-default-source " | ||
+ | pacmd set-source-port " | ||
+ | pacmd set-source-volume " | ||
+ | pacmd set-source-mute " | ||
+ | parecord --verbose --device=" | ||
+ | </ | ||
+ | |||
+ | The result is a **44100 Hz, 16 bit little-endian, | ||
+ | |||
+ | ===== Microphone plug/unplug events ===== | ||
Having set the pin 19 forcibly to microphone, I often noticed that microphone plug/unplug **events are reported continously** (about every 3 seconds) by the ACPI subsystem: | Having set the pin 19 forcibly to microphone, I often noticed that microphone plug/unplug **events are reported continously** (about every 3 seconds) by the ACPI subsystem: |
doc/appunti/linux/audio/audio_recording_tmb113_e.1609141165.txt.gz · Last modified: 2020/12/28 07:39 by niccolo