All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] ucm: document some standard values
@ 2015-03-05  0:38 han.lu
  2015-03-05  0:38 ` [PATCH v2 2/2] conf/ucm: broadwell-rt286: add ucm config han.lu
  2015-03-05  9:59 ` [PATCH v2 1/2] ucm: document some standard values Takashi Iwai
  0 siblings, 2 replies; 4+ messages in thread
From: han.lu @ 2015-03-05  0:38 UTC (permalink / raw)
  To: patch; +Cc: liam.r.girdwood, Lu, Han, alsa-devel

From: "Lu, Han" <han.lu@intel.com>

add standard value JackDev, JackControl and JackHWMute for speaker
mute control on jack insertion. These values will be applied on
pulseaudio.

Signed-off-by: Lu, Han <han.lu@intel.com>

diff --git a/include/use-case.h b/include/use-case.h
index 697377a..3728906 100644
--- a/include/use-case.h
+++ b/include/use-case.h
@@ -284,6 +284,10 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
  *   PlaybackMixerID	- mixer playback ID
  *   CaptureMixer	- name of capture mixer
  *   CaptureMixerID	- mixer capture ID
+ *   JackDev		- jack device name
+ *   JackControl	- jack control name
+ *   JackHWMute		- indicate if the HW mutes a device on jack insertion
+ *			  or not.
  */
 int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
                      const char *identifier,
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] conf/ucm: broadwell-rt286: add ucm config
  2015-03-05  0:38 [PATCH v2 1/2] ucm: document some standard values han.lu
@ 2015-03-05  0:38 ` han.lu
  2015-03-05 10:05   ` Takashi Iwai
  2015-03-05  9:59 ` [PATCH v2 1/2] ucm: document some standard values Takashi Iwai
  1 sibling, 1 reply; 4+ messages in thread
From: han.lu @ 2015-03-05  0:38 UTC (permalink / raw)
  To: patch; +Cc: liam.r.girdwood, Bard Liao, alsa-devel, Lu, Han

From: "Bard Liao" <bardliao@realtek.com>

The configure should apply to all Broadwell-rt286 boards from Intel,
like Wilson Beach SDS Ultrabook.

Signed-off-by: Lu, Han <han.lu@intel.com>

diff --git a/src/conf/ucm/broadwell-rt286/HiFi b/src/conf/ucm/broadwell-rt286/HiFi
new file mode 100644
index 0000000..08f5c50
--- /dev/null
+++ b/src/conf/ucm/broadwell-rt286/HiFi
@@ -0,0 +1,128 @@
+# Use case Configuration for Nexus 7
+# Adapted to Ubuntu Touch by David Henningsson <david.henningsson@canonical.com>
+
+SectionVerb {
+
+	EnableSequence [
+	]
+
+	DisableSequence [
+	]
+
+	# ALSA PCM
+	Value {
+		# ALSA PCM device for HiFi
+		PlaybackPCM "hw:broadwellrt286"
+		CapturePCM "hw:broadwellrt286"
+	}
+}
+
+SectionDevice."Headphones" {
+	Comment "Headphones playback"
+
+	ConflictingDevice [
+		"Speaker"
+	]
+
+	EnableSequence [
+		cdev "hw:broadwellrt286"
+		cset "name='Master Playback Volume' 30"
+		cset "name='HPO L Switch' on"
+		cset "name='HPO R Switch' on"
+		cset "name='Headphone Jack Switch' on"
+		cset "name='DAC0 Playback Volume' 100"
+	]
+
+	DisableSequence [
+		cdev "hw:broadwellrt286"
+		cset "name='Headphone Jack Switch' off"
+		cset "name='HPO L Switch' off"
+		cset "name='HPO R Switch' off"
+	]
+
+	Value {
+		PlaybackChannels "2"
+		JackDev "rt286-jack"
+		JackControl "Headset Jack"
+		JackHWMute "Speaker"
+	}
+}
+
+SectionDevice."Speaker" {
+	Comment "Speaker playback"
+
+	ConflictingDevice [
+		"Headphones"
+	]
+
+	EnableSequence [
+		cdev "hw:broadwellrt286"
+		cset "name='Master Playback Volume' 30"
+		cset "name='DAC0 Playback Volume' 127"
+		cset "name='SPO Switch' on"
+		cset "name='Speaker Playback Switch' on"
+		cset "name='Speaker Switch' on"
+	]
+
+	DisableSequence [
+		cdev "hw:broadwellrt286"
+		cset "name='Speaker Switch' off"
+		cset "name='Speaker Playback Switch' off"
+		cset "name='SPO Switch' 0"
+	]
+
+	Value {
+		PlaybackChannels "2"
+	}
+}
+
+SectionDevice."Handset" {
+	Comment "Handset Microphone"
+
+	ConflictingDevice [
+		"Mainmic"
+	]
+
+	EnableSequence [
+		cdev "hw:broadwellrt286"
+
+		cset "name='ADC 0 Mux' 0"
+		cset "name='ADC0 Capture Switch' on"
+		cset "name='ADC0 Capture Volume' 127"
+		cset "name='AMIC Volume' 1"
+	]
+
+	DisableSequence [
+		cdev "hw:broadwellrt286"
+		cset "name='ADC0 Capture Switch' off"
+	]
+
+	Value {
+		CaptureChannels "2"
+	}
+}
+
+SectionDevice."Mainmic" {
+	Comment "Main Microphone"
+
+	ConflictingDevice [
+		"Handset"
+	]
+
+	EnableSequence [
+		cdev "hw:broadwellrt286"
+
+		cset "name='ADC 0 Mux' 2"
+		cset "name='ADC0 Capture Switch' on"
+		cset "name='ADC0 Capture Volume' 127"
+	]
+
+	DisableSequence [
+		cdev "hw:broadwellrt286"
+		cset "name='ADC0 Capture Switch' off"
+	]
+
+	Value {
+		CaptureChannels "2"
+	}
+}
diff --git a/src/conf/ucm/broadwell-rt286/broadwell-rt286.conf b/src/conf/ucm/broadwell-rt286/broadwell-rt286.conf
new file mode 100644
index 0000000..4a176cd
--- /dev/null
+++ b/src/conf/ucm/broadwell-rt286/broadwell-rt286.conf
@@ -0,0 +1,8 @@
+SectionUseCase."HiFi" {
+	File "HiFi"
+	Comment "Play HiFi quality Music"
+}
+
+SectionDefaults [
+	cdev "hw:broadwellrt286"
+]
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] ucm: document some standard values
  2015-03-05  0:38 [PATCH v2 1/2] ucm: document some standard values han.lu
  2015-03-05  0:38 ` [PATCH v2 2/2] conf/ucm: broadwell-rt286: add ucm config han.lu
@ 2015-03-05  9:59 ` Takashi Iwai
  1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2015-03-05  9:59 UTC (permalink / raw)
  To: han.lu; +Cc: liam.r.girdwood, alsa-devel

At Thu,  5 Mar 2015 08:38:54 +0800,
han.lu@intel.com wrote:
> 
> From: "Lu, Han" <han.lu@intel.com>
> 
> add standard value JackDev, JackControl and JackHWMute for speaker
> mute control on jack insertion. These values will be applied on
> pulseaudio.
> 
> Signed-off-by: Lu, Han <han.lu@intel.com>

Applied, thanks.


Takashi

> 
> diff --git a/include/use-case.h b/include/use-case.h
> index 697377a..3728906 100644
> --- a/include/use-case.h
> +++ b/include/use-case.h
> @@ -284,6 +284,10 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
>   *   PlaybackMixerID	- mixer playback ID
>   *   CaptureMixer	- name of capture mixer
>   *   CaptureMixerID	- mixer capture ID
> + *   JackDev		- jack device name
> + *   JackControl	- jack control name
> + *   JackHWMute		- indicate if the HW mutes a device on jack insertion
> + *			  or not.
>   */
>  int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
>                       const char *identifier,
> -- 
> 2.1.0
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/2] conf/ucm: broadwell-rt286: add ucm config
  2015-03-05  0:38 ` [PATCH v2 2/2] conf/ucm: broadwell-rt286: add ucm config han.lu
@ 2015-03-05 10:05   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2015-03-05 10:05 UTC (permalink / raw)
  To: han.lu; +Cc: liam.r.girdwood, Bard Liao, alsa-devel

At Thu,  5 Mar 2015 08:38:55 +0800,
han.lu@intel.com wrote:
> 
> From: "Bard Liao" <bardliao@realtek.com>
> 
> The configure should apply to all Broadwell-rt286 boards from Intel,
> like Wilson Beach SDS Ultrabook.
> 
> Signed-off-by: Lu, Han <han.lu@intel.com>

Applied, thanks.

But, Makefile and autoconf change are missing.  I fixed it manually.


Takashi

