Re: [PATCH 4/5] chtrt5645: Remove bogus JackHWMute settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 4/6/20 1:22 AM, Pierre-Louis Bossart wrote:


On 4/5/20 1:34 PM, Hans de Goede wrote:
There is no reason why the internal microphone or speakers cannot
be used when a headset is plugged in.

The jack does not physically disconnect these, so the JackHWMute settings
are wrong, remove them.

Are you sure about the internal mic and headset input not conflicting? IIRC they use the same path after the initial routing selector. I may be wrong but I'd be surprised if you can use both.

Now that I think of it further, in case the SSP0 is used an I2S link is configured, so you cannot have both streams in parallel. It may be possible to use headset and dmic in parallel with the 4 slot version but we also have 1 PCM capture only.

So overall it seems rather unlikely that we can support dmic + headset mic in parallel?

Right that is what the ConflictingDevices sections are for.

Removing the JackHWMute does not allow using both add the same time,
it merely allows overriding which of the 2 to use (if the headset mic
is detected by the jack, the JackControl setting is kept).

So lets say the internal mic is crappy, but the user prefers to
have their ears free, then they can use a headset around there neck,
using just the headset-mic and select speakers as output even though
a jack is inserted.

Note pulseaudio will still automatically switch to the headphones /
headsetmic when plugged in, this merely allows overriding that
choice manually.

Jacks which actually physically disable (or re-route) signals are
quite rare now a days so having a JackHWMute in the UCM conf is
often wrong. After this patch only a few cases are left:

[hans@x1 alsa-ucm-conf]$ ack -l JackHWMute ucm2
ucm2/HDA-Intel/HiFi-dual.conf
ucm2/chtrt5650/HiFi.conf
ucm2/hda-dsp/HiFi.conf
ucm2/codecs/es8316/HeadPhones.conf
ucm2/sof-bdw-rt5677/HiFi.conf
ucm2/broxton-rt298/HiFi.conf
ucm2/skylake-rt286/HiFi.conf

The es8316 case is actually correct, the es8316 has only 1
output (which is amplified for e.g. a speaker) and at
least the reference design suggests routing the speaker signal
through the jack and using a jack which will interrupt the
signal when headphones are plugged in.

Note most actual designs implement this with an analog
switch and a GPIO to control that switch, since 3.5 mm
jacks which actually can disconnect a signal are rare
(if they exist at all, but I guess they do). For the
designs using the GPIO controlled analog switch, the
JackHWMute technically also is wrong, but I put it
there (IIRC it was me) because it matches the reference
design.

I'm not familiar enough with any of the others to say anything
about them, but most of them are for HDA setups, where this
is somewhat more normal I guess.

Regards,

Hans





Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
  ucm2/chtrt5645/HiFi-dmic1.conf                   | 2 --
  ucm2/chtrt5645/HiFi-dmic2.conf                   | 2 --
  ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf | 2 --
  ucm2/chtrt5645/HiFi.conf                         | 2 --
  4 files changed, 8 deletions(-)

diff --git a/ucm2/chtrt5645/HiFi-dmic1.conf b/ucm2/chtrt5645/HiFi-dmic1.conf
index 1a8ee0a..c7e12c9 100644
--- a/ucm2/chtrt5645/HiFi-dmic1.conf
+++ b/ucm2/chtrt5645/HiFi-dmic1.conf
@@ -50,7 +50,6 @@ SectionDevice."Headphones" {
          PlaybackPriority 200
          PlaybackPCM "hw:${CardId}"
          JackControl "Headphone Jack"
-        JackHWMute "Speaker"
      }
      ConflictingDevice [
@@ -96,7 +95,6 @@ SectionDevice."Headset" {
          CapturePriority 200
          CapturePCM "hw:${CardId}"
          JackControl "Headset Mic Jack"
-        JackHWMute "Mic"
      }
      EnableSequence [
diff --git a/ucm2/chtrt5645/HiFi-dmic2.conf b/ucm2/chtrt5645/HiFi-dmic2.conf
index d3f880a..95fedb3 100644
--- a/ucm2/chtrt5645/HiFi-dmic2.conf
+++ b/ucm2/chtrt5645/HiFi-dmic2.conf
@@ -50,7 +50,6 @@ SectionDevice."Headphones" {
          PlaybackPriority 200
          PlaybackPCM "hw:${CardId}"
          JackControl "Headphone Jack"
-        JackHWMute "Speaker"
      }
      ConflictingDevice [
@@ -98,7 +97,6 @@ SectionDevice."Headset" {
          CapturePriority 200
          CapturePCM "hw:${CardId}"
          JackControl "Headset Mic Jack"
-        JackHWMute "Mic"
      }
      EnableSequence [
diff --git a/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf b/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf
index db866cd..f6180a4 100644
--- a/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf
+++ b/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf
@@ -54,7 +54,6 @@ SectionDevice."Headphones" {
          PlaybackPriority 200
          PlaybackPCM "hw:${CardId}"
          JackControl "Headphone Jack"
-        JackHWMute "Speaker"
      }
      ConflictingDevice [
@@ -84,7 +83,6 @@ SectionDevice."Headset" {
          CapturePriority 200
          CapturePCM "hw:${CardId}"
          JackControl "Headset Mic Jack"
-        JackHWMute "Mic"
      }
      EnableSequence [
diff --git a/ucm2/chtrt5645/HiFi.conf b/ucm2/chtrt5645/HiFi.conf
index 58468a8..116d456 100644
--- a/ucm2/chtrt5645/HiFi.conf
+++ b/ucm2/chtrt5645/HiFi.conf
@@ -50,7 +50,6 @@ SectionDevice."Headphones" {
          PlaybackPriority 200
          PlaybackPCM "hw:${CardId}"
          JackControl "Headphone Jack"
-        JackHWMute "Speaker"
      }
      ConflictingDevice [
@@ -76,7 +75,6 @@ SectionDevice."Headset" {
          CapturePriority 200
          CapturePCM "hw:${CardId}"
          JackControl "Headset Mic Jack"
-        JackHWMute "Mic"
      }
      EnableSequence [







[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux