pcm_hook_type.ringerdevicehook {
   lib "testhook.so"
   install "_snd_pcm_hook_testhook_install"
}


 
pcm.ringerpcm {
   type hooks
   slave { pcm "default" }
   hooks.0 {
                type ringerdevicehook
                hook_args {
                        open  "date;sleep 5;date"
                        close "mdbus -s ACI-PFaudio-arbiter free 'dev=2ChPCM_sounder,policy-key=dialer-ringtone'" 
                }
   }
}



pcm_hook_type.testhook {
   lib "ALSAso/src/testhook.so"
#   install "dbus_error_init"
}
 
pcm.t2pcm {
   @args.0 xxy
   @args.xxy {
      type string
      default {
        @func getenv 
        vars [ xyz ]
        default brzbbrbrzz
      }
   }

   type hooks
   slave { pcm "hw:0,0" }
   hooks.0 {
                type testhook
                hook_args {
#                        hw    "$xxy - $xyz - install arg"
#                        hw @func concat
#                           strings [ 
#				$xxy 
#				"blafasl" 
#				"dum di dum" 
#			   ]
                        open $xxy
                        close "close arg"      
                }
   }
   hooks.1 {
                type ctl_elems
                hook_args [
                    {
                        interface MIXER
                        name "Headphone Playback Volume"
                        device 0
                        preserve true
                        lock false
                        optional false
                        value [6 6]
                    }
                ]
                
   }
   hint {
                description "test device for alsahooks to implement ACI"
                device_output {
                        @func refer
                        name defaults.pcm.dmix.device
                }
                device_input {
                        @func refer
                        name defaults.pcm.dsnoop.device
                }
   }

}



pcm.xxx {
    type plug
    slave.pcm "dmix"
}
# pcm.twspeaker {
#     type file
#     slave.pcm "dmix"
#     filename "twspeaker.au"
# }


# pcm.vol {
#         @args.0 NAME
#         @args.1 SLAVE
#         @args.NAME {
#               type string
#               default "jOERG"
#         }
#         @args.SLAVE {
#               type string
#               default "default"
#         }
#         type softvol            # Soft Volume conversion PCM
#         slave.pcm $SLAVE        # Slave name
#         control {
#                name "$NAME";    # control element id string
# #               [card STR]      # control card index
# #               [iface STR]     # interface of the element
# #               [index INT]     # index of the element
# #               [device INT]    # device number of the element
# #               [subdevice INT] # subdevice number of the element
# #               [count INT]     # control channels 1 or 2 (default: 2)
#         }
#         min_dB -33.0;           # minimal dB value (default: -51.0)
# #        [resolution INT]       # resolution (default: 256)
# }

pcm.intee {
        @args.0 SLAVE
        @args.1 FILE
        @args.2 FORMAT
        @args.SLAVE {
                type string
        }
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default raw
        }
        type file
        slave.pcm $SLAVE
	file /dev/null
        infile $FILE
        format $FORMAT
}


pcm.vol {
        @args.0 NAME
        @args.1 SLAVE
        @args.NAME {
              type string
              default "jOERG"
        }
        @args.SLAVE {
              type string
              default "default"
        }
        type softvol            # Soft Volume conversion PCM
        slave.pcm $SLAVE        # Slave name
        control {
               name "$NAME";    # control element id string
               card "0"      # control card index
#               [iface STR]     # interface of the element
#               [index INT]     # index of the element
#               [device INT]    # device number of the element
#               [subdevice INT] # subdevice number of the element
#               [count INT]     # control channels 1 or 2 (default: 2)
        }
        min_dB -33.0;           # minimal dB value (default: -51.0)
#        [resolution INT]       # resolution (default: 256)
}