> 
> diff --git a/src/conf/ucm/broadwell-rt286/HiFi b/src/conf/ucm/broadwell-rt286/HiFi
> new file mode 100644
> index 0000000..08f5c50
> --- /dev/null
> +++ b/src/conf/ucm/broadwell-rt286/HiFi
> @@ -0,0 +1,128 @@
> +# Use case Configuration for Nexus 7
> +# Adapted to Ubuntu Touch by David Henningsson <david.henningsson@canonical.com>
> +
> +SectionVerb {
> +
> +	EnableSequence [
> +	]
> +
> +	DisableSequence [
> +	]
> +
> +	# ALSA PCM
> +	Value {
> +		# ALSA PCM device for HiFi
> +		PlaybackPCM "hw:broadwellrt286"
> +		CapturePCM "hw:broadwellrt286"
> +	}
> +}
> +
> +SectionDevice."Headphones" {
> +	Comment "Headphones playback"
> +
> +	ConflictingDevice [
> +		"Speaker"
> +	]
> +
> +	EnableSequence [
> +		cdev "hw:broadwellrt286"
> +		cset "name='Master Playback Volume' 30"
> +		cset "name='HPO L Switch' on"
> +		cset "name='HPO R Switch' on"
> +		cset "name='Headphone Jack Switch' on"
> +		cset "name='DAC0 Playback Volume' 100"
> +	]
> +
> +	DisableSequence [
> +		cdev "hw:broadwellrt286"
> +		cset "name='Headphone Jack Switch' off"
> +		cset "name='HPO L Switch' off"
> +		cset "name='HPO R Switch' off"
> +	]
> +
> +	Value {
> +		PlaybackChannels "2"
> +		JackDev "rt286-jack"
> +		JackControl "Headset Jack"
> +		JackHWMute "Speaker"
> +	}
> +}
> +
> +SectionDevice."Speaker" {
> +	Comment "Speaker playback"
> +
> +	ConflictingDevice [
> +		"Headphones"
> +	]
> +
> +	EnableSequence [
> +		cdev "hw:broadwellrt286"
> +		cset "name='Master Playback Volume' 30"
> +		cset "name='DAC0 Playback Volume' 127"
> +		cset "name='SPO Switch' on"
> +		cset "name='Speaker Playback Switch' on"
> +		cset "name='Speaker Switch' on"
> +	]
> +
> +	DisableSequence [
> +		cdev "hw:broadwellrt286"
> +		cset "name='Speaker Switch' off"
> +		cset "name='Speaker Playback Switch' off"
> +		cset "name='SPO Switch' 0"
> +	]
> +
> +	Value {
> +		PlaybackChannels "2"
> +	}
> +}
> +
> +SectionDevice."Handset" {
> +	Comment "Handset Microphone"
> +
> +	ConflictingDevice [
> +		"Mainmic"
> +	]
> +
> +	EnableSequence [
> +		cdev "hw:broadwellrt286"
> +
> +		cset "name='ADC 0 Mux' 0"
> +		cset "name='ADC0 Capture Switch' on"
> +		cset "name='ADC0 Capture Volume' 127"
> +		cset "name='AMIC Volume' 1"
> +	]
> +
> +	DisableSequence [
> +		cdev "hw:broadwellrt286"
> +		cset "name='ADC0 Capture Switch' off"
> +	]
> +
> +	Value {
> +		CaptureChannels "2"
> +	}
> +}
> +
> +SectionDevice."Mainmic" {
> +	Comment "Main Microphone"
> +
> +	ConflictingDevice [
> +		"Handset"
> +	]
> +
> +	EnableSequence [
> +		cdev "hw:broadwellrt286"
> +
> +		cset "name='ADC 0 Mux' 2"
> +		cset "name='ADC0 Capture Switch' on"
> +		cset "name='ADC0 Capture Volume' 127"
> +	]
> +
> +	DisableSequence [
> +		cdev "hw:broadwellrt286"
> +		cset "name='ADC0 Capture Switch' off"
> +	]
> +
> +	Value {
> +		CaptureChannels "2"
> +	}
> +}
> diff --git a/src/conf/ucm/broadwell-rt286/broadwell-rt286.conf b/src/conf/ucm/broadwell-rt286/broadwell-rt286.conf
> new file mode 100644
> index 0000000..4a176cd
> --- /dev/null
> +++ b/src/conf/ucm/broadwell-rt286/broadwell-rt286.conf
> @@ -0,0 +1,8 @@
> +SectionUseCase."HiFi" {
> +	File "HiFi"
> +	Comment "Play HiFi quality Music"
> +}
> +
> +SectionDefaults [
> +	cdev "hw:broadwellrt286"
> +]
> -- 
> 2.1.0
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-05 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05  0:38 [PATCH v2 1/2] ucm: document some standard values han.lu
2015-03-05  0:38 ` [PATCH v2 2/2] conf/ucm: broadwell-rt286: add ucm config han.lu
2015-03-05 10:05   ` Takashi Iwai
2015-03-05  9:59 ` [PATCH v2 1/2] ucm: document some standard values Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.