* On mixer controls naming @ 2014-01-09 15:27 R. Lemos 2014-01-13 11:12 ` Clemens Ladisch 0 siblings, 1 reply; 5+ messages in thread From: R. Lemos @ 2014-01-09 15:27 UTC (permalink / raw) To: alsa-devel Hi, I'm trying to write a new driver for a virtual sound card. It isn't actually a sound card, but only a software solution to control volume and bass of an external device (using SPI and GPIO). So it only has a mixer (no pcm or capture subdevices). I could successfully configure two controls "Master Playback Switch" and "Master Playback Volume". Alsamixer shows them correctly under "Playback" view (and very nicely it joined them together to form a single composite control "Master") The other control I've named "Tone Control - Bass", as indicated in writing-an-alsa-driver.pdf. But alsamixer shows it under both "Playback" and "Capture" views. How can I restrict this latter control to just playback? -- []'s Rodrigo ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: On mixer controls naming 2014-01-09 15:27 On mixer controls naming R. Lemos @ 2014-01-13 11:12 ` Clemens Ladisch 2014-01-13 16:56 ` R. Lemos 0 siblings, 1 reply; 5+ messages in thread From: Clemens Ladisch @ 2014-01-13 11:12 UTC (permalink / raw) To: R. Lemos, alsa-devel R. Lemos wrote: > The other control I've named "Tone Control - Bass", as indicated in > writing-an-alsa-driver.pdf. But alsamixer shows it under both > "Playback" and "Capture" views. > > How can I restrict this latter control to just playback? For a control to be classified as a playback control, its name must have one of the suffixes " Playback Enum", " Playback Switch", " Playback Route", or " Playback Volume". Regards, Clemens ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: On mixer controls naming 2014-01-13 11:12 ` Clemens Ladisch @ 2014-01-13 16:56 ` R. Lemos 2014-01-13 18:49 ` Clemens Ladisch 0 siblings, 1 reply; 5+ messages in thread From: R. Lemos @ 2014-01-13 16:56 UTC (permalink / raw) To: Clemens Ladisch; +Cc: alsa-devel Unfortunately it doesn't work for Tone Control. I've tried the following (after each alternative is the output of amixer): ===== "Master Playback Bass" ===== Simple mixer control 'Master Playback Bass',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: 0 - 255 Mono: 0 [0%] ===== "Master Playback Tone" ===== Simple mixer control 'Master Playback Tone',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: 0 - 255 Mono: 0 [0%] ===== "Playback Tone - Bass" ===== Simple mixer control 'Playback Tone - Bass',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: 0 - 255 Mono: 0 [0%] ===== "Playback Tone Control - Bass" ===== Simple mixer control 'Playback Tone Control - Bass',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: 0 - 255 Mono: 0 [0%] ===== "Playback Tone Control" ===== Simple mixer control 'Playback Tone Control',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: 0 - 255 Mono: 0 [0%] ===== "Tone Control - Bass" ===== Simple mixer control 'Bass',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: 0 - 255 Mono: 123 [48%] ===== "Tone Control Playback - Bass" ===== Simple mixer control 'Tone Control Playback - Bass',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: 0 - 255 Mono: 0 [0%] ===== "Tone Playback Control - Bass" ===== Simple mixer control 'Tone Playback Control - Bass',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: 0 - 255 Mono: 0 [0%] In each tested alternative capture channel shows up as mono (instead of the expected behavior of showing nothing at all, as below). Each control label also reverted to the full control name. Personally I prefer the "Tone Control - Bass" alternative, which neatly shows up as just "Bass". It would be perfect, were not the availability of a capture channel for this control. Note: previous amixer output elided to remove the the following common working part for the "Master Playback Volume" and "Master Playback Switch": Simple mixer control 'Master',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono Limits: Playback 0 - 255 Mono: Playback 194 [76%] [on] On Mon, Jan 13, 2014 at 9:12 AM, Clemens Ladisch <clemens@ladisch.de> wrote: > R. Lemos wrote: >> The other control I've named "Tone Control - Bass", as indicated in >> writing-an-alsa-driver.pdf. But alsamixer shows it under both >> "Playback" and "Capture" views. >> >> How can I restrict this latter control to just playback? > > For a control to be classified as a playback control, its name must > have one of the suffixes " Playback Enum", " Playback Switch", > " Playback Route", or " Playback Volume". > > > Regards, > Clemens -- []'s Rodrigo Powered by carbohydrates ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: On mixer controls naming 2014-01-13 16:56 ` R. Lemos @ 2014-01-13 18:49 ` Clemens Ladisch 2014-01-14 0:31 ` R. Lemos 0 siblings, 1 reply; 5+ messages in thread From: Clemens Ladisch @ 2014-01-13 18:49 UTC (permalink / raw) To: R. Lemos; +Cc: alsa-devel R. Lemos wrote: > On Mon, Jan 13, 2014 at 9:12 AM, Clemens Ladisch <clemens@ladisch.de> wrote: >> For a control to be classified as a playback control, its name must >> have one of the suffixes " Playback Enum", " Playback Switch", >> " Playback Route", or " Playback Volume". > > Unfortunately it doesn't work for Tone Control. > > Simple mixer control 'Master Playback Bass',0 > Simple mixer control 'Master Playback Tone',0 > Simple mixer control 'Playback Tone - Bass',0 > Simple mixer control 'Playback Tone Control - Bass',0 > ... "Suffix" means "at the end". Try "Tone Control Bass Playback Volume". Regards, Clemens ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: On mixer controls naming 2014-01-13 18:49 ` Clemens Ladisch @ 2014-01-14 0:31 ` R. Lemos 0 siblings, 0 replies; 5+ messages in thread From: R. Lemos @ 2014-01-14 0:31 UTC (permalink / raw) To: Clemens Ladisch; +Cc: alsa-devel I'll stick to "Bass Playback Volume" (shows up as "Bass", only playback channel). Thank you for your support. On Mon, Jan 13, 2014 at 4:49 PM, Clemens Ladisch <clemens@ladisch.de> wrote: > R. Lemos wrote: >> On Mon, Jan 13, 2014 at 9:12 AM, Clemens Ladisch <clemens@ladisch.de> wrote: >>> For a control to be classified as a playback control, its name must >>> have one of the suffixes " Playback Enum", " Playback Switch", >>> " Playback Route", or " Playback Volume". >> >> Unfortunately it doesn't work for Tone Control. >> >> Simple mixer control 'Master Playback Bass',0 >> Simple mixer control 'Master Playback Tone',0 >> Simple mixer control 'Playback Tone - Bass',0 >> Simple mixer control 'Playback Tone Control - Bass',0 >> ... > > "Suffix" means "at the end". Try "Tone Control Bass Playback Volume". > > > Regards, > Clemens -- []'s Rodrigo Powered by carbohydrates ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-14 0:31 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-01-09 15:27 On mixer controls naming R. Lemos 2014-01-13 11:12 ` Clemens Ladisch 2014-01-13 16:56 ` R. Lemos 2014-01-13 18:49 ` Clemens Ladisch 2014-01-14 0:31 ` R. Lemos
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.